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

un ordered list in markdown files are not closed propory, #1546

Closed
cpt-n3mo opened this issue Sep 21, 2022 · 7 comments · Fixed by nuxtlabs/remark-mdc#52 or #1627
Closed

un ordered list in markdown files are not closed propory, #1546

cpt-n3mo opened this issue Sep 21, 2022 · 7 comments · Fixed by nuxtlabs/remark-mdc#52 or #1627

Comments

@cpt-n3mo
Copy link

Environment

Nuxt project info:


  • Operating System: Linux
  • Node Version: v18.7.0
  • Nuxt Version: 3.0.0-rc.11
  • Nitro Version: 0.5.4
  • Package Manager: yarn@1.22.19
  • Builder: vite
  • User Config: modules
  • Runtime Modules: @nuxt/content@2.1.1, @nuxtjs/tailwindcss@5.3.3
  • Build Modules: -

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
Copy link
Author

cpt-n3mo commented Sep 21, 2022

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 cpt-n3mo changed the title multiple slots with lists do not work un ordered list in markdown files are not closed propory, Sep 21, 2022
@cpt-n3mo
Copy link
Author

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
Copy link
Author

any progress on this ..?

@ManasMadrecha
Copy link

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

@cpt-n3mo
Copy link
Author

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

@ManasMadrecha
Copy link

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

@cpt-n3mo
Copy link
Author

then yeh that works without a problem ..

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