Replies: 1 comment
-
I noticed the same issue and was about to open a discussion. Will now simply pile on here. I think it is the same issue where the highlighter never finds the delimiter of the multiline comment. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Select Topic Area
Bug
Body
In https://github.com/Kimapr/kf2vm/blob/889bccbdecc637c3c78a4468e1e91ab9c599a16f/num.lua#L107-L154 and https://github.com/Kimapr/kf2vm/blob/889bccbdecc637c3c78a4468e1e91ab9c599a16f/vm.lua#L1-L488 you can see multiline comments extending far beyond where they are supposed to be.
(num.lua - the weird interleaving of comments here serves a purpose: it allows to switch between two codes by adding/removing a single character)
(vm.lua)
It's somewhat excusable in num.lua, because weird nestings of multiline literals like that are known to confuse crappy syntax highlighters (like Discord's), but what happened to vm.lua is egregious and unacceptable, that's a perfectly normal way to do comments being broken. Even Discord, whose primary audience is gamers, not programmers, does it better!
(num.lua, still wrong)
(num.lua in vim, correct)
(vm.lua) (correct)
What seems to happen is Github's highlighter first removes all regular single-line comments and only then processes multiline comments, which is wrong because singleline and multiline comments can interact with each other in complex ways. Even C has some of this, and the highlighter doesn't do this for C so I don't understand how this bug happened.
Beta Was this translation helpful? Give feedback.
All reactions