nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
13aa1fd
)
lib/markdown: use a break label instead of a local flag
author
Jean Privat
<jean@pryen.org>
Fri, 4 Mar 2016 02:30:44 +0000
(21:30 -0500)
committer
Jean Privat
<jean@pryen.org>
Fri, 4 Mar 2016 02:30:44 +0000
(21:30 -0500)
Signed-off-by: Jean Privat <jean@pryen.org>
lib/markdown/markdown.nit
patch
|
blob
|
history
diff --git
a/lib/markdown/markdown.nit
b/lib/markdown/markdown.nit
index
64c7581
..
0676112
100644
(file)
--- 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