leeoniya / reMarked.js

client-side HTML > markdown
http://leeoniya.github.io/reMarked.js/
396 stars 97 forks source link

If no table header can be detected just add a default one #28

Closed SchumacherFM closed 10 years ago

SchumacherFM commented 10 years ago

References https://github.com/SchumacherFM/Magento-Markdown/issues/13

leeoniya commented 10 years ago

One thing to note, though, is that reMarked will actually modify the table and insert a thead with either the header row plucked from tbody or with a newly created fake header row.

Because of this, it may not be suitable for live-preview applications where the passed DOM node needs to remain unmodified. The workaround for this would be to pass the innerHTML of the node as a string so reMarked is forced to create an isolated DOM fragment rather than traversing the original.

SchumacherFM commented 10 years ago

Cool, thanks :-)