diff --git a/lib/index.js b/lib/index.js index 1162f8d..eb70020 100644 --- a/lib/index.js +++ b/lib/index.js @@ -30,13 +30,7 @@ import tableCellStyle from '@mapbox/hast-util-table-cell-style' import {whitespace} from 'hast-util-whitespace' const own = {}.hasOwnProperty -const tableElements = new Set([ - 'table', - 'thead', - 'tbody', - 'tfoot', - 'tr', -]) +const tableElements = new Set(['table', 'thead', 'tbody', 'tfoot', 'tr']) /** * Compile HTML to React nodes. diff --git a/test.js b/test.js index 9ee7ea6..5fd9a96 100644 --- a/test.js +++ b/test.js @@ -171,7 +171,13 @@ test('React ' + React.version, (t) => { t.deepEqual( processor.stringify( u('root', [ - h('table', {}, ['\n ', h('tbody', {}, ['\n ', h('tr', {}, ['\n ', h('th', {}, ['\n ']), h('td', {}, ['\n '])])])]) + h('table', {}, [ + '\n ', + h('tbody', {}, [ + '\n ', + h('tr', {}, ['\n ', h('th', {}, ['\n ']), h('td', {}, ['\n '])]) + ]) + ]) ]) ), React.createElement('div', {}, [ @@ -179,7 +185,7 @@ test('React ' + React.version, (t) => { React.createElement('tbody', {key: 'h-2'}, [ React.createElement('tr', {key: 'h-3'}, [ React.createElement('th', {key: 'h-4'}, ['\n ']), - React.createElement('td', {key: 'h-5'}, ['\n ']), + React.createElement('td', {key: 'h-5'}, ['\n ']) ]) ]) ])