Most Powerful Open Source ERP

Guideline Code Snippet Uses Code Tag Wrapped In Pre Tag

Code section convention.
  • Last Update:2019-07-15
  • Version:001
  • Language:en

A Code Snippet Uses Code Tag Wrapped In Pre Tag

Code sections always use <pre><code>Your code</code></pre> (there are many sections the other way around, please update if you find one).

We are using HighlightJS, because it should detect languages automatically (else add a class="[language-miniscule]" to the code tag) and was easy to extend to show line numbers and custom coloring. Currently we only added support for Python, CSS, HTML, XML, JavaScript, SQL and JSON. Please let me know if you want additional languages to be included. Also note that HTML markup must be escaped inside <code> blocks (use Textmechanic to quickly escape larger code blocks).