Re: [PATCH] Documentation: implement linkgit macro for Asciidoctor

2017-01-31 Thread Junio C Hamano
"brian m. carlson" writes: > On Thu, Jan 26, 2017 at 07:18:41PM +, Eric Wong wrote: >> > Eric Wong writes: >> Junio C Hamano wrote: >> > + "\n" >> > +"#{target}" >> > +"#{attrs[1]}\n" >> > +

Re: [PATCH] Documentation: implement linkgit macro for Asciidoctor

2017-01-26 Thread brian m. carlson
On Thu, Jan 26, 2017 at 07:18:41PM +, Eric Wong wrote: > > Eric Wong writes: > Junio C Hamano wrote: > > + "\n" > > +"#{target}" > > +"#{attrs[1]}\n" > > + "\n" > > end > > You need the '\' at the end of

Re: [PATCH] Documentation: implement linkgit macro for Asciidoctor

2017-01-26 Thread Eric Wong
> Eric Wong writes: > > You can use '\' to continue long lines with any Ruby version: > > > > "" \ > > "#{target}" \ > > "#{attrs[1]}" \ > > "" Junio C Hamano wrote: > + "\n" > +"#{target}" > +

Re: [PATCH] Documentation: implement linkgit macro for Asciidoctor

2017-01-26 Thread Johannes Schindelin
Hi Brian, On Thu, 26 Jan 2017, brian m. carlson wrote: > AsciiDoc uses a configuration file to implement macros like linkgit, > while Asciidoctor uses Ruby extensions. Implement a Ruby extension that > implements the linkgit macro for Asciidoctor in the same way that > asciidoc.conf does for

Re: [PATCH] Documentation: implement linkgit macro for Asciidoctor

2017-01-25 Thread Eric Wong
Jeff King wrote: > On Thu, Jan 26, 2017 at 12:13:44AM +, brian m. carlson wrote: > > + > > + def process(parent, target, attrs) > > +if parent.document.basebackend? 'html' > > + prefix = parent.document.attr('git-relative-html-prefix') > > +

Re: [PATCH] Documentation: implement linkgit macro for Asciidoctor

2017-01-25 Thread Jeff King
On Thu, Jan 26, 2017 at 12:13:44AM +, brian m. carlson wrote: > diff --git a/Documentation/Makefile b/Documentation/Makefile > index 19c42eb60..d1b7a6865 100644 > --- a/Documentation/Makefile > +++ b/Documentation/Makefile > @@ -179,10 +179,7 @@ ASCIIDOC = asciidoctor > ASCIIDOC_CONF = >

[PATCH] Documentation: implement linkgit macro for Asciidoctor

2017-01-25 Thread brian m. carlson
AsciiDoc uses a configuration file to implement macros like linkgit, while Asciidoctor uses Ruby extensions. Implement a Ruby extension that implements the linkgit macro for Asciidoctor in the same way that asciidoc.conf does for AsciiDoc. Adjust the Makefile to use it by default.