#3 <replaceable> tags are converted into an unreadable, unmaintainable mess when combined with other inline markup
Opened 6 years ago by jhradile. Modified 6 years ago

Originally reported by @pbokoc:

Docscii generates some weird asciidoc when it encounters a <replaceable> inside another inline tag (<command> and similar). For example, this:

<option>inst.repo=hd:<replaceable>device</replaceable>:/<replaceable>path</replaceable></option>

currently converts into this:

[option]`inst.repo=hd:pass:attributes[{blank}]_device_:/pass:attributes[{blank}]_path_pass:attributes[{blank}]`

Surely there's a less insane way to render a part of a word in italics... right?

Also this is likely to happen with more than just <replaceable>s - it's just that replaceable is probably the inline tag that is most commonly used within other inline tags.


Originally added by @pbokoc:

Found a similar problem with a <literal>:

DocBook:

"<literal>=</literal>"

Converted ADoc:

"pass:attributes[{blank}]`=`pass:attributes[{blank}]"

I'll figure out if there's a way to do this nicer.

Originally added by @pbokoc:

Ok, here's what happens: the whole pass:attributes[{blank}] is not required as long as you:

  • double the inner markup symbols. The example docbook from the original comment should look like this:

    [option]`inst.repo=hd:__device__:/__path__`
    
  • The example in comment 2 seems to work just fine without the whole blank thing.

  • We're going to need a check for the [ and ] characters inside other inline markup (asterisks, underscores), it needs to be escaped properly with a backslash. However, it must not be escaped inside a screen (----).

Log in to comment on this ticket.

Metadata