public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* pandoc use of embed vs img tags?
@ 2014-04-22 23:31 Carl Boettiger
       [not found] ` <CAN_1p9wWBycmmZoJNpOWovteMFDbaB4pGLaLBqsOcRyyzqdQ_g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Carl Boettiger @ 2014-04-22 23:31 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

[-- Attachment #1: Type: text/plain, Size: 1583 bytes --]

Hi List,

If I construct a linked svg image in markdown such as:

[![Build Status](
https://travis-ci.org/cboettig/labnotebook.svg?branch=master)](https://travis-ci.org/cboettig/labnotebook
)

Pandoc seems to construct the HTML with an embed element instead of an
image element like I expected:

<a href="https://travis-ci.org/cboettig/labnotebook"><embed src="
https://travis-ci.org/cboettig/labnotebook.svg?branch=master" /></a>


It seems embed elements are not viable content for an anchor element, the
result being that the graphic is correctly displayed but cannot be clicked
on for a link, so the link text does nothing.

Why is pandoc using an embed element in this case?  (It seems to be
triggered by the presence of the query part of the link, which admittedly
means the link doesn't end in .svg, but this doesn't seem to trouble, for
instance, the github markdown parser).  Is there a way to work around this?


Thanks,

Carl

-- 
Carl Boettiger
UC Santa Cruz
http://carlboettiger.info/

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CAN_1p9wWBycmmZoJNpOWovteMFDbaB4pGLaLBqsOcRyyzqdQ_g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #2: Type: text/html, Size: 3018 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: pandoc use of embed vs img tags?
       [not found] ` <CAN_1p9wWBycmmZoJNpOWovteMFDbaB4pGLaLBqsOcRyyzqdQ_g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2014-04-23  6:08   ` John MacFarlane
  2014-04-26 19:04   ` John MacFarlane
  2014-06-07 22:02   ` Serge Stroobandt
  2 siblings, 0 replies; 6+ messages in thread
From: John MacFarlane @ 2014-04-23  6:08 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

This is a bug, and should be fairly easy to fix -- just a matter
of stripping off the query before checking the image extension.

+++ Carl Boettiger [Apr 22 14 16:31 ]:
>   Hi List,
>   If I construct a linked svg image in markdown such as:
>   [![Build
>   Status]([1]https://travis-ci.org/cboettig/labnotebook.svg?branch=master
>   )](https://travis-ci.org/cboettig/labnotebook)
>   Pandoc seems to construct the HTML with an embed element instead of an
>   image element like I expected:
>   <a href="[2]https://travis-ci.org/cboettig/labnotebook"><embed
>   src="[3]https://travis-ci.org/cboettig/labnotebook.svg?branch=master"
>   /></a>
>   It seems embed elements are not viable content for an anchor element,
>   the result being that the graphic is correctly displayed but cannot be
>   clicked on for a link, so the link text does nothing.
>   Why is pandoc using an embed element in this case?  (It seems to be
>   triggered by the presence of the query part of the link, which
>   admittedly means the link doesn't end in .svg, but this doesn't seem to
>   trouble, for instance, the github markdown parser).  Is there a way to
>   work around this?
>   Thanks,
>   Carl
>   --
>   Carl Boettiger
>   UC Santa Cruz
>   [4]http://carlboettiger.info/
>
>   --
>   You received this message because you are subscribed to the Google
>   Groups "pandoc-discuss" group.
>   To unsubscribe from this group and stop receiving emails from it, send
>   an email to [5]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>   To post to this group, send email to
>   [6]pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>   To view this discussion on the web visit
>   [7]https://groups.google.com/d/msgid/pandoc-discuss/CAN_1p9wWBycmmZoJNp
>   OWovteMFDbaB4pGLaLBqsOcRyyzqdQ_g%40mail.gmail.com.
>   For more options, visit [8]https://groups.google.com/d/optout.
>
>References
>
>   1. https://travis-ci.org/cboettig/labnotebook.svg?branch=master)](https://travis-ci.org/cboettig/labnotebook
>   2. https://travis-ci.org/cboettig/labnotebook
>   3. https://travis-ci.org/cboettig/labnotebook.svg?branch=master
>   4. http://carlboettiger.info/
>   5. mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>   6. mailto:pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>   7. https://groups.google.com/d/msgid/pandoc-discuss/CAN_1p9wWBycmmZoJNpOWovteMFDbaB4pGLaLBqsOcRyyzqdQ_g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org?utm_medium=email&utm_source=footer
>   8. https://groups.google.com/d/optout


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: pandoc use of embed vs img tags?
       [not found] ` <CAN_1p9wWBycmmZoJNpOWovteMFDbaB4pGLaLBqsOcRyyzqdQ_g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  2014-04-23  6:08   ` John MacFarlane
@ 2014-04-26 19:04   ` John MacFarlane
  2014-06-07 22:02   ` Serge Stroobandt
  2 siblings, 0 replies; 6+ messages in thread
From: John MacFarlane @ 2014-04-26 19:04 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

Fixed, 35ea8de3690fcd9bf06532576ced4d82fd51f26d

+++ Carl Boettiger [Apr 22 14 16:31 ]:
>   Hi List,
>   If I construct a linked svg image in markdown such as:
>   [![Build
>   Status]([1]https://travis-ci.org/cboettig/labnotebook.svg?branch=master
>   )](https://travis-ci.org/cboettig/labnotebook)
>   Pandoc seems to construct the HTML with an embed element instead of an
>   image element like I expected:
>   <a href="[2]https://travis-ci.org/cboettig/labnotebook"><embed
>   src="[3]https://travis-ci.org/cboettig/labnotebook.svg?branch=master"
>   /></a>
>   It seems embed elements are not viable content for an anchor element,
>   the result being that the graphic is correctly displayed but cannot be
>   clicked on for a link, so the link text does nothing.
>   Why is pandoc using an embed element in this case?  (It seems to be
>   triggered by the presence of the query part of the link, which
>   admittedly means the link doesn't end in .svg, but this doesn't seem to
>   trouble, for instance, the github markdown parser).  Is there a way to
>   work around this?
>   Thanks,
>   Carl
>   --
>   Carl Boettiger
>   UC Santa Cruz
>   [4]http://carlboettiger.info/
>
>   --
>   You received this message because you are subscribed to the Google
>   Groups "pandoc-discuss" group.
>   To unsubscribe from this group and stop receiving emails from it, send
>   an email to [5]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>   To post to this group, send email to
>   [6]pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>   To view this discussion on the web visit
>   [7]https://groups.google.com/d/msgid/pandoc-discuss/CAN_1p9wWBycmmZoJNp
>   OWovteMFDbaB4pGLaLBqsOcRyyzqdQ_g%40mail.gmail.com.
>   For more options, visit [8]https://groups.google.com/d/optout.
>
>References
>
>   1. https://travis-ci.org/cboettig/labnotebook.svg?branch=master)](https://travis-ci.org/cboettig/labnotebook
>   2. https://travis-ci.org/cboettig/labnotebook
>   3. https://travis-ci.org/cboettig/labnotebook.svg?branch=master
>   4. http://carlboettiger.info/
>   5. mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>   6. mailto:pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>   7. https://groups.google.com/d/msgid/pandoc-discuss/CAN_1p9wWBycmmZoJNpOWovteMFDbaB4pGLaLBqsOcRyyzqdQ_g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org?utm_medium=email&utm_source=footer
>   8. https://groups.google.com/d/optout


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: pandoc use of embed vs img tags?
       [not found] ` <CAN_1p9wWBycmmZoJNpOWovteMFDbaB4pGLaLBqsOcRyyzqdQ_g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  2014-04-23  6:08   ` John MacFarlane
  2014-04-26 19:04   ` John MacFarlane
@ 2014-06-07 22:02   ` Serge Stroobandt
       [not found]     ` <2db43ff0-f397-437e-9156-33aac837e814-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  2 siblings, 1 reply; 6+ messages in thread
From: Serge Stroobandt @ 2014-06-07 22:02 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

[-- Attachment #1: Type: text/plain, Size: 747 bytes --]

I have a similar issue with an image that used to get coded as <img>, but 
now is coded as an <embed>:
http://www.meteox.com/images.aspx?jaar=-3&voor=&soort=exp&c=&n=&tijdid=

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/2db43ff0-f397-437e-9156-33aac837e814%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #2: Type: text/html, Size: 1201 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: pandoc use of embed vs img tags?
       [not found]     ` <2db43ff0-f397-437e-9156-33aac837e814-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2014-06-09  4:12       ` John MacFarlane
       [not found]         ` <20140609041225.GA40684-9Rnp8PDaXcZ2EAH53EmH34tHsfhOvSUSZkel5v8DVj8@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: John MacFarlane @ 2014-06-09  4:12 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

In this case pandoc sees the .aspx extension and has no way of
knowing that this is something that should be coded as img,
rather than embed, because the content could be anything.

+++ Serge Stroobandt [Jun 07 14 15:02 ]:
>   I have a similar issue with an image that used to get coded as <img>,
>   but now is coded as an <embed>:
>   http://www.meteox.com/images.aspx?jaar=-3&voor=&soort=exp&c=&n=&tijdid=
>
>   --
>   You received this message because you are subscribed to the Google
>   Groups "pandoc-discuss" group.
>   To unsubscribe from this group and stop receiving emails from it, send
>   an email to [1]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>   To post to this group, send email to
>   [2]pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>   To view this discussion on the web visit
>   [3]https://groups.google.com/d/msgid/pandoc-discuss/2db43ff0-f397-437e-
>   9156-33aac837e814%40googlegroups.com.
>   For more options, visit [4]https://groups.google.com/d/optout.
>
>References
>
>   1. mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>   2. mailto:pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>   3. https://groups.google.com/d/msgid/pandoc-discuss/2db43ff0-f397-437e-9156-33aac837e814-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org?utm_medium=email&utm_source=footer
>   4. https://groups.google.com/d/optout


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: pandoc use of embed vs img tags?
       [not found]         ` <20140609041225.GA40684-9Rnp8PDaXcZ2EAH53EmH34tHsfhOvSUSZkel5v8DVj8@public.gmane.org>
@ 2018-10-01 16:57           ` B R
  0 siblings, 0 replies; 6+ messages in thread
From: B R @ 2018-10-01 16:57 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 2730 bytes --]

Sorry for necro, but this is indeed a bug. John, I see where you're coming 
from, but nowadays more and more image hosting services (e.g. Imgur) no 
longer use image file name extensions in their url. Pandoc could at least 
offer an option to force them being converted to <img> insted of embed. The 
problem is that the translation to <embed> uses a different output than the 
one to <img> ... in particular, ![Imgur](http://imgur.com/blabla) puts the 
string "Imgur" into a new paragraph underneath in <p>, messing up the flow. 
Lots of manual fixes needed ...

On Monday, June 9, 2014 at 5:12:39 AM UTC+1, John MacFarlane wrote:
>
> In this case pandoc sees the .aspx extension and has no way of 
> knowing that this is something that should be coded as img, 
> rather than embed, because the content could be anything. 
>
> +++ Serge Stroobandt [Jun 07 14 15:02 ]: 
> >   I have a similar issue with an image that used to get coded as <img>, 
> >   but now is coded as an <embed>: 
> >   
> http://www.meteox.com/images.aspx?jaar=-3&voor=&soort=exp&c=&n=&tijdid= 
> > 
> >   -- 
> >   You received this message because you are subscribed to the Google 
> >   Groups "pandoc-discuss" group. 
> >   To unsubscribe from this group and stop receiving emails from it, send 
> >   an email to [1]pandoc-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <javascript:>. 
> >   To post to this group, send email to 
> >   [2]pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <javascript:>. 
> >   To view this discussion on the web visit 
> >   [3]
> https://groups.google.com/d/msgid/pandoc-discuss/2db43ff0-f397-437e- 
> >   9156-33aac837e814%40googlegroups.com. 
> >   For more options, visit [4]https://groups.google.com/d/optout. 
> > 
> >References 
> > 
> >   1. mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <javascript:> 
> >   2. mailto:pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <javascript:> 
> >   3. 
> https://groups.google.com/d/msgid/pandoc-discuss/2db43ff0-f397-437e-9156-33aac837e814-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org?utm_medium=email&utm_source=footer 
> >   4. https://groups.google.com/d/optout 
>

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/2b42cc56-7ba6-4bd5-80f2-978e9f925102%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #1.2: Type: text/html, Size: 6739 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-10-01 16:57 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-22 23:31 pandoc use of embed vs img tags? Carl Boettiger
     [not found] ` <CAN_1p9wWBycmmZoJNpOWovteMFDbaB4pGLaLBqsOcRyyzqdQ_g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-04-23  6:08   ` John MacFarlane
2014-04-26 19:04   ` John MacFarlane
2014-06-07 22:02   ` Serge Stroobandt
     [not found]     ` <2db43ff0-f397-437e-9156-33aac837e814-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2014-06-09  4:12       ` John MacFarlane
     [not found]         ` <20140609041225.GA40684-9Rnp8PDaXcZ2EAH53EmH34tHsfhOvSUSZkel5v8DVj8@public.gmane.org>
2018-10-01 16:57           ` B R

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).