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

Question: Markdown Lists #112

Open
gkartalis opened this issue Dec 17, 2021 · 0 comments
Open

Question: Markdown Lists #112

gkartalis opened this issue Dec 17, 2021 · 0 comments

Comments

@gkartalis
Copy link

Hi! 👋
I work in a project that uses simple-markdown as a dependency.

I noticed the following:

When we have a paragraph with more than a sentence that starts with a - like:

- Hey, I am not exactly an unordered list! I am a weird case, that might cause problems in the expected behaviour.

the output of parserFor(rules) is the following:

const ast = [
  {
    "ordered": false,
    "items": [
      [
        {
          "content": "Hey",
          "type": "text"
        },
        {
          "content": ", I am not exactly an unordered list",
          "type": "text"
        },
        {
          "content": "! I am a weird case",
          "type": "text"
        },
        {
          "content": ", that might cause problems in the expected behaviour",
          "type": "text"
        },
        {
          "content": ".",
          "type": "text"
        }
      ]
    ],
    "type": "list"
  }
]

**Question: ** Is this the expected behaviour?

Then we try to use outputFor and it throws an error here

simulator_screenshot_2558BE1D-68A4-40E3-8849-E865496BC6E2

Which looks like a bug to me 🤔.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant