Skip to content

Commit

Permalink
reduce duplicated wrap map values
Browse files Browse the repository at this point in the history
  • Loading branch information
jkroso committed Jan 5, 2014
1 parent b674866 commit 55f7b59
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 24 deletions.
23 changes: 11 additions & 12 deletions build/build.js
Expand Up @@ -5983,24 +5983,23 @@ module.exports = parse;\n\
*/\n\
\n\
var map = {\n\
option: [1, '<select multiple=\"multiple\">', '</select>'],\n\
optgroup: [1, '<select multiple=\"multiple\">', '</select>'],\n\
legend: [1, '<fieldset>', '</fieldset>'],\n\
thead: [1, '<table>', '</table>'],\n\
tbody: [1, '<table>', '</table>'],\n\
tfoot: [1, '<table>', '</table>'],\n\
colgroup: [1, '<table>', '</table>'],\n\
caption: [1, '<table>', '</table>'],\n\
tr: [2, '<table><tbody>', '</tbody></table>'],\n\
td: [3, '<table><tbody><tr>', '</tr></tbody></table>'],\n\
th: [3, '<table><tbody><tr>', '</tr></tbody></table>'],\n\
col: [2, '<table><tbody></tbody><colgroup>', '</colgroup></table>'],\n\
_default: [0, '', '']\n\
};\n\
\n\
/**\n\
* svg elements.\n\
*/\n\
map.td =\n\
map.th = [3, '<table><tbody><tr>', '</tr></tbody></table>'];\n\
\n\
map.option =\n\
map.optgroup = [1, '<select multiple=\"multiple\">', '</select>'];\n\
\n\
map.thead =\n\
map.tbody =\n\
map.colgroup =\n\
map.caption =\n\
map.tfoot = [1, '<table>', '</table>'];\n\
\n\
map.text =\n\
map.circle =\n\
Expand Down
23 changes: 11 additions & 12 deletions index.js
Expand Up @@ -10,24 +10,23 @@ module.exports = parse;
*/

var map = {
option: [1, '<select multiple="multiple">', '</select>'],
optgroup: [1, '<select multiple="multiple">', '</select>'],
legend: [1, '<fieldset>', '</fieldset>'],
thead: [1, '<table>', '</table>'],
tbody: [1, '<table>', '</table>'],
tfoot: [1, '<table>', '</table>'],
colgroup: [1, '<table>', '</table>'],
caption: [1, '<table>', '</table>'],
tr: [2, '<table><tbody>', '</tbody></table>'],
td: [3, '<table><tbody><tr>', '</tr></tbody></table>'],
th: [3, '<table><tbody><tr>', '</tr></tbody></table>'],
col: [2, '<table><tbody></tbody><colgroup>', '</colgroup></table>'],
_default: [0, '', '']
};

/**
* svg elements.
*/
map.td =
map.th = [3, '<table><tbody><tr>', '</tr></tbody></table>'];

map.option =
map.optgroup = [1, '<select multiple="multiple">', '</select>'];

map.thead =
map.tbody =
map.colgroup =
map.caption =
map.tfoot = [1, '<table>', '</table>'];

map.text =
map.circle =
Expand Down

0 comments on commit 55f7b59

Please sign in to comment.