- # For each line, we scan through looking for magic
- # strings, outputting verbatim any intervening text
- # TODO: highlight search words (look at referrer)
- scan_re = re.compile(
- r"(?:"
- # Formatting
- + r"(?P<b>\*\*|'''|//|''|##|``|__|\^\^|,,)"
- + r"|(?P<tit>\={2,6})"
- + r"|(?P<br>\\\\)"
- + r"|(?P<rule>^-{3,})"
- + r"|(?P<hi>\b(FIXME|TODO|DONE)\b)"
+ scan_re = re.compile(r"""(?:
+ # Styles and formatting
+ (?P<b> \*\*|'''|//|''|\#\#|``|__|\^\^|,,)
+ | (?P<tit> \={2,6})
+ | (?P<br> \\\\)
+ | (?P<rule> ^-{3,})
+ | (?P<hi> \b(FIXME|TODO|DONE)\b)