content icon indicating copy to clipboard operation
content copied to clipboard

un ordered list in markdown files are not closed propory,

Open cpt-n3mo opened this issue 3 years ago • 1 comments

Environment

Nuxt project info:



Reproduction

see below

Describe the bug

when one creates a component with multiple slots, and one passes a list to these slots from a markdown file. the second and following slots do not start correctly as the list is not closed.

::split
#left
- item1
- item2

#right 
- item3
- item4
::

#right will cause a error

Additional context

No response

Logs

[nuxt] [request error] [unhandled] [500] Cannot close `componentContainerSection` (15:2-22:1): a different token (`listItem`, 19:1-22:8) is open
  at Object.defaultOnError (./node_modules/mdast-util-from-markdown/lib/index.js:1214:11)  
  at Object.exit (./node_modules/mdast-util-from-markdown/lib/index.js:616:17)  
  at Object.exitContainerSection (./node_modules/remark-mdc/dist/index.mjs:416:8)  
  at compile (./node_modules/mdast-util-from-markdown/lib/index.js:302:40)  
  at fromMarkdown (./node_modules/mdast-util-from-markdown/lib/index.js:120:29)  
  at parser (./node_modules/remark-parse/lib/index.js:15:12)  
  at Function.parse (./node_modules/unified/lib/index.js:273:12)  
  at executor (./node_modules/unified/lib/index.js:393:31)  
  at Function.process (./node_modules/unified/lib/index.js:383:5)  
  at ./.nuxt/dev/index.mjs:1731:12

cpt-n3mo avatar Sep 21 '22 13:09 cpt-n3mo

Well its ever worse the following does not work either

::split
- item1
- item2

#right 
- item3
- item4
::

nor

::split
- item1
- item2
some other stuff

#right 
- item3
- item4
::

it seems this also happens with the default slot. anytime a unorderd list is used its not closed properly . while ordered lists seems to work fine

cpt-n3mo avatar Sep 21 '22 13:09 cpt-n3mo

anyone know if there is a version that did not have this prob, so i can revert to that version.? im now using a component to make my lists but this is less then ideal,..

cpt-n3mo avatar Sep 24 '22 10:09 cpt-n3mo

any progress on this ..?

cpt-n3mo avatar Sep 29 '22 10:09 cpt-n3mo

Is this an issue with only MDC or even with normal syntax, this doesn't work?

ManasMadrecha avatar Sep 29 '22 10:09 ManasMadrecha

not sure what you mean by normal syntax, but if you mean if you can use lists inside of markdown files then yeh, it just does not work when one wraps it in a component

cpt-n3mo avatar Sep 29 '22 10:09 cpt-n3mo

By normal syntax, I meant, using HTML syntax for the components, and not the MDC.

ManasMadrecha avatar Sep 29 '22 10:09 ManasMadrecha

then yeh that works without a problem ..

cpt-n3mo avatar Sep 30 '22 00:09 cpt-n3mo