Skip to content

annaesvensson/yellow-highlight

Repository files navigation

Highlight 0.9.2

Highlight code blocks. Developed by Anna Svensson.

Screenshot

How to install an extension

Download ZIP file and copy it into your system/extensions folder. Learn more about extensions.

How to highlight a code block

Wrap your code block in ``` and add a language identifier.

The following programming languages are included: C, CPP, CSS, HTML, JavaScript, JSON, Lua, PHP, Python, YAML. You can download more language files, rename and copy them into your system/workers folder.

Examples

Highlighting of JavaScript code:

``` javascript
var ready = function() {
    console.log("Hello world");
}
window.addEventListener("DOMContentLoaded", ready, false);
```

Highlighting of HTML code, with and without line number:

``` html {.with-line-number}
<div class="content">
<p>Hello world</p>
</div>
```

``` html {.without-line-number}
<div class="content">
<p>Hello world</p>
</div>
```

Settings

The following settings can be configured in file system/extensions/yellow-system.ini:

HighlightLineNumber = show line number, 1 or 0
HighlightAutodetectLanguages = languages for automatic detection, comma separated

Acknowledgements

This extension includes highlight.php 9.18.1.10 by Ivan Sagalaev and Geert Bergman. Thank you for the good work.

Do you have questions? Get help.

About

Highlight code blocks.

Topics

Resources

License

Stars

Watchers

Forks

Contributors