mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CodeMirror
synced 2024-11-23 22:03:28 +00:00
380ec9d1ce
This is essentially the CM6-style variant of the same code used for TagModes in CM5. The big difference is in CM6, every tag must be registered in order to be used. We do this dynamically when CodeMirrorModeMediaWiki is intantiated. As of this patch only tags that contain mediawiki (formerly 'text/mediawiki') are supported, such as <ref>. The CM6 tag registration surfaced an old bug, now fixed: when using different capitalization on extension-supplied tags, the CSS class name used to match that. I.e. <REF> would produce .cm-mw-ext-REF, when it should be .cm-mw-ext-ref Also remove the old line-level styles. With I17b1f0b7a6, line-level styling was added for section headings. Doing the same for tags like <nowiki> and <pre> isn't as important, and can be addressed later or not at all. Add test case for extension tag with no supplied TagMode Other minor cleanup, including removing old commented out code Bug: T348684 Change-Id: Ibfff1fc6eacc42b95f557abb40774a65c46ba373 |
||
---|---|---|
.. | ||
addon/edit | ||
dist | ||
lib | ||
mode/mediawiki | ||
modules/ve-cm | ||
.eslintrc.json | ||
ext.CodeMirror.js | ||
ext.CodeMirror.less | ||
ext.CodeMirror.v6.WikiEditor.init.js | ||
ext.CodeMirror.v6.WikiEditor.less | ||
ext.CodeMirror.WikiEditor.js |