Permalink
Please sign in to comment.
Browse files
wikirend.py: cancel unclosed nested font styles
If we are closing a font style and we encounter unclosed nested inner
font styles, we reach back into the already rendered results and cancel
those font styles by replacing the opening font style with the raw
characters. This fixes the rendering of:
_x{1}x*_ .... _xx*_
This is a hack. The need for this hack shows that our current single
pass approach to rendering out wikitext is flawed; in an ideal world it
would be clear to the renderer that the first '*' did not have a closing
'*' within its scope. But we don't actually work out scopes; we just
do textual lookahead, so the first '*' sees the second '*' and thinks
there's a matched pair.
We cannot do this without being inside a nested style for reasons
beyond the scope of this commit message.- Loading branch information...
52
wikirend.py
0 comments on commit
4e95e16