aboutsummaryrefslogtreecommitdiffstats
path: root/library/Text_Highlighter/html.xml
diff options
context:
space:
mode:
authorredmatrix <git@macgirvin.com>2016-06-15 19:44:15 -0700
committerredmatrix <git@macgirvin.com>2016-06-15 19:44:15 -0700
commitfa48de33c2f6cefbac8bfec7cde75b75390d5f39 (patch)
tree63440977ec1d802850c7b8c21496f01c9a44e7fd /library/Text_Highlighter/html.xml
parent476116a972c0f8b8ade495de557b8fc8d3097964 (diff)
downloadvolse-hubzilla-fa48de33c2f6cefbac8bfec7cde75b75390d5f39.tar.gz
volse-hubzilla-fa48de33c2f6cefbac8bfec7cde75b75390d5f39.tar.bz2
volse-hubzilla-fa48de33c2f6cefbac8bfec7cde75b75390d5f39.zip
provide syntax based [colour] highlighting on code blocks for popular languages. I'm not happy with the line height on the list elements but couldn't see where this was defaulted. This uses the syntax [code=xxx]some code snippet[/code], where xxx represents a code/language style - with about 18 builtins.
Diffstat (limited to 'library/Text_Highlighter/html.xml')
-rw-r--r--library/Text_Highlighter/html.xml33
1 files changed, 33 insertions, 0 deletions
diff --git a/library/Text_Highlighter/html.xml b/library/Text_Highlighter/html.xml
new file mode 100644
index 000000000..58d51fc5b
--- /dev/null
+++ b/library/Text_Highlighter/html.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0"?>
+<!-- $Id: html.xml,v 1.1 2007-06-03 02:35:28 ssttoo Exp $ -->
+
+<highlight lang="html" case="no">
+
+ <authors>
+ <author name="Andrey Demenev" email="demenev@gmail.com"/>
+ </authors>
+
+
+ <default innerClass="code" />
+
+ <region name="comment" delimClass="comment" innerClass="comment"
+ start="\&lt;!--" end="--\&gt;">
+ </region>
+
+ <region name="tag" delimClass="brackets" innerClass="code" start="\&lt;[\?\/]?" end="[\/\?]?\&gt;">
+ <contains block="tagname"/>
+ <contains region="param"/>
+ <contains block="paramname"/>
+ </region>
+
+ <block name="tagname" match="(?&lt;=[\&lt;\/?])[\w\-\:]+" innerClass="reserved" contained="yes"/>
+
+ <block name="paramname" match="[\w\-\:]+" innerClass="var" contained="yes"/>
+
+ <block name="entity" match="(&amp;)[\w\-\.]+;" innerClass="special" />
+
+ <region name="param" start="&quot;" end="&quot;" delimClass="quotes" innerClass="string" contained="yes">
+ <contains block="entity"/>
+ </region>
+
+</highlight>