You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Accented characters (and others) are not correctly handled.
After looking at the code, it seems that Javascript extends C-like languages (see components/prism-javascript.js). For C-like languages, a function identifiers is defined with this pattern:
/[a-z0-9_]+\(/ig
As this might be correct for C where identifiers follow this pattern [a-zA-Z_][a-zA-Z0-9_]*, this is not true for JavaScript identifiers see (https://es5.github.io/#x7.6 )
I am able to reproduce the bug in http://prismjs.com/test.html by typing this snippet and choosing JavaScript as the language:
function créer(){
}
The text was updated successfully, but these errors were encountered:
Accented characters (and others) are not correctly handled.
After looking at the code, it seems that Javascript extends C-like languages (see components/prism-javascript.js). For C-like languages, a function identifiers is defined with this pattern:
As this might be correct for C where identifiers follow this pattern
[a-zA-Z_][a-zA-Z0-9_]*
, this is not true for JavaScript identifiers see (https://es5.github.io/#x7.6 )I am able to reproduce the bug in http://prismjs.com/test.html by typing this snippet and choosing JavaScript as the language:
The text was updated successfully, but these errors were encountered: