lib/markdown: Fix a bug in check_link
authorLucas Bajolet <r4pass@hotmail.com>
Wed, 29 Jul 2015 15:41:20 +0000 (11:41 -0400)
committerLucas Bajolet <r4pass@hotmail.com>
Tue, 11 Aug 2015 15:20:50 +0000 (11:20 -0400)
Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>

lib/markdown/markdown.nit

index 251f784..3dbf248 100644 (file)
@@ -2102,6 +2102,7 @@ abstract class TokenLinkOrImage
                                        if pos == -1 then return -1
                                end
                        end
+                       if pos < start then return -1
                        if md[pos] != ')' then return -1
                else if md[pos] == '[' then
                        pos += 1