Page 3 of 4

Re: Syntax highlightning on the forums

Posted: Fri Aug 20, 2021 6:05 pm
by ChrisR
HeX0R wrote: Thu Aug 19, 2021 1:02 pm is is the highliter from PRISM (see my link) and out of Freds hands.
I made the initial highliter for prism once in the past for my own need, and I'm fine with it.
And you are not willing to change it (no option you said), so, live with it or wait until someone else fixes it.
It's very useful to better read the code but there are very few codes using [ code-pb ] [ /code-pb ], including all former code.
Is it possible to implement it for [ code ] [ /code ] tags ? Is it in Fred's hands ?
Otherwise, is there any way to do it locally ?

Re: Syntax highlightning on the forums

Posted: Sun Aug 22, 2021 10:13 am
by HeX0R
It's very useful to better read the code but there are very few codes using [ code-pb ] [ /code-pb ], including all former code.
Is it possible to implement it for [ code ] [ /code ] tags ? Is it in Fred's hands ?
Yes, this is in Freds hands
Otherwise, is there any way to do it locally ?
You can use this user script from STARGÅTE.
[Edit]
Oh, when reading through that thread, I can see, that you are already using it, anyway, I'll keep the link in for others.

Re: Syntax highlightning on the forums

Posted: Mon Oct 11, 2021 12:00 pm
by StarBootics
@Fred : Apparently the keyword "ForEver" is missing in the Syntax highlighting.

Code: Select all

Repeat
ForEver
Best regards
StarBootics

Re: Syntax highlightning on the forums

Posted: Fri Feb 04, 2022 8:55 pm
by HeX0R
Mijikai wrote: Sun Jun 06, 2021 10:57 am Not sure where to post this...
The syntax highlighting doesnt like #Null$ its wrong.

Example:

Code: Select all

#Null$
StarBootics wrote: Mon Oct 11, 2021 12:00 pm @Fred : Apparently the keyword "ForEver" is missing in the Syntax highlighting.

Code: Select all

Repeat
ForEver
Best regards
StarBootics
I've fixed both in prism, but I don't know when the forum plugin will keep track on it.

Re: Syntax highlightning on the forums

Posted: Thu Mar 27, 2025 10:20 pm
by skywalk
@HeXOR - you have edit access to the forum?
When I paste

Code: Select all

;Some PB code here...
, PureBasic is the leftmost button and then Copy button.
If I paste

Code: Select all

;Some text here...
, then Purebasic is under the Copy button :(
How to make Purebasic always the left side button?

Code: Select all

Procedure IncrementCallback(JsonParameters$)
  Static Count  
  Debug #PB_Compiler_Procedure +": " + JsonParameters$  
  Count + 1
  ProcedureReturn UTF8(~"{ \"count\": "+Str(Count)+ "}")
EndProcedure

Procedure ComputeCallback(JsonParameters$)  
  Debug #PB_Compiler_Procedure +": " + JsonParameters$  
  Dim Parameters(0)  
  ; Extract the parameters from the JSON
  ParseJSON(0, JsonParameters$)
  ExtractJSONArray(JSONValue(0), Parameters())  
  Debug "Parameter 1: " + Parameters(0)
  Debug "Parameter 2: " + Parameters(1)    
  ProcedureReturn UTF8(Str(Parameters(0) + Parameters(1)))
EndProcedure

OpenWindow(0, 100, 100, 400, 400, "Hello", #PB_Window_SystemMenu | #PB_Window_Invisible)
WebViewGadget(0, 0, 0, 400, 400)
SetGadgetText(0, "file://" + #PB_Compiler_Home + "examples/sources/Data/WebView/webview.html")  
BindWebViewCallback(0, "increment", @IncrementCallback())
BindWebViewCallback(0, "compute", @ComputeCallback())
; Show the window once the webview has been fully loaded
HideWindow(0, #False)
Repeat 
  Event = WaitWindowEvent()
Until Event = #PB_Event_CloseWindow

Re: Syntax highlightning on the forums

Posted: Fri Mar 28, 2025 10:20 am
by HeX0R
skywalk wrote: Thu Mar 27, 2025 10:20 pm @HeXOR - you have edit access to the forum?
No!
Guess all we'd need is another code symbol for [code-pb.] tags
I even forgot the tag name now and tried pb-code, pbcode, codepb, until I found the right one, code-pb (murphy's law got me)
Or does such a button exist in one of the other board themes?

But it looks like a bug anyway, I wasn't even aware that there is a PureBasic box under the copy button (I don't really see it).

Re: Syntax highlightning on the forums

Posted: Fri Mar 28, 2025 2:37 pm
by Piero
Not really sure this may help, anyway:
I use the [code=purebasic] tag (found long time ago by examining forum HTML source)

Re: Syntax highlightning on the forums

Posted: Fri Mar 28, 2025 2:39 pm
by Quin
I always do code-pb and /code-pb, it seems to give me the PureBasic code block, at least according to my screen reader.

Re: Syntax highlightning on the forums

Posted: Fri Mar 28, 2025 3:02 pm
by Piero
Quin wrote: Fri Mar 28, 2025 2:39 pm I always do code-pb and /code-pb, it seems to give me the PureBasic code block, at least according to my screen reader.
/code-pb works?
Try just /code

Re: Syntax highlightning on the forums

Posted: Fri Mar 28, 2025 3:04 pm
by Quin
Piero wrote: Fri Mar 28, 2025 3:02 pm
Quin wrote: Fri Mar 28, 2025 2:39 pm I always do code-pb and /code-pb, it seems to give me the PureBasic code block, at least according to my screen reader.
/code-pb works?
Try just /code
Oh, that's cool! I assumed BBCode was pedantic like HTML and wanted the same opening/closing tags. Think I'm going to keep using code-pb because it's habbit, but that's super neat.

Re: Syntax highlightning on the forums

Posted: Fri Mar 28, 2025 3:17 pm
by Piero
Quin wrote: Fri Mar 28, 2025 3:04 pmThink I'm going to keep using code-pb
I'm going to keep using code=purebasic because I have "text macros" :wink:

Re: Syntax highlightning on the forums

Posted: Fri Mar 28, 2025 3:52 pm
by Quin
Piero wrote: Fri Mar 28, 2025 3:17 pm
Quin wrote: Fri Mar 28, 2025 3:04 pmThink I'm going to keep using code-pb
I'm going to keep using code=purebasic because I have "text macros" :wink:
Sounds like as long as none of the methods break, we're still in business :D

Re: Syntax highlightning on the forums

Posted: Fri Mar 28, 2025 4:21 pm
by Piero
Quin wrote: Fri Mar 28, 2025 3:52 pm
Piero wrote: Fri Mar 28, 2025 3:17 pm
Quin wrote: Fri Mar 28, 2025 3:04 pmThink I'm going to keep using code-pb
I'm going to keep using code=purebasic because I have "text macros" :wink:
Sounds like as long as none of the methods break, we're still in business :D
Well, in case, it would be easy for me to adapt the """macros"""… anyway, just out of curiosity, do you use/know something that easily lets you enclose (selected) text with opening/closing tags?
I mean, on windows… :P :mrgreen:

Mac PS:
Free: AppleScript
Almost Free: LaunchBar
Paid: PopClip

Re: Syntax highlightning on the forums

Posted: Fri Mar 28, 2025 4:39 pm
by Quin
Piero wrote: Fri Mar 28, 2025 4:21 pm
Quin wrote: Fri Mar 28, 2025 3:52 pm
Piero wrote: Fri Mar 28, 2025 3:17 pm
Quin wrote: Fri Mar 28, 2025 3:04 pmThink I'm going to keep using code-pb
I'm going to keep using code=purebasic because I have "text macros" :wink:
Sounds like as long as none of the methods break, we're still in business :D
Well, in case, it would be easy for me to adapt the """macros"""… anyway, just out of curiosity, do you use/know something that easily lets you enclose (selected) text with opening/closing tags?
I mean, on windows… :P :mrgreen:

Mac PS:
Free:
AppleScript
Almost Free:
LaunchBar
Paid:
PopClip
The same program I'm using to browse these forums...edbrowse, a command-line editor/web browser/email client/IRC client.

Re: Syntax highlightning on the forums

Posted: Fri Mar 28, 2025 5:04 pm
by Piero
Quin wrote: Fri Mar 28, 2025 4:39 pmedbrowse
Thanks!