public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: John MacFarlane <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org>
To: Nikhil Agarwal
	<explore.na-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	pandoc-discuss
	<pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Subject: Re: Convert Pandoc Markdown to Pandoc Markdown; Inline to Reference Link for Nested Links!
Date: Wed, 03 Jul 2019 03:04:25 -0700	[thread overview]
Message-ID: <87k1czmo2e.fsf@johnmacfarlane.net> (raw)
In-Reply-To: <f06b22ca-2ce6-488d-a7b4-3c17323bc388-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>


Here's what I get with your input when I use the
command

pandoc -t markdown-shortcut_reference_links --reference-links

![Step 1 and 13: [Hasta Uttanasana][]][]

  [Hasta Uttanasana]: https://en.wikipedia.org/wiki/Hasta_Uttanasana
  [Step 1 and 13: [Hasta Uttanasana][]]: https://upload.wikimedia.org/wikipedia/commons/e/ed/2Urdva_Hastasana.JPG

That's what you want, right?  You seem to be running
pandoc through some sort of other program, and I don't
know what version you have?

Nikhil Agarwal <explore.na-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:

> Hi I want to convert the Pandoc Markdown to Pandoc Markdown from Inline to 
> Reference Link for all Nested Links!
>
> For example: 
>
> # Input.md
>
> ```markdown
> ![Step 1 and 13: [Hasta 
> Uttanasana](https://en.wikipedia.org/wiki/Hasta_Uttanasana)](https://upload.wikimedia.org/wikipedia/commons/e/ed/2Urdva_Hastasana.JPG)
> ```
>
> # DesiredOutput.md
>
> ```markdown
> ![Step 1 and 13: [Hasta Uttanasana][]][]
>
> [Hasta Uttanasana]: https://en.wikipedia.org/wiki/Hasta_Uttanasana
> [Step 1 and 13: [Hasta Uttanasana][]]: 
> https://upload.wikimedia.org/wikipedia/commons/e/ed/2Urdva_Hastasana.JPG
> ```
>
> # Output
>
> - I tried the following commands
>
> ```bash
> $ PandocOption="-s --reference-links"
> $ PandocExtension="-f markdown -t markdown-shortcut_reference_links"
> $ pandoc ${PandocOption} ${PandocExtension} Input.md -o Output.md 
> ```
>
> - And I got following output (Output.md) ! The image link has vanished! 
>
> ```markdown
> \[Step 1 and 13: [Hasta Uttanasana][]\]\[\]
>
> [Hasta Uttanasana]: https://en.wikipedia.org/wiki/Hasta_Uttanasana
> ```
>
> -----------------------------------------------------
>
> Is it possible to get the Desired Output  as shown above as the 
> DesiredOutput.md?
>
> Thanks!
>
> Nikhil
>
> -- 
> 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/f06b22ca-2ce6-488d-a7b4-3c17323bc388%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.


      parent reply	other threads:[~2019-07-03 10:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-02 16:34 Nikhil Agarwal
     [not found] ` <f06b22ca-2ce6-488d-a7b4-3c17323bc388-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2019-07-03 10:04   ` John MacFarlane [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87k1czmo2e.fsf@johnmacfarlane.net \
    --to=jgm-tvlzxgkolnx2fbvcvol8/a@public.gmane.org \
    --cc=explore.na-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).