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

[Question] Different blockquote lex result when nesting inside a list #2670

Closed
Bistard opened this issue Nov 29, 2022 · 1 comment · Fixed by #2671
Closed

[Question] Different blockquote lex result when nesting inside a list #2670

Bistard opened this issue Nov 29, 2022 · 1 comment · Fixed by #2671
Labels
category: mixed content L2 - annoying Similar to L1 - broken but there is a known workaround available for the issue

Comments

@Bistard
Copy link

Bistard commented Nov 29, 2022

**Marked version: 4.0

Describe the bug
Given the following plain text:

> This is a blockquote line 1
1. > This is a nested blockquote inside an ordrered list.

The following data is the lexing result that I copied from the marked demo website:

[
{type:"blockquote", raw:"> This is a blockquote line 1\n", tokens:[
  {type:"paragraph", raw:"This is a blockquote line 1\n", text:"This is a blockquote line 1", tokens:[
    {type:"text", raw:"This is a blockquote line 1", text:"This is a blockquote line 1"}
]}
], text:"This is a blockquote line 1\n"}
{type:"list", raw:"1. > This is a nested blockquote inside an ordrered list.", ordered:true, start:1, loose:false, items:[
  {type:"list_item", raw:"1. > This is a nested blockquote inside an ordrered list.", task:false, checked:undefined, loose:false, text:"> This is a nested blockquote inside an ordrered list.", tokens:[
    {type:"blockquote", raw:"> This is a nested blockquote inside an ordrered list.", tokens:[
      {type:"text", raw:"This is a nested blockquote inside an ordrered list.", text:"This is a nested blockquote inside an ordrered list.", tokens:[
        {type:"text", raw:"This is a nested blockquote inside an ordrered list.", text:"This is a nested blockquote inside an ordrered list."}
]}
], text:"This is a nested blockquote inside an ordrered list."}
]}
]}
]

Why does the blockquote in the first part lex the inner text as paragraph, but the second blockquote that is nested in the list lex the inner text as text? I am not sure if this is supposed to be the expected behavior.

To Reproduce
Steps to reproduce the behavior: Copys the given plain text to the marked demo website.

@UziTech UziTech added L2 - annoying Similar to L1 - broken but there is a known workaround available for the issue category: mixed content labels Nov 30, 2022
@UziTech
Copy link
Member

UziTech commented Nov 30, 2022

Nice catch! 💯

This should be fixed in #2671

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: mixed content L2 - annoying Similar to L1 - broken but there is a known workaround available for the issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants