You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am troubleshooting an expiremental PowerShell grammer while in a fenced code block in a MarkDown document, and I noticed that While rules are still being checked while tokenizing a capture.
Actually, they appear to be checked after the capture, but before it is tokenized. This seems to be causing a problem with the tokenizing of the capture.
The $grammar_json failed to scope as a powershell variable, and it appears that it is because the while rule was checked, but didn't match inside the capture tokenizing (^ didn't match, not at beginning of line). Technically I don't think the while rule should apply if linepos !== 0. I will provide a PR shortly with a possible solution. Note: The debug above could probably use some improvement to clarify that it is scanning a capture, and when scanning the capture has completed.
The text was updated successfully, but these errors were encountered:
The $grammar_json on the second line of code in the first section and in both places in the second section, and the 'xml' in the second section rely on tokenizing a capture, and fails in both places, but the '$grammar_json' on the first line works because its at the start of the line. The $null on the last line of the last section is the same way.
msftrncs
changed the title
while rule from parent grammer is applying during a capture tokenization
while rule from parent grammer is applying during a capture tokenization in an embedded grammar
Feb 8, 2019
I am troubleshooting an expiremental PowerShell grammer while in a fenced code block in a MarkDown document, and I noticed that While rules are still being checked while tokenizing a capture.
Actually, they appear to be checked after the capture, but before it is tokenized. This seems to be causing a problem with the tokenizing of the capture.
The
$grammar_json
failed to scope as a powershell variable, and it appears that it is because the while rule was checked, but didn't match inside the capture tokenizing (^ didn't match, not at beginning of line). Technically I don't think the while rule should apply iflinepos !== 0
. I will provide a PR shortly with a possible solution. Note: The debug above could probably use some improvement to clarify that it is scanning a capture, and when scanning the capture has completed.The text was updated successfully, but these errors were encountered: