Skip to content

Commit 9ec7ec7

Browse files
authored
Update code-description.md
1 parent 4c9913c commit 9ec7ec7

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

code-description.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,7 @@ The following variables and constants are used in the script. Except where marke
312312
- **highlightBackgroundColor**: (constant) an array of strings. Each nesting level, including none, has a different background color. For instance: `highlightBackgroundColor[0]`, for tags in an un-nested tag set, might be "red".
313313
- **highlightForegroundColor**: (constant) an array of strings. The color of the text in the highlighted tags at each nesting level. Generally, where the background colors are all strong/dark colors, all elements of `highlightForegroundColor` will be set to "white".
314314
- **match[]**: an array of strings. This is used to store the text matched by the regular expression that we use to find version tags in the Markdown file.
315+
- **message**: a string. This short-lived variable is just used to assemble the final message text that we'll display to the user.
315316
- **nestingLevel**: a number. This records the nesting level of versioning at the cursor position. When we start parsing the Markdown file, this is set to -1. Each time we find an `ifversion` tag, during parsing, we increment this value. So at the first `ifversion` tag, `nestingLevel` gets incremented to 0. A nesting level of 0 means there's versioning, but we're in a base level tag set with no nesting. Each time we find an `endif` tag we decrement this value. So, if we reach the end of an un-nested tag set without encountering another `ifversion` tag then we decrement `nestingLevel` back to -1 (no versioning).
316317
- **positionString**: a string containing " at the cursor position (line _n_, character _n_) ". We use this in the message displayed to the user.
317318
- **ranges**: an array of vscode.Range objects. Each element of this array identifies the start and end a range of text (a tag) that we'll highlight in the VS Code editor.

0 commit comments

Comments
 (0)