summaryrefslogtreecommitdiff
path: root/test/command
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2022-10-16 14:49:54 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2022-10-16 14:59:28 -0700
commitabb7aab75f241a70b11365d52fae0dffa77b077f (patch)
tree6f48c3828b23b2bf4d5fea6993a8628fbd7c0dc9 /test/command
parentfa450607a832c29aa24ff57dba83c7491c83feeb (diff)
RST writer: improve inline escaping rules.
Also a small performance optimization. Closes #8380.
Diffstat (limited to 'test/command')
-rw-r--r--test/command/8380.md31
1 files changed, 31 insertions, 0 deletions
diff --git a/test/command/8380.md b/test/command/8380.md
new file mode 100644
index 000000000..116922c85
--- /dev/null
+++ b/test/command/8380.md
@@ -0,0 +1,31 @@
+```
+% 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
+```
+