Kamil Kisiel  committed 9b0942b

Use non-greedy matching of wiki syntax.

Potentially fixes Trac-Hacks bug #8500

  • Participants
  • Parent commits 59f5c26

Comments (0)

Files changed (1)

File tracmathjax/

     def get_wiki_syntax(self):
         # Capture text in between MathJax delimiters to keep other wiki syntax
         # from being applied.
-        yield (r"(?P<mathjax_inline>\\(.*\\)|\$\$.*\$\$)", self._render_inline)
+        yield (r"(?P<mathjax_inline>\\(.*?\\)|\$\$.*?\$\$)", self._render_inline)
     def get_link_resolvers(self):
         # we have no link resolvers