From 144f16a71f7289bb891c52995061aee21e3e08f9 Mon Sep 17 00:00:00 2001 From: Andreas Unterkircher Date: Fri, 28 Mar 2008 17:02:18 +0100 Subject: remove autocomplete and use autosuggest instead Signed-off-by: Andreas Unterkircher --- autocomplete/js/shBrushXml.js | 61 ------------------------------------------- 1 file changed, 61 deletions(-) delete mode 100644 autocomplete/js/shBrushXml.js (limited to 'autocomplete/js/shBrushXml.js') diff --git a/autocomplete/js/shBrushXml.js b/autocomplete/js/shBrushXml.js deleted file mode 100644 index 941ad57..0000000 --- a/autocomplete/js/shBrushXml.js +++ /dev/null @@ -1,61 +0,0 @@ -dp.sh.Brushes.Xml = function() -{ - this.CssClass = 'dp-xml'; -} - -dp.sh.Brushes.Xml.prototype = new dp.sh.Highlighter(); -dp.sh.Brushes.Xml.Aliases = ['xml', 'xhtml', 'xslt', 'html', 'xhtml']; - -dp.sh.Brushes.Xml.prototype.ProcessRegexList = function() -{ - function push(array, value) - { - array[array.length] = value; - } - - /* If only there was a way to get index of a group within a match, the whole XML - could be matched with the expression looking something like that: - - () - | () - | (<)*(\w+)*\s*(\w+)\s*=\s*(".*?"|'.*?'|\w+)(/*>)* - | () - */ - var index = 0; - var match = null; - var regex = null; - - // Match CDATA in the following format - // <\!\[[\w\s]*?\[(.|\s)*?\]\]> - this.GetMatches(new RegExp('<\\!\\[[\\w\\s]*?\\[(.|\\s)*?\\]\\]>', 'gm'), 'cdata'); - - // Match comments - // - this.GetMatches(new RegExp('', 'gm'), 'comments'); - - // Match attributes and their values - // (\w+)\s*=\s*(".*?"|\'.*?\'|\w+)* - regex = new RegExp('([\\w-\.]+)\\s*=\\s*(".*?"|\'.*?\'|\\w+)*', 'gm'); - while((match = regex.exec(this.code)) != null) - { - push(this.matches, new dp.sh.Match(match[1], match.index, 'attribute')); - - // if xml is invalid and attribute has no property value, ignore it - if(match[2] != undefined) - { - push(this.matches, new dp.sh.Match(match[2], match.index + match[0].indexOf(match[2]), 'attribute-value')); - } - } - - // Match opening and closing tag brackets - // - this.GetMatches(new RegExp('', 'gm'), 'tag'); - - // Match tag names - //