Here's an approach that should let you hack additional language brushes
into the preview of 5.1.10. It modifies one of the shadow tiddlers within
the highlight plugin, which can cause problems with future upgrades; if
that happens, remove the shadow tiddler override and then re-apply the
technique described below.

1. Find the brush you want within the highlight.js GitHub repo in the
"src/languages" folder:
https://github.com/isagalaev/highlight.js/archive/8.8.0.zip
2. Copy the text of the language you want
3. Open the tiddler "$:/plugins/tiddlywiki/highlight/highlightblock.js"
4. Paste the following after the line "hljs.configure(...)":

hljs.registerLanguage("<name_of_language>",<text_of_language_file>);

Save the tiddler and restart.

Let me know how you get on,

Best wishes

Jeremy.





On Sat, Sep 12, 2015 at 6:59 PM, Bob Flandard <[email protected]> wrote:

> Hello Danielo,
>
> I had a look at the plugin code and got about as far as realizing that
> "hljs.registerLanguage" was the start of each new language. I thought about
> hijacking one of the existing languages that I'm unlikely to need for its
> intended purpose, but the minified code looked too impenetrable
> (combination of stripped down JavaScript and beastly regular expressions).
>
> Did you have any joy with your attempts? and if so do you have any
> pointers or time savers.
>
> The language I'm interested in is APDL from Ansys. Mainly the keywords for
> many hundreds of commands; some start with "/" e.g /view, some with "*" e.g
> *vget and others just normal "words" e.g save etc.
>
> Thanks, Bob
>



-- 
Jeremy Ruston
mailto:[email protected]

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/CAPKKYJbGtKxjt-8P0YUmsxhq6fXSiodmUsxXnP407PLkgJB4Vg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to