openSUSE / asciidoctor

:gem: A fast, open source text processor and publishing toolchain, written in Ruby, for converting AsciiDoc content to HTML5, DocBook 5 (or 4.5) and other formats.
https://asciidoctor.org
Other
0 stars 2 forks source link

asciidoctor translates anchors to the unsupported db5 anchor tag #3

Open jcayouette opened 6 years ago

jcayouette commented 6 years ago

Asciidoctor translates inline anchors -> docbook 5 anchor. anchor is not supported or used. We should make this instead an xml:id in the parent tag.

Anchors in asciidoc are "translated" to in XML, instead it should better be an xml:id in the parent tag

For an example see https://w3.suse.de/~fs/doku/asciidoc/test/adoc/asciidoc.adoc and search for "http://www.xmlsoft.org[xsltproc]::"

fsundermeyer commented 6 years ago

Example:

  [[anchor]]foo::
    bar

Is converted to

  <variablelist>
   <varlistentry>
    <term><anchor xml:id="anchor"/>foo</term>
    <listitem><para>bar</para></listitem>
   </varlistentry>
  </variablelist>

Desired output would be

  <variablelist>
   <varlistentry xml:id="anchor">
    <term>foo</term>
    <listitem><para>bar</para></listitem>
   </varlistentry>
  </variablelist>