Directive types are case-insensitive single words (alphanumerics plus isolated internal hyphens, underscores, plus signs, colons, and periods; no whitespace)
Also note that directive arguments are optional, thus a whitespace after "::" is optional too.
Unfortunately, VS Code and the standalone monaco editor use different tokenizers.
We would more than welcome a PR for the standalone monaco editor tokenizer (monarch) that fixes this issue!
Reproducible in vscode.dev or in VS Code Desktop?
Reproducible in the monaco editor playground?
Monaco Editor Playground Code
Actual Behavior
Half of directives in the example code are treated as comments:
Expected Behavior
All rst directives in the example code should be successfully determined by tokenizer.
According to https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#directives:
Also note that directive arguments are optional, thus a whitespace after "::" is optional too.
Additional Context
No response