Skip to content

Isolate outline-playground eslint rules - #99

Merged
trueadm merged 1 commit into
mainfrom
use-cra-eslint-for-playground
Feb 17, 2021
Merged

trueadm merged 1 commit into
mainfrom
use-cra-eslint-for-playground

Conversation

@trueadm

@trueadm trueadm commented Feb 17, 2021

Copy link
Copy Markdown
Collaborator

outline-playground should use the CRA eslint rules, rather than that of the project itself.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Feb 17, 2021
@trueadm
trueadm merged commit e4a5a89 into main Feb 17, 2021
@trueadm
trueadm deleted the use-cra-eslint-for-playground branch February 17, 2021 14:54
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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants