Repository navigation
fix: end blockquote before a lazy line after a heading, hr or html block - #4115
Merged
UziTech merged 1 commit intoOct 6, 2026
Merged
Conversation
|
@NgoQuocViet2001 is attempting to deploy a commit to the MarkedJS Team on Vercel. A member of the Team first needs to authorize it. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
github-actions Bot
pushed a commit
that referenced
this pull request
Oct 12, 2026
## [18.1.1](v18.1.0...v18.1.1) (2026-10-12) ### Bug Fixes * **cli:** honor an explicitly empty string input ([#4113](#4113)) ([ec3a4e5](ec3a4e5)) * end blockquote before a lazy line after a heading, hr or html block ([#4115](#4115)) ([9e64a6a](9e64a6a)) * keep a backslash in a code span from hiding emphasis ([#4117](#4117)) ([6a57018](6a57018)) * keep a decoded character reference from forming a new one ([#4111](#4111)) ([6bbac0c](6bbac0c)), closes [#38](#38) [#112](#112) * let indented and type 3-5 html blocks interrupt a paragraph ([#4124](#4124)) ([eaa1fff](eaa1fff)) * make walkTokens linear by appending values in place ([#4121](#4121)) ([627d9ae](627d9ae)), closes [#4120](#4120) * match pre, script, style and textarea as whole tag names ([#4114](#4114)) ([0db74cb](0db74cb)) * preserve enclosing link state after parsing images ([#4123](#4123)) ([cc07bb9](cc07bb9)) * respect tab stops in list continuation indentation ([#4119](#4119)) ([4bd2528](4bd2528)) ### Performance Improvements * avoid repeated raw string copies in nested lists ([#4082](#4082)) ([7e8754d](7e8754d))
This was referenced Oct 16, 2026
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Marked version: 18.0.14 (master c61543e)
Markdown flavor: CommonMark|GitHub Flavored Markdown
Description
A line without
>only continues a block quote when it is paragraph continuation text (CommonMark 5.1). Marked already ends the quote when the last token inside it is a code block. It does not do this after a heading, thematic break or HTML block, so the paragraph after one of those is pulled into the quote.This change adds
heading,hrandhtmlto the existingcodecheck inTokenizer.blockquote. The remaining lines are then left for the outer lexer, the same way the code case already works. Pedantic mode goes through the same path, so it changes too, as it already does for code. I can add a!this.options.pedanticguard if you'd rather keep Markdown.pl behavior there.Expectation
> # Note\nThis paragraph is not quoted.gives<blockquote><h1>Note</h1></blockquote><p>This paragraph is not quoted.</p>, matching commonmark.js and markdown-it.Result
<blockquote><h1>Note</h1><p>This paragraph is not quoted.</p></blockquote>. The same happens after> Foo\n> ---,> ***,> <div>and> <!-- c -->.What was attempted
marked.parse('> # Note\nThis paragraph is not quoted.'), with gfm on or off.Contributor
Committer
In most cases, this should be a different person than the contributor.