Skip to content

Emphasis and underscores in the middle of a word #343

Closed

Description

@silentvick

I'm using marked.js v.0.3.1 with default settings.
Seems it breaks with underscores in the middle of word if there is also emphasis block in the same paragraph.

For example, this:

just_a_few_underscores

becomes this

just_a_few_underscores

as expected.

But this:

just_a_few_underscores. And here is the _emphasis_.

becomes:
justa _few_underscores. And here is emphasis.

Output html:

<p>just<em>a_few_underscores. And here is _emphasis</em>.</p>

Activity

  1. javoire commented on Sep 22, 2014

    @javoire

    +1

  2. tylercollier commented on Oct 21, 2014

    @tylercollier

    +1

  3. santhosh-tekuri commented on Feb 8, 2015

    @santhosh-tekuri

    +1

  4. suzanshakya commented on Aug 10, 2015

    @suzanshakya

    +1

  5. joshbruce commented on Apr 13, 2018

    @joshbruce
    Member

    Closing as covered by CommonMark compliance. See also #1106 and #1216

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions