Re: [PATCH] Documentation: implement linkgit macro for Asciidoctor
- From
- Eric Wong <e@80x24.org>
- Date
- Jan 26, 2017, 19:18 UTC
- Message-ID
- <20170126191841.GA6060@dcvr.yhbt.net>
- In-Reply-To
- <xmqq1svp7lcs.fsf@gitster.mtv.corp.google.com>
Show 7 quoted lines
> Eric Wong <e@80x24.org> writes:
> > You can use '\' to continue long lines with any Ruby version:
> >
> > "<citerefentry>" \
> > "<refentrytitle>#{target}</refentrytitle>" \
> > "<manvolnum>#{attrs[1]}</manvolnum>" \
> > "</citerefentry>"Junio C Hamano <gitster@pobox.com> wrote:
Show 5 quoted lines
> + "<citerefentry>\n"
> + "<refentrytitle>#{target}</refentrytitle>"
> + "<manvolnum>#{attrs[1]}</manvolnum>\n"
> + "</citerefentry>\n"
> endYou 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:
"<citerefentry>\n" \
"<refentrytitle>#{target}</refentrytitle>" \
"<manvolnum>#{attrs[1]}</manvolnum>\n" \
"</citerefentry>\n"