Repository navigation
Conversation
## Description Markdown import leaves valid hexadecimal numeric character references literal in text and link fields. Decode decimal and hexadecimal references alongside backslash escapes in one pass, so escaped ampersands remain literal and replacement text is not scanned again. Closes meta#9469 ## Test plan ### Before `pnpm exec vitest run packages/lexical-markdown/src/__tests__/unit/LexicalMarkdown.test.ts --project unit -t 'hexadecimal character references'` with the original `utils.ts`: `Tests 7 failed | 2 passed | 610 skipped (619)` `Expected: "aAb"` `Received: "aAb"` ### After `pnpm exec vitest run packages/lexical-markdown/src/__tests__/unit/LexicalMarkdown.test.ts --project unit`: `Test Files 1 passed (1)` `Tests 619 passed (619)` `pnpm exec prettier --check` and `pnpm exec eslint` on both changed files passed.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Hi @Vl4dC! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks! |
|
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks! |
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/yjs
commit: |
|
Superseded by #9481 |
Description
@lexical/markdowncurrently leaves hexadecimal numeric character references such asAliteral during import, including in link destinations and titles. Decode them alongside decimal references and backslash escapes in a single pass. The single pass also keeps escaped ampersands literal and avoids rescanning an ampersand produced by a reference.Closes #9469
Test plan
Before
pnpm exec vitest run packages/lexical-markdown/src/__tests__/unit/LexicalMarkdown.test.ts --project unit -t 'hexadecimal character references'with the originalutils.ts:After
pnpm exec vitest run packages/lexical-markdown/src/__tests__/unit/LexicalMarkdown.test.ts --project unit:pnpm exec prettier --checkandpnpm exec eslintpassed for both changed files. The commit hook also ran Prettier and ESLint successfully.