Hello, markdown (Python implementation) seems to render: ![alternativer text](pfad/und/eine lange/url zum bild.jpg) to <img src="pfad/und/eine" title="lange/url zum bild.jpg" alt="alternativer text"/> breaking the URL at the whitespace. AFAIK whitespaces are ok in URLs so why is it breaking up the URL here? Thanks, Florian -- I'm using an evaluation license of nemo since 77 days. You should really try it! http://www.malcom-mac.com/nemo
Am Montag, 25. Februar 2008 schrieb Florian Lindner:> Hello, > markdown (Python implementation) seems to render: > > ![alternativer text](pfad/und/eine lange/url zum bild.jpg) > > to > > <img src="pfad/und/eine" title="lange/url zum bild.jpg" > alt="alternativer text"/> > > breaking the URL at the whitespace. AFAIK whitespaces are ok in URLs > so why is it breaking up the URL here? > > Thanks, > > FlorianNo, whitespaces are not ok, you should encode them as "%20" without the double quotes. But I'd like to see an extension to Markdown that you could write: ![alternativer text]("pfad/und/eine lange/url zum bild.jpg" testtitle) Which would be outputted as: <img src="pfad/und/eine%20lange/url%20zum%20bild.jpg" alt="alternativer text" title="testtitle" /> -- Milian Wolff http://milianw.de OpenPGP key: CD1D1393 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part. Url : <http://six.pairlist.net/pipermail/markdown-discuss/attachments/20080225/e78ea095/attachment.pgp>
Hi, On 25.02.2008, at 22:38:17, Florian Lindner wrote:> markdown (Python implementation) seems to render: > > ![alternativer text](pfad/und/eine lange/url zum bild.jpg) > > to > > <img src="pfad/und/eine" title="lange/url zum bild.jpg" > alt="alternativer text"/> > > breaking the URL at the whitespace. AFAIK whitespaces are ok in URLs > so why is it breaking up the URL here?Yeah, I'd say the python implementation isn't expecting spaces in a URL and in this case decides the rest of the URL belongs into the title. Markdown.pl only does this when it encounters a ". It basically sees this: ![alternativer text](pfad/und/eine "lange/url zum bild.jpg") But while we're finding bugs(?) with the image syntax, Markdown.pl converts this to <p>!<a href="pfad/und/eine lange/url zum bild.jpg">alternativer text</ a></p> And does so until all spaces are removed from the URL. Only then does it get rendered as <img>. Arguably you could work around this by encoding all spaces as %20, but then again one might expect Markdown to do this. Greetings, _Lasar -- _Lasar Liepins lasar at liepins.net http://liepins.net/ http://10110101.net/ -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2550 bytes Desc: not available Url : <http://six.pairlist.net/pipermail/markdown-discuss/attachments/20080225/d88697f2/attachment.bin>
In article <nemoMon022508103428 at news.lrz-muenchen.de>, Florian Lindner <markdown-discuss at six.pairlist.net> wrote:>Hello, >markdown (Python implementation) seems to render: > >![alternativer text](pfad/und/eine lange/url zum bild.jpg) > >to > ><img src="pfad/und/eine" title="lange/url zum bild.jpg" >alt="alternativer text"/> > >breaking the URL at the whitespace. AFAIK whitespaces are ok in URLs >so why is it breaking up the URL here?Because spaces are how it separates the url from the title text? I know the reference version doesn't do it that way, but wouldn't the <> url wrappers be good for wrapping around urls that contain wonky items? I ignored that behavior of the standard when I wrote my markdown, and use <> as "wrap everything" for urls. -david parsons