Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mishandling pipe character in list item #6739

Closed
dcg-csc opened this issue Oct 12, 2020 · 1 comment
Closed

mishandling pipe character in list item #6739

dcg-csc opened this issue Oct 12, 2020 · 1 comment
Labels

Comments

@dcg-csc
Copy link

dcg-csc commented Oct 12, 2020

Pandoc 2.11 seems to have a problem with markdown list items that have a code wrapped pipe character

Example input file test.md:

* `--argument` This item does not have a pipe character
* `--argA | --argB` This item has a pipe character

Command used: pandoc -f gfm --atx-headers --reference-location=block -s test.md -t gfm -o testout.md

Contents of generated 'testout.md`

-   `--argument` This item does not have a pipe character

\* `--argA | --argB` This item has a pipe character

Expected output:

-   '--argument' This item does not have a pipe character\
-   '--argA | --argB' This item has a pipe character

This worked as expected in pandoc 2.9.2

The only work around I found is:

* `--argA ` \| `--argB` This item has a pipe character

Which generates:

-   `--argA ` \| `--argB` This item has a pipe character
@jgm
Copy link
Owner

jgm commented Oct 12, 2020

See jgm/commonmark-hs#52

This was partially addressed in a commit that modifies the documentation:

-- | Syntax for pipe tables.  Note that this should generally be
 -- placed AFTER the syntax spec for lists, headings, and other block-level
 -- constructs, to avoid bad results when non-table lines contain pipe
 -- characters:  use @defaultSyntaxSpec <> pipeTableSpec@ rather
 -- than @pipeTableSpec <> defaultSyntaxSpec@.

I kept the issue open, pending a better solution, but in the mean time we should be able to fix this in pandoc by doing what this comment suggests.

@jgm jgm added the bug label Oct 12, 2020
@jgm jgm closed this as completed in 12ff835 Oct 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants