Skip to content

Commit fd7ea64

Browse files
authored
Detect variables as they are parsed in the AST (#809)
1 parent 945042a commit fd7ea64

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Diff for: src/Elastic.Markdown/Myst/Substitution/SubstitutionParser.cs

+2
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,8 @@ public override bool Match(InlineProcessor processor, ref StringSlice slice)
147147
found = true;
148148
replacement = value;
149149
}
150+
if (found)
151+
context.Build.Collector.CollectUsedSubstitutionKey(key);
150152

151153
var start = processor.GetSourcePosition(startPosition, out var line, out var column);
152154
var end = processor.GetSourcePosition(slice.Start);

0 commit comments

Comments
 (0)