Syntax highlighting using Mediawiki formatting: Difference between revisions

m
m (→‎{{header|Julia}}: more comments)
m (→‎{{header|Julia}}: shorten for)
Line 535:
either = Regex("$startcomment|$stopcomment", "sa")
depth, startpos, stoppos = 0, 0, 0
'''for''' (i, m) '''in''' enumerate(eachmatch(either, s))
'''if''' m.match == startcomment
startpos = startpos == 0 ? m.match.offset : startpos
4,107

edits