Open michael-e opened 10 years ago
As far as I remember, the markdown parser isn't written by the Symphony team, nor is the html purifier. So better to inform Michel Fortin (markdown) on this potential bug (don't know where the html purifier lib comes from).
@symphonycms apart form that. There're a lot of well working md libs out there nowadays. Would switching be an option?
EDIT: https://github.com/dotink/markdown and its variations are really good.
Indeed! I tested the Dingus, and it shows the same result! Hard to believe.
John Gruber's Markdown dingus page works fine, however. :-)
But it seems to have some serious bugs. :-(
I informed Michel Fortin. BTW, the issue is in "Markdown", but doesn't arise with the "Markdown Extra" flavour.
Maybe I will work around this by wrapping the original PERL version of Markdown into a textformatter. (I don't use any extended Syntax anyway.)
@michael-e Maybe give CommonMark a try?
That looks very interesting, but wouldn't be 100 percent backward-compatible for me. I haven't read the complete spec, but I have found at least one CommonMark rule that would make problems with the "personal notation preference" of some of my authors.
Thanks for pointing me to your extension!
Still no news on the PHP Markdown issue.
@jensscherbl: I will probably use CommonMark in a current project, and I don't expect any issues (given the simplicity of your extension). Otherwise, well... I will send the usual alarms then. :-)
@michael-e Maybe give CommonMark a try?
I've been using @jensscherbl CommonMark as soon as it got released and I am really pleased with it. I also adapted the editor_for_symphony extensions in order to make it work with CommonMark.
The library I use is now part of thephpleague.com, by the way.
It's still moving pretty fast regarding new version numbers at the moment, so my extension isn't always up-to-date, but shouldn't be a problem. Plus you could always try and update the dependency via composer on your own.
There's also a standalone HTML Purifier extension now, but not very useful at the moment. I really hope to find some time to continue work on fields and text formatters soon.
The Markdown extension seems to do nonsense, at least since version 1.10 (which is the oldest version that I could test with Symphony 2.3.6).
Using the
Markdown
formatter and the following input:I get this result:
Using
Markdown (With HTML Purifier)
and the same input get the following result:Both is terribly wrong. Markdown shouldn't touch valid HTML.
How can this be?