Page 2 of 2

Re: Codebox theme

Posted: 21 Apr 2019, 22:07
by joedf
Oouu... True. I just checked, the css classes are still correctly to builtin, string, etc.
But the prism.css stylesheet is wrong...

Re: Codebox theme

Posted: 21 Apr 2019, 22:23
by joedf
Okay updated.
https://autohotkey.com/boards/assets/prism/light/prism.css

Code: Select all

.token.builtin {
	color: #290e90;
}

Re: Codebox theme

Posted: 24 Apr 2019, 17:44
by lexikos
Not a theme issue as such, but SendLevel is not highlighted as a builtin.

Code: Select all

SendLevel 1
SendInput stuff

Re: Codebox theme

Posted: 25 May 2019, 01:48
by lexikos
Not that I don't like green, but I still think there's not enough differentiation between strings and not strings.

I'm not sure what .token.selector means exactly, but some commands and control flow statements use it:

Code: Select all

Functions_are_green() {
    return Func("This line is eco-friendly.")
}
There are a bunch of keywords that get replaced with highlighted links to documentation in the wrong context, and common context-sensitive keywords that don't get highlighted. I think it's better to not highlight than to highlight incorrectly. The irrelevant links are probably worse (more misleading).

Code: Select all

MsgBox All is not right, if read between lines.

Re: Codebox theme

Posted: 01 Jun 2019, 18:11
by joedf
I had done an update for prism.js, but it seems like they broke the regex selectors again. What colours should strings or functions be? I can add in some manually changes; to include the SendLevel, and tweak the colours a little bit.
blueish for functions and green for strings (that's what this "Coy" theme seems to do) or the other way around? something like that?

I am not sure what token.keywords are supposed to be either, so I've disable the linking for those for now...

Re: Codebox theme

Posted: 02 Jun 2019, 00:15
by lexikos
In the documentation, built-in functions and commands seem to be the same blue as links. Since they are links, and the most useful part of the code to auto-link, that makes sense. Strings there are dark red (including unquoted strings for commands), but I don't care what colour they are as long as they're not the same as functions or other common keywords or identifiers.

token.keywords seem to be keywords used in unquoted command or directive args, like Loop Read, if between/is/not, maybe #Warn All, or sub-commands. The links wouldn't work too well since they aren't "primary" keywords like command names (i.e. they aren't in the documentation index). In the documentation, I think they are either not specifically highlighted, or are highlighted as part of the command name (with the "control flow" colour).

Re: Codebox theme

Posted: 03 Jun 2019, 15:41
by joedf
Alright, thanks lexikos. looking into in later today. :+1:

EDIT:Added SendLevel and updated colours.

Re: Codebox theme

Posted: 05 Jun 2019, 03:26
by swagfag
how come some functions show up bold? is it so u can distinguish between built in and user defined functions?

format() shows up bold

Re: Codebox theme

Posted: 05 Jun 2019, 08:51
by joedf
Whoops, did I screw that up? Yes, Bold is for user defined... I think they just didn't add format() in a builtin...

Re: Codebox theme

Posted: 05 Jun 2019, 14:26
by swagfag
joedf wrote:
05 Jun 2019, 08:51
Whoops, did I screw that up?
idk, probably not. are you responsible for how tokens are identified or is that something prism.js's team has to fix?

there are also some discrepancies regarding instance methods, look at some of the snippets in this thread
https://www.autohotkey.com/boards/viewtopic.php?f=76&t=65049

Re: Codebox theme

Posted: 05 Jun 2019, 15:32
by gregster
Fyi, there seems to be some problem with multi-line comments, if a single-line comment with ; is part of it, prematurely ending the grey syntax colouring.

Code: Select all

/*
function(){
	msgbox
}

function2(){
	; msgbox
}
msgbox
*/

Re: Codebox theme

Posted: 05 Jun 2019, 18:44
by joedf
darn... this is all from the prism code... and they update often.. especially for ahk .. :/

Re: Codebox theme

Posted: 10 Jun 2019, 08:58
by guest3456
lexikos wrote:
25 May 2019, 01:48

Code: Select all

Functions_are_green() {
    return Func("This line is eco-friendly.")
}
joedf wrote:
05 Jun 2019, 08:51
Whoops, did I screw that up? Yes, Bold is for user defined... I think they just didn't add format() in a builtin...
Some functions are blue and bold, like that user-defined func quoted from lex above, and the redirect link fails naturally

Re: Codebox theme

Posted: 12 Jun 2019, 12:00
by joedf
I took the bold style from the docs... it looks like user-defined funcs are bold. I have removed the linking for user-funcs.
What else do you think should change? :think: