From: Jean Privat Date: Fri, 4 Mar 2016 02:30:44 +0000 (-0500) Subject: lib/markdown: use a break label instead of a local flag X-Git-Url: http://nitlanguage.org lib/markdown: use a break label instead of a local flag Signed-off-by: Jean Privat --- diff --git a/lib/markdown/markdown.nit b/lib/markdown/markdown.nit index 64c7581..0676112 100644 --- a/lib/markdown/markdown.nit +++ b/lib/markdown/markdown.nit @@ -2332,18 +2332,11 @@ redef class Text if c == '\\' and pos + 1 < length then pos = escape(out, self[pos + 1], pos) else - var end_reached = false - for n in nend do - if c == n then - end_reached = true - break - end - end - if end_reached then break + for n in nend do if c == n then break label out.add c end pos += 1 - end + end label if pos == length then return -1 return pos end