Should attribute expansion be suppressed in the 'Name' section of a manpage document?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Should attribute expansion be suppressed in the 'Name' section of a manpage document?

oddhack
Is there a reason attribute expansion is performed differently in the 'Name' section of the following document depending on whether it's processed with default or 'manpage' document type?

= attribs(3)
:value: fnord

== Name

Name - value is {value}

== Synopsis

Synopsis - value is {value}                

When run through 'asciidoctor -b html5 -d manpage', the output of the 'Name' section looks like:

Name - value is {value}

When run through 'asciidoctor -b html5', the output looks (as intended) like:

Name - value is fnord

I don't see any obvious reason in Generate Manual Pages from AsciiDoc that attribute expansion would not be performed in the first case - am I missing something documented? If not, is there a workaround?

asciidoctor 2.0.12, Ruby 2.5.3
Reply | Threaded
Open this post in threaded view
|

Re: Should attribute expansion be suppressed in the 'Name' section of a manpage document?

mojavelinux
Administrator
I cannot find any reason why substitutions are not applied to the manpurpose in the NAME section. I think at the very least the processor should substitute attribute references. I found a similar change when we added attribute substitution to the manname in that same NAME section. See https://github.com/asciidoctor/asciidoctor/commit/3826b88692b75e763b1517dc5346c77c390562f4 Seems reasonable to extend it to the manpurpose as well.


Best Regards,

-Dan

On Wed, Apr 7, 2021 at 8:40 PM oddhack [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Is there a reason attribute expansion is performed differently in the 'Name' section of the following document depending on whether it's processed with default or 'manpage' document type?

= attribs(3)
:value: fnord

== Name

Name - value is {value}

== Synopsis

Synopsis - value is {value}                

When run through 'asciidoctor -b html5 -d manpage', the output of the 'Name' section looks like:

Name - value is {value}

When run through 'asciidoctor -b html5', the output looks (as intended) like:

Name - value is fnord

I don't see any obvious reason in Generate Manual Pages from AsciiDoc that attribute expansion would not be performed in the first case - am I missing something documented? If not, is there a workaround?

asciidoctor 2.0.12, Ruby 2.5.3



To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML


--
Dan Allen (he, him, his) | @mojavelinux | https://twitter.com/mojavelinux