Skip to content

Parsing inline code with "\n " loses both newline and space #661

@mgeisler

Description

@mgeisler

Events from pulldown-cmark:

"`\n `f " -> [
  Start(Paragraph)
    Code(Borrowed(""))
    Text(Borrowed("f"))
  End(Paragraph)
]

Events from commonmark.js:

"`\n `f " -> [
  Start(Paragraph)
    Code(Boxed(" "))
    Text(Boxed("f "))
  End(Paragraph)
]

XML from commonmark.js:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE document SYSTEM "CommonMark.dtd">
<document xmlns="http://commonmark.org/xml/1.0">
  <paragraph>
    <code> </code>
    <text>f</text>
  </paragraph>
</document>

This might be the same as #655, but here it looks like "`\n `" is turned into "", which means that both the space and the newline got lost.

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