don't need to escape backslash

master
brent s. 2 years ago
parent b0fba9b441
commit 13349d6d99
Signed by: bts
GPG Key ID: 8C004C2F93481F6B
  1. 6
      ref/ascii/ascii.html
  2. 5
      ref/ascii/tables/_gen.py
  3. 2
      ref/ascii/tables/print.adoc

@ -443,7 +443,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
<div class="details">
<span id="author" class="author">Brent Saner</span><br>
<span id="email" class="email"><a href="mailto:r00t@square-r00t.net">r00t@square-r00t.net</a></span><br>
<span id="revdate">Last updated/rendered 2020-08-23 00:03:40 -0400</span>
<span id="revdate">Last updated/rendered 2020-08-23 00:38:41 -0400</span>
</div>
<div id="toc" class="toc2">
<div id="toctitle">Table of Contents</div>
@ -1564,7 +1564,7 @@ used on e.g. RS-232).</p>
<td class="tableblock halign-center valign-top"><p class="tableblock">01011100</p></td>
<td class="tableblock halign-center valign-top"><p class="tableblock">&amp;#092;</p></td>
<td class="tableblock halign-center valign-top"><p class="tableblock">N/A</p></td>
<td class="tableblock halign-center valign-top"><p class="tableblock">\\</p></td>
<td class="tableblock halign-center valign-top"><p class="tableblock">\</p></td>
<td class="tableblock halign-center valign-top"><p class="tableblock">Backslash</p></td>
</tr>
<tr>
@ -4194,7 +4194,7 @@ of reference.</p>
<td class="tableblock halign-center valign-top"><p class="tableblock">01011100</p></td>
<td class="tableblock halign-center valign-top"><p class="tableblock">&amp;#092;</p></td>
<td class="tableblock halign-center valign-top"><p class="tableblock">N/A</p></td>
<td class="tableblock halign-center valign-top"><p class="tableblock">\\</p></td>
<td class="tableblock halign-center valign-top"><p class="tableblock">\</p></td>
<td class="tableblock halign-center valign-top"><p class="tableblock">Backslash</p></td>
</tr>
<tr>

@ -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

@ -544,7 +544,7 @@
| 01011100
| &amp;#092;
| N/A
| \\
| \
| Backslash

| 93

Loading…
Cancel
Save