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

doc: use the correct way to check comment block #1354

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Kaiser-Yang
Copy link
Contributor

Using node:type() do not work as expected, sometimes, the type will go with a "chunk" or even empty string, we must iterate the node of current line to check if current line is inside a comment block. Besides, in the code, there is no ctx passed to the default function, just remove the parameter in the doc.

Using node:type() do not work as expected, sometimes, the type will go
with a "chunk" or even empty string, we must iterate the node of current
line to check if current line is inside a comment block. Besides, in the
code, there is no `ctx` passed to the default function, just remove the
parameter in the doc.
@Kaiser-Yang
Copy link
Contributor Author

Kaiser-Yang commented Feb 28, 2025

This works fine.

In non-comment context:

image

After I add --:

image

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.

1 participant