don't need to escape backslash

This commit is contained in:
2020-08-23 00:38:53 -04:00
parent b0fba9b441
commit 13349d6d99
3 changed files with 8 additions and 5 deletions

View File

@@ -7,6 +7,9 @@ import html.entities
unused = (129, 141, 143, 144, 157)
# These are whitespace and delete (control characters unnecessary to put here).
noprint = (32, 127, 160, 173)
# These need to be escaped in the generated AsciiDoc format.
# escapechars = ('|', '\\')
escapechars = ('|', )
tpl = '| {d}\n| {o}\n| {h}\n| {b}\n| {ht}\n| {e}\n| {l}\n| {desc}\n'
@@ -52,7 +55,7 @@ for f, r in charsets.items():
c.encode('ascii')
except UnicodeEncodeError as e:
c = '&#{0:0>3};'.format(n)
if c in ('|', '\\'):
if c in escapechars:
c = '\\{0}'.format(c)
vals['l'] = c

View File

@@ -544,7 +544,7 @@
| 01011100
| \
| N/A
| \\
| \
| Backslash
| 93