"Yair rand" posted a comment on MediaWiki.r106207.
URL: http://www.mediawiki.org/wiki/Special:Code/MediaWiki/106207#c27692

Commit summary for MediaWiki.r106207:

Add implicit level attribute to WikiDom headings.

Yair rand's comment:

Re "switch ( nodeName.toLowerCase() ) {case 'h1': res.attribs.level = 1;case 
'h2'"... etc., since it's already verified that nodeName is H1-H6, couldn't the 
entire section just be replaced with
                        return {
                                handler: this._convertHTMLLeaf, 
                                type: 'heading',
                                attribs: { level: +nodeName.substr(1) }
                        };
?

_______________________________________________
MediaWiki-CodeReview mailing list
mediawiki-coderev...@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-codereview

Reply via email to