A Lightweight JavaScript Syntax Highlighter – Prism

Prism is a lightweight and fast JavaScript based Syntax Highlighter. It is written based on HTML5 standard. It uses <code class="language-xxxx"></code> for posting code. Before <code>, it needs <pre>. Pre tag is required for backward compatibility. We should use <pre> as wherever JavaScript does not work, <pre> will work and keep code readable.

Prism support different Syntax Highlighting syntax. For example, Code can be inside <pre class="language-xxxx">, etc.

According to Prism:

Prism is a lightweight, extensible syntax highlighter, built with modern web standards in mind.

How Code looks with Prism Syntax Highlighter?

HTML page with Prism Syntax Highlighter

HTML page with Prism Syntax Highlighter

Because Prism support <pre><code class="language-xxxx"> syntax for code highlighting, I need to modify plugin code I was using for Escaping HTML/Markup. I will create new plugin for Prism for escaping markup.

Comments are open for an year period. Please, write here on Facebook page.