Skip to content

Text after an empty nested blockquote is dropped (18.0.9+) #4098

Closed
Yahiro025/marked
#1

Description

@robbertbos

Marked version: 18.0.9 through 18.0.13 (18.0.8 is fine)

Describe the bug
Text on the line after an empty nested blockquote is dropped from the output, with default options.

To Reproduce

  1. Marked Demo
  2. CommonMark Demo

marked.parse('>>\ntext') in 18.0.8, matching the dingus:

<blockquote>
<blockquote>
</blockquote>
</blockquote>
<p>text</p>

In 18.0.9 to 18.0.13:

<blockquote>
<blockquote>
</blockquote>
</blockquote>

Same for >>>\ntext and > quote\n>>\ntext. With >>\ntext\n> more, the following > more blockquote disappears as well.

Expected behavior
The empty nested blockquote closes and text becomes a paragraph after it, as in CommonMark and 18.0.8.

This looks like it comes from #4030: the continuation branch in Tokenizer.blockquote() now appends every continuation line to raw, also when the re-tokenized nested blockquote did not consume them, so the lexer skips past text no token holds. Reverting that commit brings the paragraph back. I have a small fix with a spec test in test/specs/new/ and would be glad to open a PR if that is welcome.

Activity

  1. UziTech commented on Sep 19, 2026

    @UziTech
    Member

    Ya PRs are always welcome 😁👍

  2. dyk1454683243-sudo commented on Sep 20, 2026

    @dyk1454683243-sudo

    Taking this: empty nested blockquotes dropping following text (>>\ntext and the related cases). I'll open a focused PR against master unless someone already has a Fixes PR in flight.

  3. added
    L2 - annoyingSimilar to L1 - broken but there is a known workaround available for the issue
    on Sep 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    L2 - annoyingSimilar to L1 - broken but there is a known workaround available for the issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions