Skip to content

Emphasis takes precedence over inline code span #75

Closed
@eush77

Description

@eush77

Input:

_`_`_

Actual AST:

{
  "type": "paragraph",
  "children": [
    {
      "type": "emphasis",
      "children": [
        {
          "type": "text",
          "value": "`"
        }
      ]
    },
    {
      "type": "text",
      "value": "`_"
    }
  ]
}

Expected AST:

{
  "type": "paragraph",
  "children": [
    {
      "type": "emphasis",
      "children": [
        {
          "type": "inlineCode",
          "value": "_"
        }
      ]
    }
  ]
}

Commonmark:

Code span backticks have higher precedence than any other inline constructs except HTML tags and autolinks. Thus, for example, this is not parsed as emphasized text, since the second * is part of a code span: *foo*``.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions