Aseba Language colorizing

The contributor centre is in English only.

The new implementation based on google-code-prettify does not requires preprocessing of code lines and allows the code to be copied from the browser and pasted to Aseba, without considering line numbers.
Its use requires the following text to be inserted before the code snippet:

<script src="/local--files/en:start/run_prettify.js"></script>
<pre class="prettyprint linenums:N">

where N is the line number to start with (normally 1),

and this text following the code snippet:


See the example:

The colours can be changed globally by modifying this file: []

If you want to use an alternative css locally, you can start from the prettify.css file, modify it, rename it for instance "prettify2.css", and upload it under en:start
and insert the code like this:

<script src="/local--files/en:start/run_prettify.js?skin=prettify2"></script>
<pre class="prettyprint linenums:12">

This is the result for an alternative style sheet reproducing the look & feel of ASEBA Studio version 1.3.3.

See the example:

New keywords of the language can be added by modifying the file [] near line 362 (this is not the best way to do it, but faster).
The 'dot' removal from line numbers was implemented by modifying directly the original code of run_prettify.js near line 1331.
Take care to report these modifications if you decide to upgrade to a newer version of the code.
Note that this file for working requires to have explicitly specified the LOADER_BASE_URL at line 175 from where to download the css file. This must be taken into account if the entire site changes domain or the file must be moved.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License