-
Notifications
You must be signed in to change notification settings - Fork 3.7k
bug(bash) Options (like -lt
etc) just don't work and it looks like they never did.
#2673
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
Comments
-lt
etc) just don't work and it looks like they never did. That's because \b
(word boundary) doesn't treat hyphens as a part of a word. We have to replace \b
with explicit definition of a boundary.-lt
etc) just don't work and it looks like they never did.
I don't mind that... it's a neat trick for relevance boosting with keywords. I'm also fine with formalizing/documenting it it so that
Ah, which we have no GREAT way to do currently without look-behind I don't think? |
Potentially related: #2429 |
If the goal was just to fix this they could be be moved into a normal rule and removed from keywords... and the normal rule would match |
Just chiming in since I cared about a related issue: I'd say it's not at all obvious that highlighting these terms is desirable.
I'm also a bit surprised by the set of options in that list? It seems like a smattering of options from |
They were never intended to be highlighted (sorry if I implied that before), hence
It makes the language "more likely" to be detected as Bash (vs say C++) for the auto-detect system.
Because it's never worked properly evidentially so hence it currently effects nothing. :-)
Indeed. Whether or not to delete this and just forget it ever existed is not a terrible question to be asking. :) |
@egor-rogov I vote to remove [for now] since we don't have sufficient (deep) tests to guarantee even if we fixed this it would even be a real improvement (in detecting Bash) as it seems like there are tons of possibilities for false positives. Thoughts? |
@joshgoebel +1 to remove. |
Hmm... Options (like
-lt
etc) just don't work and it looks like they never did. That's because\b
(word boundary) doesn't treat hyphens as a part of a word. We have to replace\b
with explicit definition of a boundary.On the other hand, if we do, we'll get rather ugly elements like
<span class="hljs-_">...</span>
, which was supposed, as I understand, as relevance boosters. But do we really what it?Originally posted by @egor-rogov in #2669 (comment)
Sample:
The text was updated successfully, but these errors were encountered: