Message ID | 20210618203057.790320-3-felipe.contreras@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | doc: asciidoctor: direct man page creation and fixes (brian's version) | expand |
Felipe Contreras wrote: > From: "brian m. carlson" <sandals@crustytoothpaste.net> > --- a/Documentation/asciidoctor-extensions.rb > +++ b/Documentation/asciidoctor-extensions.rb > @@ -15,6 +15,8 @@ module Git > "#{target}(#{attrs[1]})</ulink>" > elsif parent.document.basebackend? 'html' > %(<a href="#{prefix}#{target}.html">#{target}(#{attrs[1]})</a>) > + elsif parent.document.basebackend? 'manpage' > + %(\e\\fB#{target}\e\\fP\e\\fR(#{attrs[1]})\e\\fP) This is the same as my version [1]: format = "\e\\fB%s\e\\fP(%s)" Except my version is cleaner, I don't see the point in doing \fR \fP. What do we gain by that? [1] https://lore.kernel.org/git/20210521224452.530852-6-felipe.contreras@gmail.com/
diff --git a/Documentation/asciidoctor-extensions.rb b/Documentation/asciidoctor-extensions.rb index d906a00803..620b3d7a88 100644 --- a/Documentation/asciidoctor-extensions.rb +++ b/Documentation/asciidoctor-extensions.rb @@ -15,6 +15,8 @@ module Git "#{target}(#{attrs[1]})</ulink>" elsif parent.document.basebackend? 'html' %(<a href="#{prefix}#{target}.html">#{target}(#{attrs[1]})</a>) + elsif parent.document.basebackend? 'manpage' + %(\e\\fB#{target}\e\\fP\e\\fR(#{attrs[1]})\e\\fP) elsif parent.document.basebackend? 'docbook' "<citerefentry>\n" \ "<refentrytitle>#{target}</refentrytitle>" \