Open mjauvin opened 1 year ago
Do the variables need to be parsed before the markdown gets parsed?
It used to work, so I would say yes.
@bennothommo any thoughts?
I assume the new Markdown parser is probably applying some escaping on the URLs for links, whereas the old Parsedown library didn't. I do feel that those variables should be parsed before Markdown however, so if that's not the case, I'll fix that.
@bennothommo You must have had really good reasons to change the parser, but it has created quite a bit of BC... and now you're saying it can't even be extended easily because of final class/methods ?
@mjauvin I'd argue it's only been edge cases so far. Given how prevalent it's used in the Blog and Docs plugins, it's been surprisingly smooth if I'm being honest, especially since Parsedown was very loose with its following of standards whilst CommonMark is more strict.
Seems I've been hitting all those "edge cases" myself... ;)
True - which means either you have very bad luck, or people are silent on the matter. But either way, I still feel it was a net positive. :stuck_out_tongue:
@mjauvin is this still an issue for you?
@LukeTowers it still is, but I'm now using Winter.Parsedown
plugin to revert to the old parser when needed.
Winter CMS Build
dev-develop
PHP Version
8.1
Database engine
MySQL/MariaDB
Plugins installed
No response
Issue description
The new markdown parser fails in a contend file when using a content variable in place of a static url.
Steps to replicate
Using this markup in a CMS page:
And this content file:
Workaround
Using
<a href="{url}">click here</a>
tag in the content file works.