Skip to content

Non-spaced tokens with emphasis seems not parsed as expected #488

Open
@gfx

Description

@gfx

We have introduced CommonMark to our web service and found that some emphasises do not work as expected if they are in non-spaced tokens and links. Non-spaced tokens are important for agglutinative languages like Japanese, so I think it is a spec bug.

Example

Expect:

foo**bar**baz

foo**[bar](#)**baz

to be:

foo<strong>bar</strong>baz

foo<strong><a href="#">bar</a></strong>baz

but got:

foo<strong>bar</strong>baz # OK

foo**<a href="#">bar</a>**baz # NG: ** are not parsed as emphasis

Environment

  • CommonMarker v0.16.8
  • commonmark.js v0.28.1
    • e.g. echo 'foo**[bar](#)**baz' | commonmark -- /dev/stdin

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions