Parser has problem parsing some markdown links properly

markdown

(Aahan Krish) #1

For example, why does this:

[Tom Cruise](http://www.tomcruise.com/blog/2010/10/08/visual-effects-artist-3d-training-post-production/)

turn into this:

Tom Cruise

Why O’ Why? :angry: Please tell me this is a bug, and unintended. @eviltrout?


(Robin Ward) #2

It has oneboxed the link and embedded it, which seems correct to me unless I’m missing something?


(Brentley Jones) #3

It’s a link, not a raw address. I believe it should only onebox raw urls, not [Markdown links][].


(Aahan Krish) #4

@eviltrout Shouldn’t oneboxing only occur when ‘only’ the URL is pasted on its own line? I mean, something like this:

http://www.tomcruise.com/blog/2010/10/08/visual-effects-artist-3d-training-post-production/

But it’s also oneboxing this:

[Tom Cruise](http://www.tomcruise.com/blog/2010/10/08/visual-effects-artist-3d-training-post-production/)

(Robin Ward) #5

@codinghorror what do you think about this? The engine is smart enough to onebox any link on one line. Should it not do it to markdown links? I am not sure.


(Brentley Jones) #6

We lose functionality by having it assume we want to onebox markdown links (since we can’t opt out of it).


(Aahan Krish) #7

To be honest, I am surprised that we are even having a discussion on this. :astonished:


(Jeff Atwood) #8

It is not a big deal either way, but I do not think this should be oneboxed

[Tom Cruise](http://www.tomcruise.com/blog/2010/10/08/visual-effects-artist-3d-training-post-production/)

But this should

[http://www.tomcruise.com/blog/2010/10/08/visual-effects-artist-3d-training-post-production/](http://www.tomcruise.com/blog/2010/10/08/visual-effects-artist-3d-training-post-production/)

(Aahan Krish) #9

Agree, that makes sense.


(Robin Ward) #10

Okay I’ve implemented this. It’s not deployed yet but will go out the next time we deploy:

https://github.com/discourse/discourse/commit/a9f34892374305638261f91e2e511267e20e8754


(Jeff Atwood) #11

Yep confirmed fixed.


(Jeff Atwood) #12