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

Markdown parser cannot handle inline code in list items #960

Closed
yamalight opened this issue Oct 19, 2018 · 3 comments
Closed

Markdown parser cannot handle inline code in list items #960

yamalight opened this issue Oct 19, 2018 · 3 comments
Labels
area: publishing experience issues related to an authors experience publishing. Tags, series, etc. blocked blocked by internal or external issues bug always open for contribution

Comments

@yamalight
Copy link

Describe the bug

Trying to create a list items with inline code results either in broken rendering or in error thrown by parser.

To Reproduce

  1. Create new post
  2. Write a simple list, e.g.:
    1. some text
    2. some more text
    
  3. Preview - works as expected.
  4. Add code snippet to list, e.g.:
    1. some text
        ```
        some code here
        ```
    2. some more text
    
  5. Preview - will result in code snippet expanding to second list item
  6. Attempt to specify code langauge, e.g.:
    1. some text
        ```sh
        some code here
        ```
    2. some more text
    
  7. Preview - will result in following error:
1 error prohibited this article from being previewed:
Liquid syntax error: 'raw' tag was never closed

Expected behavior

List should render with code inlined with text (like here on github)

Desktop (please complete the following information):

  • OS: Win 10
  • Browser Chrome
  • Version 70
@maestromac maestromac added the bug always open for contribution label Oct 19, 2018
@maestromac
Copy link
Member

Thanks for reporting this @yamalight . This happening because our MarkdownParser is escaping all code-block with a {% raw %} to avoid being processed by LiquidTag. The escape process definitely the culprit.

@maestromac maestromac removed their assignment Jan 16, 2019
@aspittel aspittel self-assigned this Feb 14, 2019
@aspittel
Copy link
Contributor

After doing some debugging, this actually looks like an issue in RedCarpet -- vmg/redcarpet#664

@aspittel aspittel added the blocked blocked by internal or external issues label Feb 14, 2019
@jessleenyc jessleenyc added the area: publishing experience issues related to an authors experience publishing. Tags, series, etc. label Mar 26, 2019
@mstruve
Copy link
Contributor

mstruve commented Sep 30, 2020

Thank you so much for submitting this issue. Since it looks to be an issue with the redcarpet gem I am going to close this. Please reach out if you have any questions. Thanks!

@mstruve mstruve closed this as completed Sep 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: publishing experience issues related to an authors experience publishing. Tags, series, etc. blocked blocked by internal or external issues bug always open for contribution
Projects
None yet
Development

No branches or pull requests

5 participants