I already wrote about this issue for version v11.11.1, the issue was closed, but the bug still remains.
Wrong recognition of symbols Ruby at the place of calling a class methods.
Class methods may be call via:
ClassName::method
but it recognized as symbol :method, also now ClassName: reconized as a symbol.
Which language seems to have the issue?
Ruby
Are you using highlight or highlightAuto?
document.querySelectorAll('pre').forEach((el) => {
hljs.highlightElement(el);
});
Sample Code to Reproduce
:symbol
symbol:
A::a - call class method
To fix the bug:
Just replace
':(?!\\s)' to '(?<!:):(?!\\s)'
and
'(!|\\?)?:' to '(!|\\?)?:(?!:)'
Is it really that hard to do? The bug came from the previous version and was not fixed.
I already wrote about this issue for version v11.11.1, the issue was closed, but the bug still remains.
Wrong recognition of symbols Ruby at the place of calling a class methods.
Class methods may be call via:
ClassName::methodbut it recognized as symbol
:method, also nowClassName:reconized as a symbol.Which language seems to have the issue?
Ruby
Are you using
highlightorhighlightAuto?Sample Code to Reproduce
:symbolsymbol:A::a- call class methodTo fix the bug:
Just replace
':(?!\\s)'to'(?<!:):(?!\\s)'and
'(!|\\?)?:'to'(!|\\?)?:(?!:)'Is it really that hard to do? The bug came from the previous version and was not fixed.