Skip to content

Any way to flag escaped characters on input? #20

Closed as not planned
Closed as not planned

Description

@zkamvar

commonmark supports both bare square brackets and escaped square brackets. When the enter the parser, there's no indication which set of brackets were escaped and which ones were bare:

commonmark::markdown_xml("[bare brackets] \\[escaped brackets\\]") |> writeLines()
#> <?xml version="1.0" encoding="UTF-8"?>
#> <!DOCTYPE document SYSTEM "CommonMark.dtd">
#> <document xmlns="http://commonmark.org/xml/1.0">
#>   <paragraph>
#>     <text xml:space="preserve">[bare brackets] [escaped brackets]</text>
#>   </paragraph>
#> </document>

Created on 2022-09-19 with reprex v2.0.2

Is there a way to have the parser indicate which characters were escaped in the source document?

Activity

  1. jeroen commented on Sep 20, 2022

    @jeroen
    Member

    You would have to ask upstream in https://github.com/commonmark/cmark

  2. github-actions commented on Jul 7, 2025

    @github-actions

    This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If the problem still exists in the latest version, feel free to raise it again in a new issue. Please remember to keep the description terse and include a minimal example to help us look into it.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions