Skip to content

Commit 7b77b7b

Browse files
committed
the token with the '}' char at end of avt was starting 1 position too early - now fixed
1 parent 3e8eeaf commit 7b77b7b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/xslLexer.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -649,6 +649,7 @@ export class XslLexer {
649649
let tokenChars: string[] = [];
650650
let result: BaseToken[] = [];
651651
let attName: string = '';
652+
let avtExit = false;
652653

653654
let xpLexer: XPathLexer = new XPathLexer();
654655
xpLexer.elementNameTests = this.elementNameTests;
@@ -1039,8 +1040,10 @@ export class XslLexer {
10391040
if (newCharCount > this.charCount) {
10401041
this.charCount = newCharCount;
10411042
}
1043+
// fix issue with last char of xpath
10421044
this.lineCharCount = p.startCharacter;
10431045
nextChar = xsl.charAt(this.charCount);
1046+
avtExit = true;
10441047
}
10451048
nextState = nextState === XMLCharState.sqAvt? XMLCharState.lSq: XMLCharState.lDq;
10461049
break;
@@ -1102,6 +1105,10 @@ export class XslLexer {
11021105

11031106
}
11041107
tokenStartChar = this.lineCharCount > 0? this.lineCharCount - 1: 0;
1108+
if (avtExit) {
1109+
avtExit = false;
1110+
tokenStartChar++;
1111+
}
11051112
tokenStartLine = this.lineNumber;
11061113
} // else ends
11071114
if (isCurrentCharNewLIne) {

0 commit comments

Comments
 (0)