Skip to content

Preserve literal pipes in AsciiDoc headers and cells - #519

Open
Divuzki wants to merge 1 commit into
astanin:masterfrom
Divuzki:escape-asciidoc-cell-separators
Open

Divuzki wants to merge 1 commit into
astanin:masterfrom
Divuzki:escape-asciidoc-cell-separators

Conversation

@Divuzki

@Divuzki Divuzki commented Nov 28, 2026

Copy link
Copy Markdown

A literal pipe in a cell starts another AsciiDoc cell. For example, rendering [["a|b", "c"]] as a two-column table produces | a|b | c. Asciidoctor reads that row as ["", "b"], losing the last value.

Escape pipes within each formatted cell before joining the cells into a row. This covers headers and body rows. The regression tests exercise adjacent pipes and a backslash immediately before a pipe, with and without headers.

Both new cases failed before the change. The Python 3.14 test suite including doctests passed (368 passed, 17 skipped). I also checked the generated table with Asciidoctor.js and confirmed that it recovered the original headers and cell values.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant