public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: BP Jonsson <bpjonsson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Nick Moffitt <nick-iTLVOByc1N8@public.gmane.org>,
	pandoc-discuss
	<pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Subject: Re: Header self-links gone?
Date: Thu, 24 Nov 2016 00:24:37 +0100	[thread overview]
Message-ID: <4ab21d15-9697-c060-61fb-96c32ce41f6e@gmail.com> (raw)
In-Reply-To: <20161123112238.GA8136-iTLVOByc1N8@public.gmane.org>

Den 2016-11-23 kl. 12:22, skrev Nick Moffitt:
> dev.crst-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org:
>> At #1081 <https://github.com/jgm/pandoc/issues/1081> there is the reason 
>> for this.
>>
>> I also missed this feature and my workaround I can live with is a little 
>> javascript in the html-template's header:
> 
> Oh dear.  Part of why I use pandoc is to get AWAY from JavaScript!
> 
> This is extremely disheartening.
> 

If more JavaScript is odious to you a filter which modifies the static content may seem a little better. Here are both a HTML (output) filter

    pandoc -t html5 input.md | perl html-self-links.pl >output.html

and a pandoc filter 

    pandoc -F pandoc-self-links.pl -t html5 input.md -o output.html
 
doing the same thing.

<https://gist.github.com/bpj/963fddaea671c6fd4d2ebe66b27e7960>

I don't know which is faster so you may want to time them if it is important. The html filter has the advantage that you can modify existing HTML files with it.

/bpj


  parent reply	other threads:[~2016-11-23 23:24 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-27 14:10 Nick Moffitt
     [not found] ` <20150227141002.GI5930-iTLVOByc1N8@public.gmane.org>
2015-03-03 18:53   ` John MacFarlane
     [not found]     ` <20150303185309.GH52906-0VdLhd/A9Pm0ooXD8Eul3coeWC+rr2vXTVLZxgkOlNX2fBVCVOL8/A@public.gmane.org>
2015-03-04  8:07       ` Nick Moffitt
2016-11-23 10:51   ` dev.crst-Re5JQEeQqe8AvxtiuMwx3w
     [not found]     ` <ac25089d-f112-4795-8524-ac705b521fcc-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2016-11-23 11:22       ` Nick Moffitt
     [not found]         ` <20161123112238.GA8136-iTLVOByc1N8@public.gmane.org>
2016-11-23 23:24           ` BP Jonsson [this message]
     [not found]             ` <4ab21d15-9697-c060-61fb-96c32ce41f6e-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-11-24 10:43               ` Christoph Strasser
     [not found]                 ` <bb4ed5a7-c81e-420b-bdc6-74a3b675a653-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2016-11-25 21:10                   ` Christoph Strasser
     [not found]                     ` <6049b086-bbeb-642c-2b42-55b38e8d107e-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-11-26 11:25                       ` BP Jonsson
2016-11-23 13:00       ` John MacFarlane
     [not found]         ` <20161123130026.GA88680-jF64zX8BO091tJRe0FUodcM6rOWSkUom@public.gmane.org>
2016-11-23 13:53           ` Christoph Strasser

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=4ab21d15-9697-c060-61fb-96c32ce41f6e@gmail.com \
    --to=bpjonsson-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=nick-iTLVOByc1N8@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).