Highlight: PureBASIC syntax files available

Developed or developing a new product in PureBasic? Tell the world about it.
User avatar
Tristano
Enthusiast
Enthusiast
Posts: 190
Joined: Thu Nov 26, 2015 6:52 pm
Location: Italy
Contact:

Highlight: PureBASIC syntax files available

Post by Tristano »

[--UPDATE 3--] 2017.05.11: Added support for inline Assembly highligthing, and updated keywords to PB 5.60.
[--UPDATE 2--] 2016.11.02: highlight 3.33 released, it now ships with PureBASIC language and theme files included.
[--UPDATE 1--] I've just received confirmation that the PureBASIC language files will web included in the upcoming release of Highlight, due in early November!

Hi everyone. After the recent creation of PureBASIC Syntax Highlighting for highlight.js, Im' glad to announce...

I've just published my newly created language definition and color theme files for Highlight syntax highlighter:

https://github.com/tajmone/purebasic-ar ... /highlight

You don't need to manually install them: just update Highlight to latest version:

http://andre-simon.de/zip/download.php

About Highlight

http://www.andre-simon.de/doku/highligh ... hlight.php

Highilight is a crossplatform FOSS application for converting source code to formatted text with syntax highlighting. It’s a command line tool with an optional GUI fontend.

Highilight is maintained by André Simon (main developer), and released under the GPL3 license.

Main Features:
  • Coloured output in HTML, RTF, ODT, TeX, LaTeX, SVG, Pango, BBCode and ANSI terminal sequences
  • Supports 200 programming languages
  • Includes 80 colour themes
  • Recognition of nested languages
  • Plug-In interface to tweak the output
  • CLI, GUI and Lib builds available
  • Platform independent
On Windows it’s available both with an installer or in standalone format (unzip and run).

AsciiDoc Integration

AsciiDoc can natively use Highlight for xhtml11, html5 and html4 outputs:
This opens the doors of the powerful AsciiDoc publishing toolchain to PureBASIC: eBook with elegant code can be easily created with tools like Asciidoc FX.

~~~~~~~~~~~~~~~~~~~~~~~~~~~

Enjoy!
Last edited by Tristano on Thu May 11, 2017 4:45 pm, edited 2 times in total.
The PureBASIC Archives: FOSS Resources:
User avatar
tj1010
Enthusiast
Enthusiast
Posts: 624
Joined: Mon Feb 25, 2013 5:51 pm
Location: US or Estonia
Contact:

Re: Highlight: PureBASIC syntax files available

Post by tj1010 »

Very useful! Even though I just use pastebin embed option with PB highlighting; local-hosting would be faster but I also do snippets in other languages often.
The truth hurts.
User avatar
Tristano
Enthusiast
Enthusiast
Posts: 190
Joined: Thu Nov 26, 2015 6:52 pm
Location: Italy
Contact:

Re: Highlight: PureBASIC syntax files available

Post by Tristano »

tj1010 wrote:I just use pastebin embed option with PB highlighting
Could you provide me a link to this Pastebin functionality? I'd like to dig into it.
tj1010 wrote:local-hosting would be faster but I also do snippets in other languages often.
I've created the PB files for Highlight because of AsciiDoc, which natively supports Highlight:

http://asciidoc.org/source-highlight-fi ... _highlight

With tools like AsciidocFX one can then create eBooks (or HTML docs) with syntax highlighting support for PureBASIC, and can publish them on platforms like O'Reilly Atlas:

https://atlas.oreilly.com/

As for websites (which is what I understand you are referring here), using highlight.js is better because it will support other languages as well, and only requires a link to the javascript file and CSS theme.

From highlight.js website you can create and download your customized version of the script: you are presented with a list of all languages available (including PureBASIC) and you can check/uncheck the languages that you would like to include in your final download:

https://highlightjs.org/download/

More languages = bigger file; but as you add new languages to your website you can just recreate the script with the new languages and substitute the old one — no changes to your webpages needed after this operation.

I also run a parallel version of highlight.js, which emulates better PB's native IDE behaviour and coloring (but which "breaks" the formal approach rules of highlight.js, and was changed in the official release). You can access it here:

https://github.com/tajmone/highlight.js/tree/PureBASIC

But you'll need to build it yourself via Node.JS. Apart from the PB native-look (which is a small detail regarding function calls coloring) it's the same as highlight.js official release — except I'm not updating it often, so its a bit behind the official release; but it serves well my needs so far. Anyhow, I'm planning to include (very soon) some pre-built releases of this tweaked branch (with various combinations of languages: only PB, all langs, and PB + shell + CMD and common syntaxes) in «The PureBASIC Archives» repo, so users can be spared the building process or installing Node JS.
The PureBASIC Archives: FOSS Resources:
Post Reply