You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Proposed correct behavior is to put only the text content from the paragraph to the xreflabel attribute. An alternative is to discard sub-elements completely.
The text was updated successfully, but these errors were encountered:
This is a known limitation of the DocBook backend/converter (and has always been this way since even before Asciidoctor). The reftext needs to be specified explicitly if the reftext would otherwise contain formatting.
This issue is FAR more complicated to address than you think. In your original example, here's what the converter sees after converting the strong text:
Ultimately, there's nothing more that core can do at this point in Asciidoctor until #61 is resolved (which we're working on the AsciiDoc Language specification).
However, if you want to change this behavior, you can extend the DocBook converter and sanitize the reftext more aggressively, perhaps by looking for AsciiDoc markup and stripping it out.
classMyDocBookConverter < (Asciidoctor::Converter.for'docbook')register_for'docbook'defcommon_attributesid,role=nil,reftext=nilifreftextreftext="replacement text goes here"endsuperendend
The best we could hope for right now is to just leave the xreflabel attribute off for this kind of anchor. That works in dblatex (it will still use the adjacent element as the reftext), but not Apache FOP, which uses the title from the parent element. The reason we added xreflabel here was to make it more precise and consistent. But there is a risk, as you have observed.
When rendering this code:
[#the_link]**something #something# something**
output to docbook format is an invalid xml (in the xreflabel part):
the html5 output is correct:
Proposed correct behavior is to put only the text content from the paragraph to the xreflabel attribute. An alternative is to discard sub-elements completely.
The text was updated successfully, but these errors were encountered: