public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* For DocBook output, prefix the --id-prefix to link element's linkend attribute value?
@ 2014-11-21 20:55 chrisloper-Re5JQEeQqe8AvxtiuMwx3w
  0 siblings, 0 replies; only message in thread
From: chrisloper-Re5JQEeQqe8AvxtiuMwx3w @ 2014-11-21 20:55 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw


[-- Attachment #1.1: Type: text/plain, Size: 1857 bytes --]

For DocBook output, shouldn't the --id-prefix also be prefixed to any link 
element's linkend attribute value? 
If the link is outside of the current document, then arguably it should 
not. 
But if the link destination is in the current document, the linkend 
attribute needs to updated as well; otherwise the link is broken.


Here is my test:

$ cat test.md
# Markdown Test #

## Introduction ##

This is the intro. See the [Introduction].



$ pandoc --id-prefix=se- -t docbook  test.md
<sect1 id="ss-markdown-test">
  <title>Markdown Test</title>
  <sect2 id="*ss-introduction*">
    <title>Introduction</title>
    <para>
      This is the intro. See the
      <link linkend="*introduction*">Introduction</link>.
    </para>
  </sect2>
</sect1>



I'm interested in DocBook output, but I noticed the same kind of behavior 
for html output. 

$ pandoc --id-prefix=xx -t html  test.md
<h1 id="ss-markdown-test">Markdown Test</h1>
<h2 id="*ss-introductio*n">Introduction</h2>
<p>This is the intro. See the <a href="#*introduction*
">Introduction</a>.</p>



These appear (to me) to be similar to this issue which was fixed:
   "id-prefix support for footnotes in markdown output #614"
  
 https://github.com/jgm/pandoc/commit/885ef2072f68fd01137d2eb41d1258932d2134c5

Thanks

-Chris

-- 
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/036ef086-0104-4530-a141-f86d915fb617%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #1.2: Type: text/html, Size: 3967 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-11-21 20:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-21 20:55 For DocBook output, prefix the --id-prefix to link element's linkend attribute value? chrisloper-Re5JQEeQqe8AvxtiuMwx3w

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).