Repository navigation
Merged
Conversation
Contributor
Author
I don't actually even think this is how it will stay. The right strategy probably has to do with scanning for word boundaries ( |
11 tasks done
luantaraschi
added a commit
to luantaraschi/lexical
that referenced
this pull request
Aug 24, 2026
…aracter reference A raw destination ends at whitespace and the pointy form is defined without a line ending, so a URL holding one had no spelling at all. Export wrote it literally, which left a destination no reader can close and split the paragraph in two, on `main` as much as here. It goes out as `&meta#13;` and `&meta#10;` instead, which `unescapeText` already decodes, so the URL survives the round trip and a CommonMark reader gets the same one back. `mdast-util-to-markdown` writes the same destination in its hexadecimal spelling.
etrepum
pushed a commit
to clean99/lexical
that referenced
this pull request
Oct 29, 2026
…g, add changeset ## Description On top of the line-ending fix for link titles, `LINK.export` escaped the destination and the title with the same three steps written out twice: character references, the shape's own syntax characters, then line endings as `&meta#13;`/`&meta#10;`. They now go through one `escapeLinkPart(value, syntax)` helper, so the destination and title can't drift apart again, and the comment that explained line endings for the destination alone now covers both. Output is unchanged from the previous commit. Also adds the changeset for the title fix, with a `Verify:` paragraph since exported Markdown changes for titles that contain a line ending. ## Changeset `.changeset/escape-line-endings-in-link-titles.md`: `[fix]` for `@lexical/markdown`, with `Verify:`. ## Test plan ### After ``` $ vitest run --project unit packages/lexical-markdown Test Files 9 passed (9) Tests 785 passed (785) $ pnpm run check-changesets Changeset check passed: 6 pending changeset(s) valid. ``` Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.
Fixes #9.
Repro: Delete from end of line using option-delete.
Before:
Screen.Recording.2021-01-19.at.6.44.59.PM.mov
After:
Screen.Recording.2021-01-19.at.6.45.19.PM.mov