Microsoft/monaco-editor

F# highlighting issues with block comments tokenized by strings

Open

#1.240 geöffnet am 18. Dez. 2018

Auf GitHub ansehen
 (0 Kommentare) (0 Reaktionen) (1 zugewiesene Person)JavaScript (1.283 Forks)batch import
buggrammarshelp wantedopen for PR

Repository-Metriken

Stars
 (14.836 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 6h 26m) (15 gemergte PRs in 30 T)

Beschreibung

monaco-editor version: 0.15.6 Browser: Edge OS: Windows NT x64 10.0.17763 Note: Issue also affects VS Code

Steps reproducing the issue: F# tokenizes strings in block comments. Basically, Monaco is breaking the highlighting of code that uses strings within block comments. Here are some images:

This image is from The F# 4.1 Language Specification manual (section 3.2, pg. 23). Imgur

This is how Visual Studio IDE correctly interprets the styling: Imgur

This is how Monaco interpret the styling: Imgur

Comments used to test the highlighter:

(* Here's a code snippet: let s = "*)" *) let i = 1
(* """ *) let j = 2

Contributor Guide