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

[Suggestion] support multi-line highlight in comments. #176

Open
fantasyz opened this issue Oct 9, 2021 · 6 comments
Open

[Suggestion] support multi-line highlight in comments. #176

fantasyz opened this issue Oct 9, 2021 · 6 comments
Assignees
Labels
enhancement Highlight Syntax highlight

Comments

@fantasyz
Copy link

fantasyz commented Oct 9, 2021

Can the lightlight of those TODO / NOTE in comments support multi-lines? e.g. detect an ending character such as '\' to extend the hightlight to the next line.

Below is an example that I want the highlight to be applied to all three lines.

devenv_8AZKdXLRei

@wmjordan
Copy link
Owner

wmjordan commented Oct 9, 2021

Thank you for posting this.
I also thought of this before.
I will see whether it is possible to implement that feature without big efforts.

@wmjordan wmjordan added enhancement Highlight Syntax highlight labels Oct 9, 2021
@wmjordan
Copy link
Owner

wmjordan commented Oct 9, 2021

Personally I don't like the extra "ending character" since it is ugly and unnatural.

If this feature is possible, I will love to try checking the indentation of those lines. As your screenshot shows, the second and the third lines have larger indentations. We can assume that they are following the first "note" by that.

@wmjordan
Copy link
Owner

wmjordan commented Oct 9, 2021

Personally I don't like the extra "ending character" since it is inconvenient and unnatural.

If this feature is possible, I will love to try checking the indentation of those lines. As your screenshot shows, the second and the third lines have larger indentations. We can assume that they are following the first "note" by that.

@fantasyz
Copy link
Author

fantasyz commented Oct 9, 2021

Indentation will do too.

Thanks in advance.

@wmjordan
Copy link
Owner

This issue has something to do with #178.
The underlying parser has to be rewritten, thus it can take some time.

@wmjordan
Copy link
Owner

Hmm, this enhancement turns out to be tough--it requires some algorithm to handle it and the current implementation is broken. I will release a new version soon and work on this afterwards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Highlight Syntax highlight
Projects
None yet
Development

No branches or pull requests

2 participants