Support community for TTG plugins and products.
NOTICE
The Turning Gate's Community has moved to a new home, at https://discourse.theturninggate.net.
This forum is now closed, and exists here as a read-only archive.
You are not logged in.
Pages: 1
In trying to use markdown to specify a link with a URL that has embedded parentheses, I tried to use the "\" escape before the final parenthesis to avoid mis-interpretation of the ")" as a markdown control character. Using MOU translation to HTML, it worked. But when the markdown is translated on the site, the link is faulty. Here is the actual markdown text from my fragments folder:
[Gardelegen War Crime Wikipedia](http://tinyurl.com/my6kala)
[Gardelegen War Crime Wikipedia](http://en.wikipedia.org/wiki/Gardelegen_(war_crime\))
Here is the page in question: http://www.michaelrichardsphotography.com/services.php
I solved the problem with tinyURL, but left both links on the site in case you want to check them out. There are two "Gardelegen War Crime Wikipedia" links. The first works, the second does not.
I've had several email exchanges with the MOU CEO, Chen Luo. He claims his software is doing the markdown translation right, and it would seem so according to the Daring Fireball Syntax document. I'm not sure what engine TTG is using, but it may be worth looking into.
Mike Richards
michaelrichardsphotography.com
Offline
I would just use HTML for that particular link.
Offline
Matt, there's another solution - reference link. They are delineated by spaces and/or return.
These are the actual markdown lines from fragments:
* [Gardelegen War Crime Wikipedia](http://tinyurl.com/my6kala)
* [Gardelegen War Crime Wikipedia](http://en.wikipedia.org/wiki/Gardelegen_(war_crime\))
* [Gardelegen War Crime Wikipedia] [1]
[1]: http://en.wikipedia.org/wiki/Gardelegen_(war_crime)
Again, here's the URL if you want to check it: http://www.michaelrichardsphotography.com/services.php
The third link works just fine. It seems this is a better solution since I like to keep everything in markdown for readability purposes. The tinyURL depends on their website and may cause processing time or other future problems.
Last edited by richam (2014-09-17 18:48:40)
Mike Richards
michaelrichardsphotography.com
Offline
And the second, without the escape character, doesn't work?
Pages is using Parsedown, so I guess the problem is there.
Offline
Matt, The second one doesn't work with or without the escape backslash. Apparently the Parsedown engine picks up the embedded ")" as a Markdown termination. I've even tried escape on both parentheses, same problem. It appears that Parsedown is the problem, since it works with MOU.
Mike Richards
michaelrichardsphotography.com
Offline
Matt, I tried with the Parsedown on line Demo, and the problem is obvious:
Input:
Output:
In the first case, the "\" is taken as the end of the URL, and the ")" is moved outside the generated HTML. In the second one, again the ")" is again moved outside the HTML. The third one is correct and it works.
Last edited by richam (2014-09-18 00:10:06)
Mike Richards
michaelrichardsphotography.com
Offline
As a quick fix, you can use 'URL encoding' for the embedded parenthesis:
[Gardelegen War Crime Wikipedia](http://en.wikipedia.org/wiki/Gardelegen_%28war_crime%29)
Daniel Leu | Photography
DanielLeu.com
My digital playground (eg, Backlight tips&tricks): lab.DanielLeu.com
Offline
That's a good idea, Daniel. Nice one!
Michael, it might be worth posting about your issue on Parsedown's Github:
https://github.com/erusev/parsedown/issues
Offline
Daniel, Absolutely brilliant! Thanks.
Matt, good suggestion. I joined github and reported the problem.
Mike Richards
michaelrichardsphotography.com
Offline
Pages: 1