From 42145e401983994d813ce0bf0ea775e6473a070e Mon Sep 17 00:00:00 2001 From: Wu Cheng-Han Date: Sun, 18 Sep 2016 16:40:51 +0800 Subject: Update to support tiddlywiki and mediawiki syntax highlighting in editor --- public/vendor/codemirror/mode/mediawiki/README.salvus | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 public/vendor/codemirror/mode/mediawiki/README.salvus (limited to 'public/vendor/codemirror/mode/mediawiki/README.salvus') diff --git a/public/vendor/codemirror/mode/mediawiki/README.salvus b/public/vendor/codemirror/mode/mediawiki/README.salvus new file mode 100755 index 00000000..1babd779 --- /dev/null +++ b/public/vendor/codemirror/mode/mediawiki/README.salvus @@ -0,0 +1,16 @@ +This is from https://github.com/wikimedia/mediawiki-extensions-CodeMirror + +1. However, note I fixed a bug in their code: + +@@ -684,7 +684,7 @@ CodeMirror.defineMode( 'mediawiki', function( config/*, parserConfig */ ) { + var tagname = stream.match( /[^>\/\s\u00a0\.\*\,\[\]\{\}\$\^\+\?\|\/\\'`~<=!@#%&\(\)-]+/ ); + if ( tagname ) { + tagname = tagname[0].toLowerCase(); +- if ( tagname in config.mwextTags ) { // Parser function ++ if ( config.mwextTags && tagname in config.mwextTags ) { // Parser function + if ( isCloseTag === true ) { + // @todo message + return 'error'; + + +2. Note the comment about "evil BS" in the css file. \ No newline at end of file -- cgit v1.2.3