Question

So I have a site that uses the PHP Markdown Extra extension (with added support for Github Flavored Markdown) and up until recently everything worked fine. However today I noticed both on my live server and my local environment that Markdown was not rendering the link syntax in HTML.

So this is more or less what I was getting with every file.

"<p>[link](http://kellybecker.me)</p>" === Markdown("[link](http://kellybecker.me)");

I don't know why this is happening and I can't find any other instance of this happening anywhere with this library, and I could not find another library that was just as good.

If anyone could give me any tips to why this is happening that would be wonderful. The source code for the markdown parser is at https://github.com/EvolutionSDK/EvolutionSDK/tree/master/bundles/markdown and an example of this happening on a live site is http://youmacon.com (hopefully by the time you look at the live site example it will be fixed).

Could this have something to do with me running the framework out of a Phar?

Was it helpful?

Solution

Turns out the issue was that PHP Markdown cannot run properly in a namespace. When I removed the namespace the issue went away. (Weird) I'll look into that later and maybe submit a pull request.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top