Syntax highlighting
←Here is a built-in code coloring theme that likely works for your preferred syntax highlighter engine.
Just place a code element inside a pre block. span classes will styled. The highlighting magic itself — wrapping code in spans of different classes — is not included. Teutonic only provides the necessary CSS for styling code block. The syntax highlighting engines here are only included for demonstration.
Syntax:
pre > code
SCSS:
_code-highlight.scss
Highlight.js
function factorial(n) {
if ((n === 0) || (n === 1))
return 1;
else
return (n * factorial(n - 1));
}
Rouge & Pygment
Prism.js
function factorial(n) {
if ((n === 0) || (n === 1))
return 1;
else
return (n * factorial(n - 1));
}