Syntax highlightning on the forums

Developed or developing a new product in PureBasic? Tell the world about it.
Marc56us
Addict
Addict
Posts: 1477
Joined: Sat Feb 08, 2014 3:26 pm

Re: Syntax highlightning on the forums

Post by Marc56us »

Seymour Clufley wrote: Wed Jun 02, 2021 12:40 am This is a great idea. But please, please, don't use the default IDE color scheme! LOL
Yes, please stop using yellow background and courier font, this remind Windows 3.x and 95' applications.

:idea: It would be nice to use the SpiderBasic theme (also in PB IDE and help chm: Consolas font on White background.)

:wink:
User avatar
Lord
Addict
Addict
Posts: 847
Joined: Tue May 26, 2009 2:11 pm

Re: Syntax highlightning on the forums

Post by Lord »

Seymour Clufley wrote: Wed Jun 02, 2021 12:40 am ... don't use the default IDE color scheme! ...
-1
The color scheme is eye friendly! It is PureBasic!
Image
User avatar
ChrisR
Addict
Addict
Posts: 1127
Joined: Sun Jan 08, 2017 10:27 pm
Location: France

Re: Syntax highlightning on the forums

Post by ChrisR »

This is a great option, very useful for reading the code :)
I'm not really a fan of the theme either, but well, tastes and colors...

I think it would be good to have it by default for [ code ] [ /code ] tags
without the need to go through other [ code-pb ] [ /code-pb ] tags.
If the latter remains, it would be good to have a corresponding button, next to "code display [ code ]code[ \code ]" button, when writing posts
User avatar
STARGÅTE
Addict
Addict
Posts: 2067
Joined: Thu Jan 10, 2008 1:30 pm
Location: Germany, Glienicke
Contact:

Re: Syntax highlightning on the forums

Post by STARGÅTE »

I don't know, if it is just my impression, but it seems like, the syntax highlighting of the forum is much slower in evaluation than my script.
If I compare similar codes here in the english forum (with the new code highlighting) and codes in the german forum (with my script), my code runs nearly instantly.

I think the problem is, that the syntax highlighting of the forum is 500 kB huge, with many unused languages but the code has to be parsed.
Can you remove all languages except PB?
Last edited by STARGÅTE on Fri Jun 04, 2021 8:48 am, edited 1 time in total.
PB 6.01 ― Win 10, 21H2 ― Ryzen 9 3900X, 32 GB ― NVIDIA GeForce RTX 3080 ― Vivaldi 6.0 ― www.unionbytes.de
Lizard - Script language for symbolic calculations and moreTypeface - Sprite-based font include/module
Fred
Administrator
Administrator
Posts: 16619
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: Syntax highlightning on the forums

Post by Fred »

It uses prism.js, and I don't really want to mess with it...
User avatar
skywalk
Addict
Addict
Posts: 3972
Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA

Re: Syntax highlightning on the forums

Post by skywalk »

Is this the right place to post a Forum bug?
Plain Text / PB / Copy buttons overlap!
I cannot insert an image directly!! :evil:
buttons overlap on Chrome latest.
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
User avatar
Mijikai
Addict
Addict
Posts: 1360
Joined: Sun Sep 11, 2016 2:17 pm

Re: Syntax highlightning on the forums

Post by Mijikai »

Not sure where to post this...
The syntax highlighting doesnt like #Null$ its wrong.

Example:

Code: Select all

#Null$
Fred
Administrator
Administrator
Posts: 16619
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: Syntax highlightning on the forums

Post by Fred »

It won't be perfect, it's mostly to have basic coloring
User avatar
skywalk
Addict
Addict
Posts: 3972
Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA

Re: Syntax highlightning on the forums

Post by skywalk »

Hi Fred, any chance to fix the buttons in the code window?
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
Fred
Administrator
Administrator
Posts: 16619
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: Syntax highlightning on the forums

Post by Fred »

It's a phpbb plugin, I have no clue how to fix this.
User avatar
HeX0R
Addict
Addict
Posts: 979
Joined: Mon Sep 20, 2004 7:12 am
Location: Hell

Re: Syntax highlightning on the forums

Post 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$
Just fix in on your own -> https://github.com/PrismJS/prism/blob/m ... rebasic.js
User avatar
Mijikai
Addict
Addict
Posts: 1360
Joined: Sun Sep 11, 2016 2:17 pm

Re: Syntax highlightning on the forums

Post by Mijikai »

HeX0R wrote: Tue Jul 13, 2021 8:17 am
Just fix in on your own -> https://github.com/PrismJS/prism/blob/m ... rebasic.js
Thats not an option hence my post.
User avatar
Mijikai
Addict
Addict
Posts: 1360
Joined: Sun Sep 11, 2016 2:17 pm

Re: Syntax highlightning on the forums

Post by Mijikai »

Syntax highliting for ForEver is also wrong:

Code: Select all

EnableExplicit
ForEver
User avatar
HeX0R
Addict
Addict
Posts: 979
Joined: Mon Sep 20, 2004 7:12 am
Location: Hell

Re: Syntax highlightning on the forums

Post by HeX0R »

Again:
This 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.
User avatar
Mijikai
Addict
Addict
Posts: 1360
Joined: Sun Sep 11, 2016 2:17 pm

Re: Syntax highlightning on the forums

Post by Mijikai »

HeX0R wrote: Thu Aug 19, 2021 1:02 pm no option you said
U read that correctly - i would do it but i cant.
Post Reply