We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the issue
This is valid C++ syntax:
template<typename... T> void foo(const T &... args) {}
Yet, when highlighting with highlight, the returned object's illegalBy.msg is Illegal lexeme "." for mode "function".
highlight
illegalBy.msg
Illegal lexeme "." for mode "function"
Which language seems to have the issue?
cpp
Are you using highlight or highlightAuto?
highlightAuto
Sample Code to Reproduce
Here's a modified version of the example JSFiddle: https://jsfiddle.net/dueh84nq/1/ - I changed it to display the illegal/illegalBy values.
Expected behavior
Since the syntax is legal, I would expect it to be highlighted somehow, not rejected as illegal.
Additional context
Here's some info on C++'s parameter packs: https://en.cppreference.com/w/cpp/language/parameter_pack
The text was updated successfully, but these errors were encountered:
// only allow /[\w\s\*&:<>]/ illegal: /[^\w\s\*&:<>]/,
Dropping . into this list of what is allowed (since it's negated) would likely resolved. Want to try making a PR?
.
Sorry, something went wrong.
enh(cpp) fix variadic functions
cad43bc
Fixes highlightjs#2917
enh(cpp) support parameter packs in function decls
6477966
6f56b87
enh(cpp) support parameter packs in function decls (#2918)
1846044
Resolves #2917.
Successfully merging a pull request may close this issue.
Describe the issue
This is valid C++ syntax:
Yet, when highlighting with
highlight
, the returned object'sillegalBy.msg
isIllegal lexeme "." for mode "function"
.Which language seems to have the issue?
cpp
Are you using
highlight
orhighlightAuto
?highlight
Sample Code to Reproduce
Here's a modified version of the example JSFiddle: https://jsfiddle.net/dueh84nq/1/ - I changed it to display the illegal/illegalBy values.
Expected behavior
Since the syntax is legal, I would expect it to be highlighted somehow, not rejected as illegal.
Additional context
Here's some info on C++'s parameter packs: https://en.cppreference.com/w/cpp/language/parameter_pack
The text was updated successfully, but these errors were encountered: