MinecraftCommands / syntax-mcfunction

Syntax highlighting for mcfunction files.
MIT License
40 stars 3 forks source link

Bug: Comment highlighting inconsistencies #2

Closed 5uso closed 11 months ago

5uso commented 11 months ago

What type of issues are you dealing with?

Incorrect highlighting

What happened?

When trying to add a comment without a space right after the # character, highlighting doesn't work properly.

It seems like other parts of syntax are taking priority over single line comments, perhaps fake player names. Switching around the order in mcfunction.tmLanguage.json from

{ "include": "#names"    },
{ "include": "#comments" },

to

{ "include": "#comments" },
{ "include": "#names"    },

seems to take care of the issue, although I haven't extensively tested this fix.

image

Which text editors are you seeing the problem on?

VSCode

Include a code snippet

#This comment doesn't highlight properly
# This one does work