Files
John MacFarlane abb7aab75f RST writer: improve inline escaping rules.
Also a small performance optimization.

Closes #8380.
2022-10-16 14:59:28 -07:00

600 B

% pandoc -f man -t rst
LC_*
^D
LC\_\*

These examples of things that don't require escaping are taken from the RST documentation:

% pandoc -f native -t rst
[Para [Str "2*x a**b O(N**2) e**(x*y) f(x)*f(y) a|b"]
,Para [Str "a**b O(N**2) e**(x*y) f(x)*f(y)"]
]
^D
2*x a**b O(N**2) e**(x*y) f(x)*f(y) a|b

a**b O(N**2) e**(x*y) f(x)*f(y)

These examples of things that do require escaping are taken from the RST documentation:

% pandoc -f native -t rst
Str "*4, class_, *args, **kwargs, `TeX-quoted', *ML, *.txt"
^D
\*4, class\_, \*args, \**kwargs, \`TeX-quoted', \*ML, \*.txt