* Rewriting extensions in links @ 2016-12-07 20:37 candlerb [not found] ` <dd8b5357-f55d-4257-93fd-64c0dc1f99f4-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> 0 siblings, 1 reply; 4+ messages in thread From: candlerb @ 2016-12-07 20:37 UTC (permalink / raw) To: pandoc-discuss [-- Attachment #1.1: Type: text/plain, Size: 1175 bytes --] Suppose I have a markdown file "foo.md" which contains links [like this](target.md), pointing at other markdown files in the directory. When I convert this to HTML I would like the link target to be "target.html" rather than "target.md", since all the files have been converted from md to html. Is there a straightforward way to do this? I looked through the list of third-party filters: https://github.com/jgm/pandoc/wiki/Pandoc-Filters and didn't see anything - but maybe this is functionality built-in to pandoc that I've overlooked? Or would I have to write a filter myself? Thanks, Brian. -- 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/dd8b5357-f55d-4257-93fd-64c0dc1f99f4%40googlegroups.com. For more options, visit https://groups.google.com/d/optout. [-- Attachment #1.2: Type: text/html, Size: 1765 bytes --] ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <dd8b5357-f55d-4257-93fd-64c0dc1f99f4-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>]
* Re: Rewriting extensions in links [not found] ` <dd8b5357-f55d-4257-93fd-64c0dc1f99f4-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> @ 2016-12-07 21:29 ` Joost Kremers [not found] ` <878trrjuly.fsf-97jfqw80gc6171pxa8y+qA@public.gmane.org> 2016-12-08 10:52 ` John MacFarlane 1 sibling, 1 reply; 4+ messages in thread From: Joost Kremers @ 2016-12-07 21:29 UTC (permalink / raw) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw On Wed, Dec 07 2016, candlerb wrote: > Suppose I have a markdown file "foo.md" which contains links > [like > this](target.md), pointing at other markdown files in the > directory. > > When I convert this to HTML I would like the link target to be > "target.html" rather than "target.md", since all the files have > been > converted from md to html. > > Is there a straightforward way to do this? Are you only converting to html? If so, why don't you just write [like this](target.html)? If you're converting to more than one output format and want the links to use the extension of the output format, you're probably looking at some scripting. I'm fairly sure Pandoc doesn't do this. -- Joost Kremers Life has its moments ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <878trrjuly.fsf-97jfqw80gc6171pxa8y+qA@public.gmane.org>]
* Re: Rewriting extensions in links [not found] ` <878trrjuly.fsf-97jfqw80gc6171pxa8y+qA@public.gmane.org> @ 2016-12-07 21:39 ` candlerb 0 siblings, 0 replies; 4+ messages in thread From: candlerb @ 2016-12-07 21:39 UTC (permalink / raw) To: pandoc-discuss [-- Attachment #1.1: Type: text/plain, Size: 1109 bytes --] On Wednesday, 7 December 2016 21:29:49 UTC, Joost wrote: > > > Are you only converting to html? If so, why don't you just write > [like this](target.html)? > > Because .md files can point to .md files when rendered by (e.g.) github or gitlab. It's nice to keep that. > If you're converting to more than one output format and want the > links to use the extension of the output format, you're probably > looking at some scripting. I'm fairly sure Pandoc doesn't do this. > > At least it's not just me then :-) Thanks, Brian. -- 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/cf23f37b-b9e5-481c-8683-1b89a46aca9f%40googlegroups.com. For more options, visit https://groups.google.com/d/optout. [-- Attachment #1.2: Type: text/html, Size: 1960 bytes --] ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Rewriting extensions in links [not found] ` <dd8b5357-f55d-4257-93fd-64c0dc1f99f4-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> 2016-12-07 21:29 ` Joost Kremers @ 2016-12-08 10:52 ` John MacFarlane 1 sibling, 0 replies; 4+ messages in thread From: John MacFarlane @ 2016-12-08 10:52 UTC (permalink / raw) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw This filter would be extremely simple to write. You just match on Link, check the url, and modify it if needed. +++ candlerb [Dec 07 16 12:37 ]: > Suppose I have a markdown file "foo.md" which contains links [like > this](target.md), pointing at other markdown files in the directory. > When I convert this to HTML I would like the link target to be > "target.html" rather than "target.md", since all the files have been > converted from md to html. > Is there a straightforward way to do this? > I looked through the list of third-party filters: > https://github.com/jgm/pandoc/wiki/Pandoc-Filters > and didn't see anything - but maybe this is functionality built-in to > pandoc that I've overlooked? Or would I have to write a filter myself? > Thanks, > Brian. > > -- > 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/dd8b5357-f55d-4257- > 93fd-64c0dc1f99f4%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/dd8b5357-f55d-4257-93fd-64c0dc1f99f4-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org?utm_medium=email&utm_source=footer > 4. https://groups.google.com/d/optout ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-12-08 10:52 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2016-12-07 20:37 Rewriting extensions in links candlerb [not found] ` <dd8b5357-f55d-4257-93fd-64c0dc1f99f4-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> 2016-12-07 21:29 ` Joost Kremers [not found] ` <878trrjuly.fsf-97jfqw80gc6171pxa8y+qA@public.gmane.org> 2016-12-07 21:39 ` candlerb 2016-12-08 10:52 ` 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).