Syntax highlighting using Mediawiki formatting: Difference between revisions
Content added Content deleted
m (→{{header|Julia}}: more comments) |
m (→{{header|Julia}}: shorten for) |
||
Line 535: | Line 535: | ||
either = Regex("$startcomment|$stopcomment", "sa") |
either = Regex("$startcomment|$stopcomment", "sa") |
||
depth, startpos, stoppos = 0, 0, 0 |
depth, startpos, stoppos = 0, 0, 0 |
||
'''for''' |
'''for''' m '''in''' eachmatch(either, s) |
||
'''if''' m.match == startcomment |
'''if''' m.match == startcomment |
||
startpos = startpos == 0 ? m.match.offset : startpos |
startpos = startpos == 0 ? m.match.offset : startpos |