Closed jswrenn closed 7 years ago
For example, broken.lua:
broken.lua
--[[ This is a multi-line comment, not code. ]]
Expected output:
--------------------------------------------------------------------------------- Language Files Lines Blank Comment Code --------------------------------------------------------------------------------- Lua 1 7 0 7 0
Actual output:
--------------------------------------------------------------------------------- Language Files Lines Blank Comment Code --------------------------------------------------------------------------------- Lua 1 7 0 1 6
This occurs because the opening character sequence of a multi-line comment has the character sequence of a single-line comment as its prefix:
Lua => SM("--", "--[[", "]]"),
I ran into this bug while adding the comment patterns for a language which uses # for single-line comments, and #| and |# for multi-line comments.
#
#|
|#
Oh, very interesting. Good catch. I may have to rethink some things.
For example,
broken.lua
:Expected output:
Actual output:
This occurs because the opening character sequence of a multi-line comment has the character sequence of a single-line comment as its prefix:
I ran into this bug while adding the comment patterns for a language which uses
#
for single-line comments, and#|
and|#
for multi-line comments.