thephpleague / html-to-markdown

Convert HTML to Markdown with PHP
MIT License
1.77k stars 204 forks source link

Add support for tables #203

Closed markopy closed 3 years ago

markopy commented 3 years ago

This adds support for Markdown tables and resolves issue #201.

Because tables are extended Markdown the converter is not enabled by default and needs to be added by the user explicitly.

Implementing more complex conversions like tables is not easy to do in purely bottom-up fashion. To make this easier this PR also adds a PreConverterInterface which converters can implement to be called before children are traversed. This provides and opportunity to inspect and modify the DOM while children are still unmodified.

colinodell commented 3 years ago

This looks great! Thank you so much for contributing this!

markopy commented 3 years ago

My pleasure. Appreciate the very quick release!