lonekorean / wordpress-export-to-markdown

Converts a WordPress export XML file into Markdown files.
MIT License
1.07k stars 216 forks source link

Convert preformatted blocks #100

Closed russellb closed 6 months ago

russellb commented 9 months ago

My wordpress blog had a lot of <pre> sections. The conversion to markdown ignored those. This change did what I wanted, which was to turn all of these into markdown code blocks. In my case, there was no language set on any of my sections to carry over into markdown, so that isn't handled at all.

I'm not sure if this is helpful more broadly, but I figured I'd post it in case it helps someone else.

lonekorean commented 6 months ago

Thank you @russellb ! This is now fixed in v2.2.6.

I ended up with a broader solution that covers additional similar cases with <pre>, so I did not merge this PR directly, but I cherry-picked your commit to make sure you got contributor credit.

russellb commented 6 months ago

Thanks for fixing it!