Skip to content

Commit

Permalink
regex group should be optional
Browse files Browse the repository at this point in the history
  • Loading branch information
joshgoebel committed Jan 9, 2020
1 parent 0516801 commit 0e09a67
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/languages/cpp.js
Expand Up @@ -8,7 +8,7 @@ Website: https://isocpp.org

function(hljs) {
function optional(s) {
return '(' + s + ')?';
return '(?:' + s + ')?';
}
var DECLTYPE_AUTO_RE = 'decltype\\(auto\\)'
var NAMESPACE_RE = '[a-zA-Z_]\\w*::'
Expand Down

0 comments on commit 0e09a67

Please sign in to comment.