From 13349d6d996d3037c703c9ead0562b9691545048 Mon Sep 17 00:00:00 2001 From: brent s Date: Sun, 23 Aug 2020 00:38:53 -0400 Subject: [PATCH] don't need to escape backslash --- ref/ascii/ascii.html | 6 +++--- ref/ascii/tables/_gen.py | 5 ++++- ref/ascii/tables/print.adoc | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/ref/ascii/ascii.html b/ref/ascii/ascii.html index f7e7f80..f70ea91 100644 --- a/ref/ascii/ascii.html +++ b/ref/ascii/ascii.html @@ -443,7 +443,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
Brent Saner

-Last updated/rendered 2020-08-23 00:03:40 -0400 +Last updated/rendered 2020-08-23 00:38:41 -0400
Table of Contents
@@ -1564,7 +1564,7 @@ used on e.g. RS-232).

01011100

\

N/A

-

\\

+

\

Backslash

@@ -4194,7 +4194,7 @@ of reference.

01011100

\

N/A

-

\\

+

\

Backslash

diff --git a/ref/ascii/tables/_gen.py b/ref/ascii/tables/_gen.py index ab42c78..6f255c1 100755 --- a/ref/ascii/tables/_gen.py +++ b/ref/ascii/tables/_gen.py @@ -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 diff --git a/ref/ascii/tables/print.adoc b/ref/ascii/tables/print.adoc index c1f0ab7..302cb54 100644 --- a/ref/ascii/tables/print.adoc +++ b/ref/ascii/tables/print.adoc @@ -544,7 +544,7 @@ | 01011100 | \ | N/A -| \\ +| \ | Backslash | 93