Skip to content

gfm to rst inline code block is not escaped when the line begins with forward slash #5906

@ts-wong

Description

@ts-wong

With the following markdown snippet:

/api?query=```foo```

When converting to rst, the expected output should be:

/api?query=\ ``foo``

Instead, I am getting:

/api?query=``foo``

which is rendered to HTML by GitHub and readthedocs.io to something like:

/api?query=``foo``

That is, the code block is not rendered.

When the line does not start with /, the rst is generated correctly.

I am using macOS 10.14.6. Pandoc is installed via Homebrew.

$ pandoc --version
pandoc 2.7.3
Compiled with pandoc-types 1.17.5.4, texmath 0.11.2.2, skylighting 0.8.1
Default user data directory: /Users/ts/.local/share/pandoc or /Users/ts/.pandoc
Copyright (C) 2006-2019 John MacFarlane
Web:  http://pandoc.org
This is free software; see the source for copying conditions.
There is no warranty, not even for merchantability or fitness
for a particular purpose.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions