asciidoctor / docbookrx

(An early version of) a DocBook to AsciiDoc converter written in Ruby.
MIT License
22 stars 49 forks source link

xref is not properly converted #11

Closed pmkovar closed 8 years ago

pmkovar commented 8 years ago

docbookrx doesn't seem to properly convert an xref: it adds a cross reference text that is taken from the ID of a section, for example, and not from the contents of the section title.

It would be sufficient to convert the xref without specifying any cross reference text, actually.

pmkovar commented 8 years ago

An example:

<section id="sect-Documentation-Test_Guide-Test_Chapter-Test_Section_2">
...
</section>
<para>
See <xref linkend="sect-Documentation-Test_Guide-Test_Chapter-Test_Section_2" />
</para>

This turns into:

[[_sect_documentation_test_guide_test_chapter_test_section_2]]
== Test Section 2
See <<_sect_documentation_test_guide_test_chapter_test_section_2,sect-Documentation-Test Guide-Test Chapter-Test Section 2>>                        
pmkovar commented 8 years ago

It should be enough to convert the xref into:

See <<_sect_documentation_test_guide_test_chapter_test_section_2>>                        
mojavelinux commented 8 years ago

I think this was being done to handle the case of a bibref, but breaking all other refs. We'll have to deal with that separately. Let's make this case right first since it's the more common case.