From: Junio C Hamano Date: Tue, 31 Jan 2017 20:20:20 GMT Subject: Re: [PATCH] Documentation: implement linkgit macro for Asciidoctor Message-ID: In-Reply-To: <20170127004050.23jrq5iqwfxcwmik@genre.crustytoothpaste.net> "brian m. carlson" writes: > On Thu, Jan 26, 2017 at 07:18:41PM +0000, Eric Wong wrote: >> > Eric Wong writes: >> Junio C Hamano wrote: >> > + "\n" >> > + "#{target}" >> > + "#{attrs[1]}\n" >> > + "\n" >> > end >> >> You need the '\' at the end of those strings, it's not like C >> since Ruby doesn't require semi-colons to terminate lines. >> In other words, that should be: >> >> "\n" \ >> "#{target}" \ >> "#{attrs[1]}\n" \ >> "\n" >> > > This change is fine with me. OK, I just squashed the final one in. Will merge to 'next' shortly. diff --git a/Documentation/Makefile b/Documentation/Makefile index 11f76506b6..b21e5808b1 100644 --- a/Documentation/Makefile +++ b/Documentation/Makefile @@ -179,7 +179,8 @@ ASCIIDOC = asciidoctor ASCIIDOC_CONF = ASCIIDOC_HTML = xhtml5 ASCIIDOC_DOCBOOK = docbook45 -ASCIIDOC_EXTRA += -I. -rasciidoctor-extensions -alitdd='&\#x2d;&\#x2d;' +ASCIIDOC_EXTRA += -I. -rasciidoctor-extensions +ASCIIDOC_EXTRA += -alitdd='&\#x2d;&\#x2d;' DBLATEX_COMMON = endif diff --git a/Documentation/asciidoctor-extensions.rb b/Documentation/asciidoctor-extensions.rb index 09f7088eea..ec83b4959e 100644 --- a/Documentation/asciidoctor-extensions.rb +++ b/Documentation/asciidoctor-extensions.rb @@ -13,10 +13,10 @@ module Git prefix = parent.document.attr('git-relative-html-prefix') %(#{target}(#{attrs[1]})\n) elsif parent.document.basebackend? 'docbook' - %( -#{target}#{attrs[1]} - -) + "\n" \ + "#{target}" \ + "#{attrs[1]}\n" \ + "\n" end end end