Skip to content

#740 Add syntax highlighting to the documentation (website / Eclipse help only)

Dennis Hendriks requested to merge 740-asciidoc-html-syntax-highlighting into develop
  • Best to review per commit.
  • Changes:
    • Adds syntax highlighting with highlight.js to AsciiDoctor-generated documentation, for the website and Eclipse help. Does not add syntax highlighting to the PDF. For pros/cons, see issue #740 (closed).
    • I opted to style the various syntax elements like we do for our ESCET languages in their text editors. The colors are slightly different due to a light-grey rather than white background.
    • The highlight.js bnf language doesn't work for us. We use a different BNF syntax. I added a bnf language of our own.
    • The console language supports errors and warnings, like the console in Eclipse.
    • The none language is for when source block in AsciiDoc has no language specified. Defining this language prevents warnings in the browser for not finding the none language.
    • AsciiDoctor by default includes highlight.js v9, which is no longer supported. I can't find the documentation for that version anymore. I therefore opted to include version 11 instead. There is some fixed JavaScript code generated by AsciiDoctor to invoke highlight.js. I change that slightly to be highlight.js version 11 compatible, preventing a warning in the browser.
    • Copies images to 'website' directory, rather than only in the website ZIP that is built. Eases validation/debugging of a single docset.
    • Several documentation fixes, for correct languages of source blocks, correct source block syntax, and some other changes that I stumbled upon.
    • Updated legal pages of the docsets.

Closes #740 (closed)

Merge request reports