Retrofitting Markdown Onto 15-Years Of Articles Using htmlParse(), XPath, And Lucee CFML 5.3.4.80
DRANK

In 2019, I finally dumped my Windows VirtualBox and XStandard ActiveX blog authoring and moved my content-creation workflow over to using Markdown in ColdFusion. Markdown has been a total joy to work with for new articles; however, I still have 15-years of old content that is hard-coded as HTML in my database. In order to make those old articles editable as Markdown, I wanted to see if I could programmatically convert the HTML content over to Markdown using Lucee CFML 5.3.4.80.I currently use Flexmark to convert my Markdown content into HTML in ColdFusion. The Flexmark library is awesome! And, happens to have an extension that can be used to convert HTML to Markdown. However, customizing the logic of said extension requires Java expertise - expertise that I do not have. As such, I knew that whatever solution I came up with had to entail raw Lucee CFML / ColdFusion logic.Historically, when using Adobe ColdFusion, I would parse HTML using something like TagSoup or jSoup. But, now that I…

bennadel.com
Related Topics: XML