Skip to content

Commit 4c17add

Browse files
fix inline ref not pushed into main list
1 parent 8276042 commit 4c17add

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

lib/preprocessorRef.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,10 @@ class REFManager {
9999
if (keywords.length > 1) {
100100
let item = new PreprocessorRef(type)
101101
item.start = match.index + match[0].length
102+
item.end = match.start;
102103
item.ID = PreprocessorInstruction.convertID2Args(keywords)
103104
item.filePath = inCurrentPath;
105+
isNew |= this.push(item, inUpdate)
104106
}
105107
break;
106108
}

test/test.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@ describe('Preprocessor', function () {
3636
p.collect()
3737
it('Number of references', function () {
3838
const map = p._refManager._ref
39-
assert.equal(map.size, 7)
40-
39+
assert.equal(map.size, 8)
4140
});
4241
it('List of references', function () {
4342

@@ -137,6 +136,11 @@ describe('Preprocessor', function () {
137136
}
138137
});
139138

139+
it('Check syntax deprecated', function () {
140+
assert.equal(syntaxObject != undefined, true)
141+
assert.equal(syntaxObject["collection"]["at()"]["deprecated"], true)
142+
});
143+
140144
it('Check params', function () {
141145
for (const [key, value] of Object.entries(syntaxObject)) {
142146
for (const [functionName, info] of Object.entries(value)) {

0 commit comments

Comments
 (0)