Skip to content

Commit 724a6e8

Browse files
committed
allow % operator - special case for notebooks
1 parent 245a6ca commit 724a6e8

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/xpLexer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ export enum ModifierState {
101101
}
102102

103103
export class Data {
104-
public static separators = ['!', '*', '+', ',', '-', '.', '/', ':', '<', '=', '>', '?', '|'];
104+
public static separators = ['!', '*', '+', ',', '-', '.', '/', ':', '<', '=', '>', '?', '|', '%'];
105105

106106
public static doubleSeps = ['!=', '*:', '..', '//', '::', ':=', '<<', '<=', '=>', '>=', '>>', '||'];
107107

src/xsltTokenDiagnostics.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1478,7 +1478,9 @@ export class XsltTokenDiagnostics {
14781478
isValid = prevToken.value === '()' || prevToken.value === '[]' || prevToken.value === '{}';
14791479
break;
14801480
default:
1481-
if (prevToken.value === '/' || prevToken.value === '.') {
1481+
if (prevToken.value === '%') {
1482+
isValid = true;
1483+
} else if (prevToken.value === '/' || prevToken.value === '.') {
14821484
// these are ok provided that the previous token was XSLT or previous token was ,;
14831485
let prevToken2 = allTokens[index - 2];
14841486
let tokenBeforePrevWasXSLT = prevToken2.tokenType >= XsltTokenDiagnostics.xsltStartTokenNumber;

0 commit comments

Comments
 (0)