Raised This Month: $140 Target: $400
 35% 

Syntax highlight for [code] blocks


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
KliPPy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 03-02-2018 , 06:54   Syntax highlight for [code] blocks
Reply With Quote #1

ViolentMonkey/TamperMonkey/GreaseMonkey/WhateverMonkey script that highlights all those uncolored [code] blocks by automatically attempting to recognize what language is used within them. Uses highlight.js library to achieve this.
Download: https://gist.github.com/rsKliPPy/31c...hlight.user.js


Examples:

JSON:


Markdown:


Python:
__________________

Last edited by KliPPy; 03-02-2018 at 06:54.
KliPPy is offline
cravenge
Veteran Member
Join Date: Nov 2015
Location: ♫ Harmony ♫
Old 03-02-2018 , 21:00   Re: Syntax highlight for [code] blocks
Reply With Quote #2

Another wonderful work from you, KliPPy.

Here, have some
__________________

"Juunen go no watashi e, ima wa shiawase de shou ka?"
cravenge is offline
sekac
Senior Member
Join Date: Nov 2016
Old 06-20-2018 , 14:13   Re: Syntax highlight for [code] blocks
Reply With Quote #3

Hey, is there an AMXX language for highlight.js? If not would you be able to make that?
sekac is offline
KliPPy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 06-20-2018 , 14:29   Re: Syntax highlight for [code] blocks
Reply With Quote #4

C is good enough for it, I didn't want to add many languages because then hl.js has harder time deciding what language it actually is in the [code] block.
__________________
KliPPy is offline
sekac
Senior Member
Join Date: Nov 2016
Old 06-20-2018 , 15:07   Re: Syntax highlight for [code] blocks
Reply With Quote #5

Quote:
Originally Posted by KliPPy View Post
C is good enough for it, I didn't want to add many languages because then hl.js has harder time deciding what language it actually is in the [code] block.
Well I need this for my website, so I can specify the language in the code tags.
sekac is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 00:08.


Powered by vBulletin®
Copyright ©2000 - 2018, vBulletin Solutions, Inc.
Theme made by Freecode