Repository navigation
Isolate outline-playground eslint rules - #99
Merged
Merged
Conversation
acywatson
pushed a commit
that referenced
this pull request
Apr 9, 2022
etrepum
added a commit
to etrepum/lexical
that referenced
this pull request
Oct 27, 2026
…wn syntax ## Description Markdown export escapes harmless punctuation and emits unnecessary references around formatting changes. Check the emitted syntax before retaining literal escapes, and repair actual emphasis and strikethrough delimiter boundaries. Keep real links and opaque transformer output intact, including document-wide reference definitions. Use CommonMark Unicode punctuation rules consistently when importing formatting. ## Test plan ### Before Exporting bold text around an inline code span produced: ```markdown **&meta#97;`b`&meta#99;** ``` Plain text exports included `AT\&T`, `a \< b`, and `\[label\]`. ### After The corresponding exports are `**a`b`c**`, `AT&T`, `a < b`, and `[label]`. All 15 changed existing output expectations preserve full GFM text, formatting, link and block semantics. ``` vitest run --project unit --project scripts-unit packages/lexical-markdown scripts/__tests__/unit/treeShakingSource.test.ts --maxWorkers=1 Test Files 10 passed (10) Tests 1263 passed (1263) vitest run --project browser packages/lexical-markdown/src/__tests__/browser packages/lexical-playground/src/__tests__/browser/MarkdownInlineShortcuts.test.ts Test Files 3 passed (3) Tests 43 passed (43) ``` Chromium used the system browser. Firefox, WebKit, packed npm and www builds were not rerun locally for this follow-up. Source and test TypeScript checks, ESLint and Prettier pass.
etrepum
pushed a commit
to etrepum/lexical
that referenced
this pull request
Oct 30, 2026
…d reference letters around an underscore between letters ## Description The importer's rule of 3 had been changed to refuse a pairing only when both the original and the remaining run lengths refuse it. That let a leftover `**` from a mixed `***` run pair with a later `*`, so Lexical's own export of italic `)`, bold `(` and bold italic `)`, `*)***(*)***`, re-imported as three italics and a literal `**`. Main read it back exactly. This restores main's remaining-length rule (meta#4895). Split text still gets the character beyond a cut delimiter run, and that walk now stops at an escaped delimiter. The exporter decided whether a character reference helps by flanking alone, which ignores that `_` cannot open or close between two letters. With underscore italics, plain `a`, italic `b` and plain `c` exported as `a_b_c` and imported as plain text. The decision now uses the same emphasis rules as import, so it exports `&meta#97;_b_&meta#99;` and round-trips. The importer also uses the shared `isEscaped` from utils instead of two local copies. ## Test plan ### Before ``` $ npx vitest run packages/lexical-markdown/src/__tests__/unit/LexicalMarkdown.test.ts -t "between punctuation" × round-trips italic then bold italic between punctuation Tests 1 failed | 734 skipped (735) $ npx vitest run packages/lexical-markdown/src/__tests__/unit/LexicalMarkdown.test.ts -t "underscore italic between letters" × writes references around an underscore italic between letters Tests 1 failed | 735 skipped (736) ``` ### After ``` $ npx vitest run packages/lexical-markdown packages/lexical-mdast scripts/__tests__/unit/treeShakingSource.test.ts Test Files 18 passed (18) Tests 1571 passed (1571) ``` 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.
outline-playgroundshould use the CRA eslint rules, rather than that of the project itself.