https://www.mediawiki.org/wiki/Special:Code/MediaWiki/106312
Revision: 106312
Author: gwicke
Date: 2011-12-15 10:13:50 +0000 (Thu, 15 Dec 2011)
Log Message:
-----------
Follow-up to r106208 and r106207. Both good catches, thanks Yair! As this code
is in its early stages and nowhere near deployment, please Be Bold and just
commit things like this directly! IMHO it makes more sense to fully review this
once it settles down a bit.
Modified Paths:
--------------
trunk/extensions/VisualEditor/modules/parser/mediawiki.DOMConverter.js
Modified: trunk/extensions/VisualEditor/modules/parser/mediawiki.DOMConverter.js
===================================================================
--- trunk/extensions/VisualEditor/modules/parser/mediawiki.DOMConverter.js
2011-12-15 07:59:39 UTC (rev 106311)
+++ trunk/extensions/VisualEditor/modules/parser/mediawiki.DOMConverter.js
2011-12-15 10:13:50 UTC (rev 106312)
@@ -37,20 +37,11 @@
case 'h4':
case 'h5':
case 'h6':
- var res = {
+ return {
handler: this._convertHTMLLeaf,
type: 'heading',
- attribs: { }
+ attribs: nodeName.substr(1)
};
- switch ( nodeName.toLowerCase() ) {
- case 'h1': res.attribs.level = 1; break;
- case 'h2': res.attribs.level = 2; break;
- case 'h3': res.attribs.level = 3; break;
- case 'h4': res.attribs.level = 4; break;
- case 'h5': res.attribs.level = 5; break;
- case 'h6': res.attribs.level = 6; break;
- }
- return res;
case 'li':
case 'dt':
case 'dd':
@@ -93,11 +84,6 @@
handler: this._convertHTMLBranch,
type: 'caption'
};
- case 'table':
- return {
- handler: this._convertHTMLBranch,
- type: 'table'
- };
case 'hr':
return {
handler: this._convertHTMLLeaf,
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs