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
constvalue=/* set from `myEditor.getModel()`: */`#include <vector>int main() { /* const */ int i; std::vector</* const */ int> v;}`;// Hover on each property to see its docs!constmyEditor=monaco.editor.create(document.getElementById("container"),{
value,language: "cpp",automaticLayout: true,});
Reproduction Steps
No response
Actual (Problematic) Behavior
std::vector</* const */ int> does not color the const as a comment.
With an additional space ( std::vector< /* const */ int> ) it does.
Reproducible in vscode.dev or in VS Code Desktop?
Reproducible in the monaco editor playground?
Monaco Editor Playground Link
https://microsoft.github.io/monaco-editor/playground.html?source=v0.45.0-dev-20231025#XQAAAAKdAQAAAAAAAABBqQkHQ5NjdMjwa-jY7SIQ9S7DNlzs5W-mwj0fe1ZCDRFc9ws9XQE0SJE1jc2VKxhaLFIw9vEWSxW3yscwzunzRgmSaumWUF-TBOsVJ4S4FwfCDQb5-2uUHXTVAefbVSd9IzaZ_vv9VR9KugsKid_xhsXSuKhlGTxLUGE_paGdzKGZl7Nk25SIpp_ncCLxicsd1a8owg6BYQ3AeHyAvKoyxQF38Qeno_n3VUkZhJFr-Um4jLvm9WpAm8PLKf5d6R5PlE0fyTK74hQ2qlJn14eaQJX2i_Dyr2ych0qgPCYL1WkpZuwUpF1y6NTw2xs4p2APjti9EiwbvZ4C71gUCFTQPacKokwbZf5y_s6CnPwHMPID2euJf8jMiWHWJHsDUg4PC5QdRgcuPfEH3_0njQuJ8ZM-SE3_wtFAAA
Monaco Editor Playground Code
Reproduction Steps
No response
Actual (Problematic) Behavior
std::vector</* const */ int>
does not color theconst
as a comment.With an additional space (
std::vector< /* const */ int>
) it does.Expected Behavior
Commented code should be colored as such.
Additional Context
Coming originally from this compiler-explorer bug:
compiler-explorer/compiler-explorer#5299
The text was updated successfully, but these errors were encountered: