Skip to content

Enable CodeHighlightNode to hold token metadata - #3376

Closed
saint1991 wants to merge 1 commit into
meta:mainfrom
saint1991:feature/meta-codehighlightnode
Closed

saint1991 wants to merge 1 commit into
meta:mainfrom
saint1991:feature/meta-codehighlightnode

Conversation

@saint1991

@saint1991 saint1991 commented Nov 18, 2022 •

Copy link
Copy Markdown
Contributor

Tokenize process sometimes produces some other metadata than the token type.
For example, which 2 tokens are pair of braces.

To enable keeping such information at CodeHighlightNode adds a field to hold serializable metadata.

TODO

  • test

@vercel

vercel Bot commented Nov 18, 2022 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
lexical ✅ Ready (Inspect) Visit Preview Nov 23, 2022 at 2:36PM (UTC)
lexical-playground ✅ Ready (Inspect) Visit Preview Nov 23, 2022 at 2:36PM (UTC)

@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 Nov 18, 2022
@saint1991
saint1991 force-pushed the feature/meta-codehighlightnode branch from b2ff592 to 331736d Compare November 19, 2022 23:31
@saint1991
saint1991 force-pushed the feature/meta-codehighlightnode branch from 331736d to 6d28fe6 Compare November 20, 2022 01:57
@saint1991
saint1991 force-pushed the feature/meta-codehighlightnode branch from 6d28fe6 to 1ab7037 Compare November 20, 2022 06:21
@saint1991
saint1991 force-pushed the feature/meta-codehighlightnode branch from 1ab7037 to e82f98f Compare November 20, 2022 06:47
@saint1991
saint1991 force-pushed the feature/meta-codehighlightnode branch from e82f98f to 24ec420 Compare November 20, 2022 08:04
@saint1991
saint1991 force-pushed the feature/meta-codehighlightnode branch from 24ec420 to 7c460ba Compare November 20, 2022 08:43
@saint1991
saint1991 force-pushed the feature/meta-codehighlightnode branch from 7c460ba to 700e710 Compare November 20, 2022 09:14
@saint1991
saint1991 force-pushed the feature/meta-codehighlightnode branch from 78695b4 to d211c0d Compare November 20, 2022 12:19
@saint1991
saint1991 force-pushed the feature/meta-codehighlightnode branch from d211c0d to 6061134 Compare November 20, 2022 13:00
@saint1991
saint1991 force-pushed the feature/meta-codehighlightnode branch from 6061134 to 91fca7f Compare November 20, 2022 13:19
@saint1991
saint1991 force-pushed the feature/meta-codehighlightnode branch from 91fca7f to f046c76 Compare November 20, 2022 14:27
@saint1991
saint1991 force-pushed the feature/meta-codehighlightnode branch from f4c3793 to 329c183 Compare November 21, 2022 14:53
@saint1991 saint1991 changed the title WIP: Enable CodeHighlightNode to hold token metadata and selected attribute WIP: Enable CodeHighlightNode to hold token metadata. Nov 21, 2022
@saint1991 saint1991 changed the title WIP: Enable CodeHighlightNode to hold token metadata. WIP: Enable CodeHighlightNode to hold token metadata Nov 21, 2022
@saint1991
saint1991 force-pushed the feature/meta-codehighlightnode branch from 329c183 to bea80c4 Compare November 23, 2022 14:28
@saint1991 saint1991 changed the title WIP: Enable CodeHighlightNode to hold token metadata Enable CodeHighlightNode to hold token metadata Nov 23, 2022
@thegreatercurve

Copy link
Copy Markdown
Contributor

Thanks for the contribution @saint1991!

Unfortunately, I don't think this is really needed any more with the introduction of allowing users to replace core nodes themselves #3367. This should give you the ability to create your own node from CodeNode and then add in any additional serialisable data.

This branch was successfully deployed

2 active deployments
Preview – lexical-playground — 114feaac Deployed Nov 23, 2022 by vercel[bot]
Preview – lexical — 114feaac Deployed Nov 23, 2022 by vercel[bot]
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.

3 participants