We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 58d2365 commit 58079a4Copy full SHA for 58079a4
src/languages/swift.js
@@ -491,7 +491,7 @@ export default function(hljs) {
491
};
492
493
function noneOf(list) {
494
- return concat("(?!", list.join("|"), ")");
+ return negativeLookahead(either(...list));
495
}
496
497
const METHODS_ONLY = [...Swift.keywords, ...Swift.builtIns];
@@ -504,7 +504,7 @@ export default function(hljs) {
504
keywords: KEYWORDS,
505
match: concat(
506
either(/\b/, /#/),
507
- noneOf([...METHODS_ONLY].map(x => concat(x, TRAILING_PAREN_REGEX))),
+ noneOf(METHODS_ONLY.map(x => concat(x, TRAILING_PAREN_REGEX))),
508
FUNCTION_IDENT,
509
lookahead(TRAILING_PAREN_REGEX),
510
),
0 commit comments