Repository navigation
Conversation
kevin9327
requested review from
acywatson,
etrepum,
ivailop7,
potatowagon and
zurfyx
as code owners
October 29, 2026 21:32
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
lexical
@lexical/a11y
@lexical/clipboard
@lexical/code
@lexical/code-core
@lexical/code-prism
@lexical/code-shiki
@lexical/compiler
@lexical/devtools-core
@lexical/dragon
@lexical/eslint-plugin
@lexical/extension
@lexical/fast-check
@lexical/file
@lexical/hashtag
@lexical/headless
@lexical/history
@lexical/html
@lexical/internal
@lexical/link
@lexical/list
@lexical/mark
@lexical/markdown
@lexical/mdast
@lexical/offset
@lexical/overflow
@lexical/plain-text
@lexical/react
@lexical/rich-text
@lexical/selection
@lexical/table
@lexical/tailwind
@lexical/text
@lexical/utils
@lexical/y
@lexical/yjs
commit: |
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.
Description
In CommonMark an ATX heading can end with a closing sequence of
#characters. That sequence is not part of the heading text (example 71):## Hello world ##renders as
<h2>Hello world</h2>.$convertFromMarkdownStringkeeps the#s as text instead. So in the editor the heading reads "Hello world ##", with the closing#s shown as part of the title.On import,
HEADING.replacenow strips a trailing closing sequence from the heading's text: one or more#, optionally followed by spaces or tabs. As the spec requires, the sequence must be preceded by a space or tab, so# Hello C#keeps its#. The typing shortcut (isImport === false) is unchanged.Test plan
New cases in
LexicalMarkdown.test.ts:## Hello world ##imports as an h2 readingHello world.# Hello world #####(longer sequence plus trailing spaces) imports as an h1 readingHello world.# Hello C#still imports asHello C#and round-trips.Before
After
Prettier, ESLint and
tsc --noEmitare clean.AI-assisted: I directed the investigation and reviewed and verified the change myself.