simple-markdown icon indicating copy to clipboard operation
simple-markdown copied to clipboard

Question: Markdown Lists

Open gkartalis opened this issue 4 years ago • 0 comments

Hi! :wave: 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 🤔.

gkartalis avatar Dec 17 '21 09:12 gkartalis