Update prism-nim.js

This commit is contained in:
Inclusive Coding Bot 2022-03-30 18:59:49 -04:00 committed by GitHub
parent 9be698a3b4
commit f3dfe3b317
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -25,7 +25,7 @@ Prism.languages.nim = {
'operator': { 'operator': {
// Look behind and look ahead prevent wrong highlighting of punctuations [. .] {. .} (. .) // Look behind and look ahead prevent wrong highlighting of punctuations [. .] {. .} (. .)
// but allow the slice operator .. to take precedence over them // but allow the slice operator .. to take precedence over them
// One can define theirs own operators in Nim so all combination of operators might be an operator. // One can define their own operators in Nim so all combination of operators might be an operator.
pattern: /(^|[({\[](?=\.\.)|(?![({\[]\.).)(?:(?:[=+\-*\/<>@$~&%|!?^:\\]|\.\.|\.(?![)}\]]))+|\b(?:and|div|of|or|in|is|isnot|mod|not|notin|shl|shr|xor)\b)/m, pattern: /(^|[({\[](?=\.\.)|(?![({\[]\.).)(?:(?:[=+\-*\/<>@$~&%|!?^:\\]|\.\.|\.(?![)}\]]))+|\b(?:and|div|of|or|in|is|isnot|mod|not|notin|shl|shr|xor)\b)/m,
lookbehind: true lookbehind: true
}, },