@Admins: Syntax highlighting bug in the forum

General discussion about LÖVE, Lua, game development, puns, and unicorns.
Post Reply
grump
Party member
Posts: 947
Joined: Sat Jul 22, 2017 7:43 pm

@Admins: Syntax highlighting bug in the forum

Post by grump »

In case you don't know yet, code syntax highlighting has bugs:

Code: Select all

-- if comments start with a keyword
-- then the comment is formatted like code

Code: Select all

-- but start one comment with a word that is not reserved
-- then it suddenly works as expected
-- until you do this:

Code: Select all

-- it breaks completely if you do this;
-- this should be a comment, not code

Code: Select all

-- like this one, that is correctly formatted

Code: Select all

-- but not this one, that is broken
-- i think it may have to do with the number of keywords in a comment?
-- if you do this, then it will break
-- even this

Code: Select all

-- i can repeat it

Code: Select all

-- i can repeat it if i want (repat is a keyword btw.)

Code: Select all

-- i can repeat it until it breaks (until too)

Code: Select all

-- i can repeat it while i break it

Code: Select all

-- i can repeat it
-- i can repeat it if i want
-- i can repeat it until it breaks
-- i can repeat it while i break it
User avatar
zorg
Party member
Posts: 3444
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: @Admins: Syntax highlighting bug in the forum

Post by zorg »

I think i remember that there's two languages allowed, js and lua, and sometimes, js formatting kicks in... kinda stupid but meh.
Me and my stuff :3True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: @Admins: Syntax highlighting bug in the forum

Post by bartbes »

Looks like all those "broken" cases are detected as bash scripts.

EDIT: And in the post that prompted this (I assume) the code is detected as glsl.
grump
Party member
Posts: 947
Joined: Sat Jul 22, 2017 7:43 pm

Re: @Admins: Syntax highlighting bug in the forum

Post by grump »

Oh, I see! I didn't realize the software would attempt to detect the programing language. I just assumed all code was parsed as Lua code in this forum.
Post Reply

Who is online

Users browsing this forum: No registered users and 88 guests