Index: trunk/extensions/VisualEditor/modules/parser/mediawiki.DOMConverter.js |
— | — | @@ -37,20 +37,11 @@ |
38 | 38 | case 'h4': |
39 | 39 | case 'h5': |
40 | 40 | case 'h6': |
41 | | - var res = { |
| 41 | + return { |
42 | 42 | handler: this._convertHTMLLeaf, |
43 | 43 | type: 'heading', |
44 | | - attribs: { } |
| 44 | + attribs: nodeName.substr(1) |
45 | 45 | }; |
46 | | - switch ( nodeName.toLowerCase() ) { |
47 | | - case 'h1': res.attribs.level = 1; break; |
48 | | - case 'h2': res.attribs.level = 2; break; |
49 | | - case 'h3': res.attribs.level = 3; break; |
50 | | - case 'h4': res.attribs.level = 4; break; |
51 | | - case 'h5': res.attribs.level = 5; break; |
52 | | - case 'h6': res.attribs.level = 6; break; |
53 | | - } |
54 | | - return res; |
55 | 46 | case 'li': |
56 | 47 | case 'dt': |
57 | 48 | case 'dd': |
— | — | @@ -93,11 +84,6 @@ |
94 | 85 | handler: this._convertHTMLBranch, |
95 | 86 | type: 'caption' |
96 | 87 | }; |
97 | | - case 'table': |
98 | | - return { |
99 | | - handler: this._convertHTMLBranch, |
100 | | - type: 'table' |
101 | | - }; |
102 | 88 | case 'hr': |
103 | 89 | return { |
104 | 90 | handler: this._convertHTMLLeaf, |