Skip to content

refactor: use shiki transformerMetaHighlight to do meta highlight #4705

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 5 commits into from

Conversation

Fro-Q
Copy link

@Fro-Q Fro-Q commented Apr 20, 2025

Description

  1. Fix the braces removal behavior at src/node/markdown/plugins/highlightLines.ts:

token.info += ' ' + lines

  1. Use shiki's transformerMetaHighlight to implement line highlighting with meta string.

Linked Issues

fixes #4704

@Fro-Q
Copy link
Author

Fro-Q commented Apr 23, 2025

This is way more complicated than i expected. The use of markdown-it-attr makes it hard to handle meta with multiple {number} notation. I'll close this PR and create a new one once i manage it.

@Fro-Q Fro-Q closed this Apr 23, 2025
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 1, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

use a meta string to highlight lines
1 participant