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

gatsby-plugin-mdx: newline in the list causes whole list (at 3 or deeper indentation levels) rendered as code #28813

Closed
Stvad opened this issue Jan 2, 2021 · 7 comments
Labels
type: bug An issue or pull request relating to a bug in Gatsby type: upstream Issues outside of Gatsby's control, caused by dependencies

Comments

@Stvad
Copy link

Stvad commented Jan 2, 2021

Description

When rendering markdown newline in the list causes whole list (at 3 or deeper indentation levels) rendered as code

Steps to reproduce

Try rendering the following markdown:

- lists
- are
  - awesome
  - the
    - deeper
the better
    - but they don't work :(

Expected result

As rendered here and in any other place I tried - the newline is interpreted as continuation of the given list item:

  • lists
  • are
    • awesome
    • the
      • deeper
        the better
      • but they don't work :(

Actual result

Parts of the list indented further then 4 spaces rendered as code

image

Environment

  System:
    OS: macOS 10.15.7
    CPU: (8) x64 Intel(R) Core(TM) i7-8569U CPU @ 2.80GHz
    Shell: 5.7.1 - /bin/zsh
  Binaries:
    Node: 15.5.0 - ~/.nvm/versions/node/v15.5.0/bin/node
    Yarn: 1.22.10 - /usr/local/bin/yarn
    npm: 7.3.0 - ~/.nvm/versions/node/v15.5.0/bin/npm
  Languages:
    Python: 3.8.5 - /Users/sitalov/.pyenv/shims/python
  Browsers:
    Chrome: 87.0.4280.88
    Firefox: 84.0
    Safari: 14.0.2
  npmPackages:
    gatsby: ^2.21.37 => 2.29.3 
  npmGlobalPackages:
    gatsby-cli: 2.16.2
    gatsby-source-roamresearch: 0.4.1
    gatsby: 2.29.3

@Stvad Stvad added the type: bug An issue or pull request relating to a bug in Gatsby label Jan 2, 2021
@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Jan 2, 2021
@LekoArts LekoArts added status: needs reproduction This issue needs a simplified reproduction of the bug for further troubleshooting. and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels Jan 5, 2021
@LekoArts
Copy link
Contributor

LekoArts commented Jan 5, 2021

Hi!

Sorry to hear you're running into an issue. To help us best begin debugging the underlying cause, it is incredibly helpful if you're able to create a minimal reproduction. This is a simplified example of the issue that makes it clear and obvious what the issue is and how we can begin to debug it.

If you're up for it, we'd very much appreciate if you could provide a minimal reproduction and we'll be able to take another look.

Thanks for using Gatsby! 💜

@LekoArts
Copy link
Contributor

Hi!

Since we didn't receive an answer for 7 business days or more about the ask of a reproduction I'm going to close this now, as we can't do much to help without a reproduction. If you are able to create a minimal reproduction for this then please do answer here or reopen the issue. Thanks!

@Stvad
Copy link
Author

Stvad commented Jan 15, 2021

Hi, it does not seem possible for me to reopen the issue :(
I'll look into creating the min reproduction, but I felt like this has a very simple example attached. Is there anything unclear in issue description?

@LekoArts LekoArts reopened this Jan 15, 2021
@LekoArts
Copy link
Contributor

gatsby-plugin-mdx has many moving pieces and you can add any amount of plugins to it. You're also using gatsby-source-roamresearch which could also mess things up. This could also be just how the underlying libraries parse it, e.g. if you would indent the "the better" it might work. Thus a minimal reproduction is needed.

@Stvad
Copy link
Author

Stvad commented Jan 16, 2021

please find reproduction in https://github.com/Stvad/repro-28813

@Stvad
Copy link
Author

Stvad commented Jan 25, 2021

@LekoArts did you have a chance to look at it?

@ascorbic
Copy link
Contributor

ascorbic commented Jan 28, 2021

Hi. This seems to be an upstream issue with MDX. Take a look at your code in the playground: https://mdxjs.com/playground
Markdown syntax varies between parsers, and it seems the MDX parser doesn't like this syntax, even though other parsers allow it.

@ascorbic ascorbic added type: upstream Issues outside of Gatsby's control, caused by dependencies and removed status: needs reproduction This issue needs a simplified reproduction of the bug for further troubleshooting. labels Jan 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug An issue or pull request relating to a bug in Gatsby type: upstream Issues outside of Gatsby's control, caused by dependencies
Projects
None yet
Development

No branches or pull requests

3 participants