Skip to content

line highlighting: v3 matching algorithm will not match bare comments #1006

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

Open
4 of 5 tasks
teamdandelion opened this issue May 2, 2025 · 0 comments
Open
4 of 5 tasks

Comments

@teamdandelion
Copy link

Validations

Describe the bug

Consider the following python code snippet (I've substituted ' for ` for clarity)

'''python
# This comment is unimportant
# This comment is important, and should be highlighted! # [!code highlight]
'''

Or the following:

'''python{2}
# This comment is unimportant
# This comment is important, and should be highlighted!
'''

In the v3 algorithm, in both cases, it will not highlight the second line. Instead, it will append an extra # symbol at the end of the line.

Using the v1 algorithm, it correctly highlights both lines.

Reproduction

Included; see description

Contributes

  • I am willing to submit a PR to fix this issue
  • I am willing to submit a PR with failing tests
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

No branches or pull requests

1 participant