I'm getting a real weird error with ionide's syntax highlighting this morning. Any code taking place immediately after a markdown comment '///' is colored as comment. The tool-tips are still registering, but I'm getting no auto-completion on anything comment colored
If I put newlines after the '///' lines, then the normal functionality comes back, but otherwise it's all coming out like this in every project I open. Has anyone else ever seen this?
I have no idea. I haven't updated anything and it was working fine just last night.
Microsoft (R) Build Engine version 15.7.177.53362 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
Ok, I am able to repo this error.
Wrong color:
/// Maxime test
namespace Fable.Markdown
Ok when:
/// Maxime test
///
namespace Fable.Markdown
I will look to fix this
Also, another solution to fix that temporary is to use // and not ///
Thanks, that's what I've been doing for the moment. It's more of an annoyance than anything just when having to read through other code. But no biggie, thanks for looking into this
I am kind of the author of this bug so... :)
A fix is ready and should be included in the next release
Fix released in 3.20.8
A comment like this also changes the color of the rest of the file.
(** Flow control *)
| BasicPatterns.FastIntegerForLoop(Transform com ctx start, Transform com ctx limit, body, isUp) ->
match body with
| BasicPatterns.Lambda (BindIdent com ctx (newContext, ident), body) ->
Turning it to (* Flow control *) or // Flow control fixes the issue. Comments starting with (** are used for FSharp.Formatting. I'm not using it to generate docs now, so it's not a problem to change the comment but I wanted to let you know.
Thanks for the report @alfonsogarciacaro
Note sure, if I will be able to fix the single line version of (** *) I will give it a try.
For reference, if the comments are indented then it's also failing.
Code:
(**
# First-level heading
Some more documentation using `Markdown`.
*)
module SampleCode.SimpleTypes
I don't know how the VS Code grammar works, but maybe replacing this line with the following works?
"name": "comment.block.fsharp",
"begin": "(\\(\\*+(?!\\)))",
"end": "(\\*\\))",
I just added
+after\\*in the second line.
I think if we do that then, we will stop supporting the markdown highlighting. Because (** will match
Oh, I think I can detect the failing case and don't active the markdown support if the line start by (** ..... *)
Another funny behavior with new coloring ;)

The fix is already added to the grammar: https://github.com/ionide/ionide-fsgrammar/pull/67
We just need to new release of Ionide to fix the of.... thing.
We also already know the bug about tuple declaration: https://github.com/ionide/ionide-fsgrammar/issues/68
Edit: Grammar synthax based on regex is hard to test... Sorry for the bugs appearing in the process of updating the grammar.
Nah, don't worry. I'm just reporting things I see here to help you. The new Ionide features are awesome, thanks a lot for your hard work! :clap: 馃 :clap: