ahkscript / SublimeAutoHotkey

AutoHotkey AHK language package for SublimeText including syntax highlighting, comments toggling, auto-completions, build system definitions, commands for ahkrun, ahkcompile, ahkrunpiped.
The Unlicense
207 stars 43 forks source link

Syntax highlighting issue with comment blocks #54

Closed Dubz closed 5 years ago

Dubz commented 5 years ago

If you add comment blocks using /.../ and the closing */ is not at the beginning of a new line, the highlighting makes everything after it appeared commented out.

Dubz commented 5 years ago

I opened a file and screenshotted it for reference.

Not closing at the beginning of a new line image

Closing at the beginning of a new line. image

robertcollier4 commented 5 years ago

See: https://www.autohotkey.com/docs/Language.htm#comments In addition, the / and / symbols can be used to comment out an entire section, but only if the symbols appear at the beginning of a line as in this example:

Dubz commented 4 years ago

This is not entirely true, though. I just made a simple script with the whitespace included before the closing comment tag (*/), and it ran just fine. Tested with multiple spaces, and tabs. All work no problem. Anything else before the closing */ tag, apart from whitespace, is not allowed/doesn't work. This is including an extra asterisk (ex. **/)

See below for example:

/**
 * This is a comment block test
 *
 * Loreum ipsum yada yada
                */

MsgBox, Hello world!

Add any character that is not a space or tab before */, and the message box won't show when ran.