aboutsummaryrefslogtreecommitdiffstats
path: root/library/Text_Highlighter/diff.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/diff.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/diff.xml')
-rw-r--r--library/Text_Highlighter/diff.xml45
1 files changed, 45 insertions, 0 deletions
diff --git a/library/Text_Highlighter/diff.xml b/library/Text_Highlighter/diff.xml
new file mode 100644
index 000000000..d088f9257
--- /dev/null
+++ b/library/Text_Highlighter/diff.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<!-- $Id: diff.xml,v 1.1 2007-06-03 02:35:28 ssttoo Exp $ -->
+
+<highlight lang="diff" case="yes">
+
+ <authors>
+ <author name="Andrey Demenev" email="demenev@gmail.com"/>
+ </authors>
+
+
+ <default innerClass="default" />
+
+ <block name="noNewLine" match="/^\\\sNo\snewline.+$/m" innerClass="special"/>
+
+ <block name="diffSeparator" match="/^\-\-\-$/m" innerClass="code"/>
+
+ <block name="diffCmdLine" match="/^(diff\s+\-|Only\s+|Index).*$/m" innerClass="var"/>
+ <block name="diffFiles" match="/^(\-\-\-|\+\+\+)\s.+$/m" innerClass="reserved"/>
+
+ <block name="contextOrg" match="/^\*.*$/m" innerClass="quotes"/>
+ <block name="contextNew" match="/^\+.*$/m" innerClass="string"/>
+ <block name="contextChg" match="/^!.*$/m" innerClass="inlinedoc"/>
+
+ <block name="defOrg" match="/^\&lt;\s.*$/m" innerClass="quotes"/>
+ <block name="defNew" match="/^\&gt;\s.*$/m" innerClass="string"/>
+ <block name="defChg" match="/^\d+(\,\d+)?[acd]\d+(,\d+)?$/m" innerClass="code"/>
+
+ <block name="uniOrg" match="/^\-.*$/m" innerClass="quotes"/>
+ <block name="uniNew" match="/^\+.*$/m" innerClass="string"/>
+ <block name="uniChg" match="/^@@.+@@$/m" innerClass="code"/>
+
+ <block name="normOrg" match="/^d\d+\s\d+$/m" innerClass="code"/>
+ <region name="normNew" start="/^a\d+\s\d+$/m" end="/(?=^[ad]\d+\s\d+)/m" innerClass="var" delimClass="code"/>
+
+ <region name="edNew" start="/^(\d+)(,\d+)?(a)$/m" end="/^(\.)$/m" innerClass="string" delimClass="code"/>
+ <region name="edChg" start="/^(\d+)(,\d+)?(c)$/m" end="/^(\.)$/m" innerClass="inlinedoc" delimClass="code"/>
+ <block name="edDel" match="/^(\d+)(,\d+)?(d)$/m" innerClass="code"/>
+
+ <region name="fedNew" start="/^a(\d+)(\s\d+)?$/m" end="/^(\.)$/m" innerClass="string" delimClass="code"/>
+ <region name="fedChg" start="/^c(\d+)(\s\d+)?$/m" end="/^(\.)$/m" innerClass="inlinedoc" delimClass="code"/>
+ <block name="fedDel" match="/^d(\d+)(\s\d+)?$/m"
+ innerClass="code"/>
+
+
+</highlight>