* Convert Pandoc Markdown to Pandoc Markdown; Inline to Reference Link for Nested Links!
@ 2019-07-02 16:34 Nikhil Agarwal
[not found] ` <f06b22ca-2ce6-488d-a7b4-3c17323bc388-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Nikhil Agarwal @ 2019-07-02 16:34 UTC (permalink / raw)
To: pandoc-discuss
[-- Attachment #1.1: Type: text/plain, Size: 1738 bytes --]
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.
[-- Attachment #1.2: Type: text/html, Size: 2640 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Convert Pandoc Markdown to Pandoc Markdown; Inline to Reference Link for Nested Links!
[not found] ` <f06b22ca-2ce6-488d-a7b4-3c17323bc388-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2019-07-03 10:04 ` John MacFarlane
0 siblings, 0 replies; 2+ messages in thread
From: John MacFarlane @ 2019-07-03 10:04 UTC (permalink / raw)
To: Nikhil Agarwal, pandoc-discuss
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.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-07-03 10:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-02 16:34 Convert Pandoc Markdown to Pandoc Markdown; Inline to Reference Link for Nested Links! Nikhil Agarwal
[not found] ` <f06b22ca-2ce6-488d-a7b4-3c17323bc388-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2019-07-03 10:04 ` 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).