Skip to content
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

add plugin remark-shaku-code-annotate #1164

Closed
wants to merge 3 commits into from
Closed

Conversation

JSerZANP
Copy link

Initial checklist

  • I read the support docs
  • I read the contributing guide
  • I agree to follow the code of conduct
  • I searched issues and couldn’t find anything (or linked relevant results below)
  • If applicable, I’ve added docs and tests

Description of changes

Added remark-shaku-code-annotate to the plugin list.

shaku-code-annotate-screenshot

Signed-off-by: JSerDev <69352453+JSerZANP@users.noreply.github.com>
@github-actions github-actions bot added 👋 phase/new Post is being triaged automatically 🤞 phase/open Post is being triaged manually and removed 👋 phase/new Post is being triaged automatically labels May 17, 2023
Signed-off-by: JSerDev <69352453+JSerZANP@users.noreply.github.com>
@wooorm
Copy link
Member

wooorm commented May 17, 2023

Heya!

Your plugin does things with HTML.
remark is for markdown, rehype is for HTML. For more info, see each projects readme, or in short: https://github.com/remarkjs/remark-rehype#what-is-this.

You should create a rehype plugin instead of a remark plugin.
Now you are generating strings of HTML that we need to parse again, while the point of these projects is to use ASTs! Which is much quicker!

Signed-off-by: JSerDev <69352453+JSerZANP@users.noreply.github.com>
@JSerZANP
Copy link
Author

@wooorm

I see, thanks for the heads-up.
fyi, I'm following https://github.com/shikijs/twoslash/tree/main/packages/remark-shiki-twoslash

@JSerZANP JSerZANP closed this May 17, 2023
@JSerZANP JSerZANP deleted the patch-1 branch May 17, 2023 14:08
@github-actions

This comment has been minimized.

@wooorm
Copy link
Member

wooorm commented May 17, 2023

No worries!

That example isn’t very good. Here’s a better one: https://github.com/wooorm/starry-night#example-integrate-with-unified-remark-and-rehype

@wooorm wooorm added the 👀 no/external This makes more sense somewhere else label May 17, 2023
@github-actions github-actions bot added 👎 phase/no Post cannot or will not be acted on and removed 🤞 phase/open Post is being triaged manually labels May 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
👀 no/external This makes more sense somewhere else 👎 phase/no Post cannot or will not be acted on
Development

Successfully merging this pull request may close these issues.

None yet

2 participants