From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/26076 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Rich & Sue Hock Newsgroups: gmane.text.pandoc Subject: preserving internal HTML link identifiers for github markdown Date: Mon, 7 Sep 2020 08:22:02 -0700 (PDT) Message-ID: Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_678_564508039.1599492122191" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14034"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBDLZF5O47QNRBG5A3H5AKGQEAFEFIHY-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mon Sep 07 17:22:07 2020 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-oi1-f183.google.com ([209.85.167.183]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1kFIy7-0003Vh-3s for gtp-pandoc-discuss@m.gmane-mx.org; Mon, 07 Sep 2020 17:22:07 +0200 Original-Received: by mail-oi1-f183.google.com with SMTP id u190sf4397086oif.13 for ; Mon, 07 Sep 2020 08:22:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:date:from:to:message-id:subject:mime-version :x-original-sender:reply-to:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-subscribe:list-unsubscribe; bh=jnRokoFf/Iz4j2rG/PgSXU2KW5jY2ps0B9TnYUqFeUM=; b=PyL0mYiBreXLCEQ1/aXG+rocyKW32Mp+Wbf2ZoqlabezutO+UjHIwhHwHCffrE3UIp 0dpZcsXHo+4OC3wfZ83QFFlg5Ha64lDxRlku56Tls5GG2B7D0GZbikemupBP7IdpxITr j8F1yvq3kFsC6od4OmHZNLhPRJdxiaALaL3J8orpmm6pIi3WhhQTHvj56VqMPkfV4g9d Mh6i9syAAacf2DMkVxoJ6FK2+le05iBQfHQElPfl4Gyeg+Zx4P5wVLWN3YUDrTvhOEcO 7u9LHX4Z05llH+PLmQVOttjPzhw0EZ4ih8NitvNNqxhWwUgyS8V8WLDw+cTKsLOaRpF/ Wddg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:message-id:subject:mime-version:x-original-sender :reply-to:precedence:mailing-list:list-id:list-post:list-help :list-archive:list-subscribe:list-unsubscribe; bh=jnRokoFf/Iz4j2rG/PgSXU2KW5jY2ps0B9TnYUqFeUM=; b=NXCC3qMTa1hVqsOuk/5NAwWzf3DYdmJYRPuCziIwTGBjzaVuYshXIIBO8H+/KE6HfG dq0JQ+P+EGn+No1NR/GyWIxHcGAzoloDPWTzU/oGpj5EbW+we+RyP+7CooWSf5xV3gQa NJK7Qa/Q8vxwA295F/UsiOdgLExZQiokaef4h5vuzQ5VerAyUeGeZfj/h6Ib6mOnATrM CbzaR1bs4FJe55CRtabJTP/xWaxXEOTPNIGIpLg2c5fytVyKyZ7JvI+Nogk+HG6Pex2e gPD7aVsCwnzIDNHIr9A9PMeYr8xTqc5JnihdWWwUxgPzWRtrrl6pJ65BdZ+WQOra7yGC 8Nww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:date:from:to:message-id:subject :mime-version:x-original-sender:reply-to:precedence:mailing-list :list-id:x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=jnRokoFf/Iz4j2rG/PgSXU2KW5jY2ps0B9TnYUqFeUM=; b=Nat5bYPzCV10M3PB/kwsQ3TsRUceJOP3T8dUdNfJbsSXTmqHRy3J50KeAK4PfiSdLB JvG7RqCDK+j95zh59zqZ6VPTivmE/8/HSKV67/r2988RqsYvOZntSJNPqdEyIi758BOM OpUNAQS3yeaNz3XF19H45G1d8UtG/7+JKrFhkTS1b61orE5LsAOHwpOLMvA/dpnCS1hy 0cV7MtsCrbBHOq4KnoIN3kVDQg+i+KCxXFYpgl56xA+T4LJZO+mWMZtK7ZbCQUrLBomv KN3jNXfmn7AVxccRBCm9jaeDyA4MOGIkxIG2a6uGta/QgVM3NY0/GFZ8o9Yc6ltP0PtM NHKg== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM5314PPVKz3/giWt4iPdiuQGqJcg8MyeTpsMUWpgtzR6IlRYOzyoe x7fzSdN/j73gQfwXIwVdmbg= X-Google-Smtp-Source: ABdhPJwYXlaNxkrvkpIULFBWTgtiJSG5LdJcpV+jZHwzTvvrxvo3AGPNU/A9CRHDVmtlMTjhJEN6kQ== X-Received: by 2002:aca:ec47:: with SMTP id k68mr12312438oih.122.1599492126141; Mon, 07 Sep 2020 08:22:06 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a9d:7ad8:: with SMTP id m24ls4385885otn.8.gmail; Mon, 07 Sep 2020 08:22:03 -0700 (PDT) X-Received: by 2002:a9d:908:: with SMTP id 8mr4329667otp.356.1599492122903; Mon, 07 Sep 2020 08:22:02 -0700 (PDT) X-Original-Sender: HockCalendar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org Precedence: list Mailing-list: list pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org; contact pandoc-discuss+owners-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-ID: X-Google-Group-Id: 1007024079513 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Xref: news.gmane.io gmane.text.pandoc:26076 Archived-At: ------=_Part_678_564508039.1599492122191 Content-Type: multipart/alternative; boundary="----=_Part_679_879723292.1599492122191" ------=_Part_679_879723292.1599492122191 Content-Type: text/plain; charset="UTF-8" I am using pandoc to convert HTML to Markdown to populate a github wiki. The only pandoc option I am using is -t gfm I would like to keep internal link identifiers from the HTML to arbitrary places on the wiki page (as opposed to relying on automatically generated heading identifiers). When I encounter a document anchor like this in the source HTML: fred Pandoc converts it to this in the output: fred However, github wiki does not render this as a valid target, so my URL https://github.com/name/repo/wiki#fred does not jump to the proper point on the wiki page. However, if it was left as an anchor instead of a span, i.e. fred Then github would render it properly and the URL would jump to the correct position in the document. The internal link would also work if coded in a "div" tag:
fred
Is there a way in pandoc to keep "a" tags with an id, or perhaps convert them to "div", rather than converting them to "span"? -- 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/d7533e1d-7619-4aa2-ad98-5bd0afcad905n%40googlegroups.com. ------=_Part_679_879723292.1599492122191 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I am using pandoc to convert HTML to Markdown to populate a github wiki= . The only pandoc option I am using is
    -t gfm

= I would like to keep internal link identifiers from the HTML to arbitrary p= laces on the wiki page (as opposed to relying on automatically generated he= ading identifiers).

When I encounter a document anchor like this in = the source HTML:
   <a id=3D"fred">fred</a>
Pan= doc converts it to this in the output:
   <span id=3D"fred"= >fred</span>
However, github wiki does not render this as a val= id target, so my URL
    https://github.com/name/repo/wik= i#fred
does not jump to the proper point on the wiki page. However, if i= t was left as an anchor instead of a span, i.e.
   <a id=3D= "fred">fred</a>
Then github would render it properly and the UR= L would jump to the correct position in the document.
The internal link = would also work if coded in a "div" tag:
   <div id=3D"fred= ">fred</div>

Is there a way in pandoc to keep "a" tags with= an id, or perhaps convert them to "div", rather than converting them to "s= pan"?

--
You received this message because you are subscribed to the Google Groups &= quot;pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to pand= oc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d= /msgid/pandoc-discuss/d7533e1d-7619-4aa2-ad98-5bd0afcad905n%40googlegroups.= com.
------=_Part_679_879723292.1599492122191-- ------=_Part_678_564508039.1599492122191--