Skip to content

refactor(CodeBlock): store lowlight instance in separate plugin state#1033

Merged
d3m1d0v merged 1 commit intomainfrom
codeblock-langs-refactor
Mar 27, 2026
Merged

refactor(CodeBlock): store lowlight instance in separate plugin state#1033
d3m1d0v merged 1 commit intomainfrom
codeblock-langs-refactor

Conversation

@d3m1d0v
Copy link
Copy Markdown
Member

@d3m1d0v d3m1d0v commented Mar 27, 2026

Summary

  • Extracted selectItems/mapping and lowlight instance from closure-scoped variables in CodeBlockHighlight into a dedicated codeBlockLangsPlugin with proper ProseMirror state management
  • Renamed selectItemslangItems, mappingaliasMapping
  • TooltipPlugin now reads lang data from editor state via getCodeBlockLangsState() instead of receiving it through closure parameters

@gravity-ui
Copy link
Copy Markdown

gravity-ui bot commented Mar 27, 2026

Storybook Deployed

@gravity-ui
Copy link
Copy Markdown

gravity-ui bot commented Mar 27, 2026

🎭 Playwright Report

@d3m1d0v d3m1d0v changed the title refactor(CodeBlock): store lowlight instance in separate plugin's state refactor(CodeBlock): store lowlight instance in separate plugin state Mar 27, 2026
@d3m1d0v d3m1d0v force-pushed the codeblock-langs-refactor branch from 3bbc356 to 99e2958 Compare March 27, 2026 12:05
@d3m1d0v d3m1d0v marked this pull request as ready for review March 27, 2026 12:09
@d3m1d0v d3m1d0v requested a review from makhnatkin as a code owner March 27, 2026 12:09
@d3m1d0v d3m1d0v merged commit 1dd60c6 into main Mar 27, 2026
7 of 8 checks passed
@d3m1d0v d3m1d0v deleted the codeblock-langs-refactor branch March 27, 2026 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants