microsoft / microsoft/monaco-editor

F# highlighting issues with block comments tokenized by strings

Open
#1,240 0 comments 0 reactions 1 assignee View on GitHub

@alexdima is already working on this.

Since Dec 13, 2019.

bug grammars help wanted open for PR
Dominant language
JavaScript
Stars
46.8k
Forks
4.1k
Avg merge
17h 58m
Merged PRs (30d)
1

Description

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.