|
From: Guenter M. <mi...@us...> - 2022-05-06 22:29:45
|
On 2022-05-04, Alan G. Isaac wrote: > Are backslashes stripped out of the csv-table header? Testing with the minimal example (provided in private mail) revealed that a backslash must be quadrupled to appear in the output (rsp. the doctree). This is a common "feature" if the same escape character is used two times... (The first escape-round is the generic rST escape handling.) Looking at the definitions in docutils/parsers/rst/directives/tables.py reveals that headers from the argument list and table content are parsed using different "CSV dialects": HeaderDialect vs. DocutilsDialect. Only the first defines an escape character. > If so, it this intentional? (In the csv-table data, > they just need to be doubled.) Given that this two different csv dialects are defined in tables.py since at least 2004, it may be intentional or a side-effect of some intention. OTOH, the documentation https://docutils.sourceforge.io/docs/ref/rst/directives.html#csv-table-1 says regarding the "header" option: Must use the same CSV format as the main CSV data. Either implementation or documentation should be changed. Now we need to find out / decide which. Günter |