Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strong element containing a single newline is not parsed correctly #519

Closed
emmerich opened this issue Jul 24, 2020 · 4 comments
Closed

Strong element containing a single newline is not parsed correctly #519

emmerich opened this issue Jul 24, 2020 · 4 comments
Labels
🤷 no/invalid This cannot be acted upon

Comments

@emmerich
Copy link

emmerich commented Jul 24, 2020

Subject of the issue

A strong tag containing a single newline character is not correctly parsed.

Your environment

  • OS: Catalina 10.15.5
  • Packages: remark-parse 8.0.2
  • Env: node v10.16.0

Steps to reproduce

Newline Example:

**
**

Expected behaviour

The AST should be parsed with an empty strong block.

Actual behaviour

The asterisks are interpreted as text themselves:

{
  "type": "root",
  "children": [
    {
      "type": "paragraph",
      "children": [
        {
          "type": "text",
          "value": "**\n**"
        }
      ]
    }
  ]
}
@emmerich emmerich added 🐛 type/bug This is a problem 🙉 open/needs-info This needs some more info labels Jul 24, 2020
@wooorm
Copy link
Member

wooorm commented Jul 24, 2020

Although some of our strong and emphasis parsing is broken, this is in fact expected behavior per CommonMark

@wooorm wooorm closed this as completed Jul 24, 2020
@wooorm wooorm added 🤷 no/invalid This cannot be acted upon and removed 🐛 type/bug This is a problem 🙉 open/needs-info This needs some more info labels Jul 24, 2020
@wooorm
Copy link
Member

wooorm commented Jul 24, 2020

I don‘t get strong emphasis here either:

**
**

(GFM is now based on CM)

@emmerich
Copy link
Author

I don‘t get strong emphasis here either:

**
**

(GFM is now based on CM)

(yes, apologies, deleted my comment after doing a bit more testing - seems it only works in some editors but it's not a standard)

@wooorm
Copy link
Member

wooorm commented Jul 24, 2020

Fwiw, GFM is based on CM for the last two years. Some markdown parsers (like remark) are in a transitional phase. #439

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤷 no/invalid This cannot be acted upon
Development

No branches or pull requests

2 participants