public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* Pandoc and dynamically generated JavaScript URLs
@ 2021-08-18 14:19 Joaquin Garcia
       [not found] ` <CALJ=7rGPR1B06DrKEsss1P9SBt3yARkn2n+kL+Wo4SiNNwpMHA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Joaquin Garcia @ 2021-08-18 14:19 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

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

I am working in RStudio and changed from using knit2html to
rmarkdown::render to render an RMD file which generates some plots using
GoogleVis. The issue is that the .MD file contains the proper link to the
script URL but Pandoc is pasting the script contents into the URL, because
the file is self-contained.

Currently in .MD file (should stay):

<script type="text/javascript" src="foo"></script>

What Pandoc produces:

<script type="text/javascript" src="contents_of_foo"></script>

How do I stop this from happening?

-- 
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 view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CALJ%3D7rGPR1B06DrKEsss1P9SBt3yARkn2n%2BkL%2BWo4SiNNwpMHA%40mail.gmail.com.

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

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

* Re: Pandoc and dynamically generated JavaScript URLs
       [not found] ` <CALJ=7rGPR1B06DrKEsss1P9SBt3yARkn2n+kL+Wo4SiNNwpMHA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2021-08-18 15:29   ` BPJ
  2021-08-18 16:06   ` Gwern Branwen
  2021-08-18 16:13   ` John MacFarlane
  2 siblings, 0 replies; 4+ messages in thread
From: BPJ @ 2021-08-18 15:29 UTC (permalink / raw)
  To: pandoc-discuss

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

One workaround would be to place some placeholder which doesn't point at
the actual script in the src attribute value. Maybe it would work to have
it point to a file containing the path to the actual script and thus get
the path to the actual script inserted. Say the actual script is at
script/foo.js. Rather than putting `src="script/foo.js"` in your source you
put `src="dummy/foo.js"` and the file dummy/foo.js contains the text
"script/foo.js". Might work.

Den ons 18 aug. 2021 16:20Joaquin Garcia <garcizeppelin-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> skrev:

> I am working in RStudio and changed from using knit2html to
> rmarkdown::render to render an RMD file which generates some plots using
> GoogleVis. The issue is that the .MD file contains the proper link to the
> script URL but Pandoc is pasting the script contents into the URL, because
> the file is self-contained.
>
> Currently in .MD file (should stay):
>
> <script type="text/javascript" src="foo"></script>
>
> What Pandoc produces:
>
> <script type="text/javascript" src="contents_of_foo"></script>
>
> How do I stop this from happening?
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/pandoc-discuss/CALJ%3D7rGPR1B06DrKEsss1P9SBt3yARkn2n%2BkL%2BWo4SiNNwpMHA%40mail.gmail.com
> <https://groups.google.com/d/msgid/pandoc-discuss/CALJ%3D7rGPR1B06DrKEsss1P9SBt3yARkn2n%2BkL%2BWo4SiNNwpMHA%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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 view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CADAJKhD4GoaKRvxR8Jam6CtFKDLFcWuzSdRW1xt3B4ie7eqR7Q%40mail.gmail.com.

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

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

* Re: Pandoc and dynamically generated JavaScript URLs
       [not found] ` <CALJ=7rGPR1B06DrKEsss1P9SBt3yARkn2n+kL+Wo4SiNNwpMHA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  2021-08-18 15:29   ` BPJ
@ 2021-08-18 16:06   ` Gwern Branwen
  2021-08-18 16:13   ` John MacFarlane
  2 siblings, 0 replies; 4+ messages in thread
From: Gwern Branwen @ 2021-08-18 16:06 UTC (permalink / raw)
  To: pandoc-discuss

Why is the generated file self-contained?

-- 
gwern
https://www.gwern.net


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

* Re: Pandoc and dynamically generated JavaScript URLs
       [not found] ` <CALJ=7rGPR1B06DrKEsss1P9SBt3yARkn2n+kL+Wo4SiNNwpMHA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  2021-08-18 15:29   ` BPJ
  2021-08-18 16:06   ` Gwern Branwen
@ 2021-08-18 16:13   ` John MacFarlane
  2 siblings, 0 replies; 4+ messages in thread
From: John MacFarlane @ 2021-08-18 16:13 UTC (permalink / raw)
  To: Joaquin Garcia, pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw


If pandoc is used with the --self-contained option, that's
what it will do -- make the HTML self-contained, so it depends
on no other resources.

However, you can disable this in an element (such as a script
tag) by adding the attribute data-external="1".


Joaquin Garcia <garcizeppelin-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:

> I am working in RStudio and changed from using knit2html to
> rmarkdown::render to render an RMD file which generates some plots using
> GoogleVis. The issue is that the .MD file contains the proper link to the
> script URL but Pandoc is pasting the script contents into the URL, because
> the file is self-contained.
>
> Currently in .MD file (should stay):
>
> <script type="text/javascript" src="foo"></script>
>
> What Pandoc produces:
>
> <script type="text/javascript" src="contents_of_foo"></script>
>
> How do I stop this from happening?
>
> -- 
> 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 view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CALJ%3D7rGPR1B06DrKEsss1P9SBt3yARkn2n%2BkL%2BWo4SiNNwpMHA%40mail.gmail.com.


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

end of thread, other threads:[~2021-08-18 16:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-18 14:19 Pandoc and dynamically generated JavaScript URLs Joaquin Garcia
     [not found] ` <CALJ=7rGPR1B06DrKEsss1P9SBt3yARkn2n+kL+Wo4SiNNwpMHA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2021-08-18 15:29   ` BPJ
2021-08-18 16:06   ` Gwern Branwen
2021-08-18 16:13   ` John MacFarlane

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).