Thread (2 messages) 2 messages, 2 authors, 2017-01-27

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

From: Eric Wong <hidden>
Date: 2017-01-26 19:19:26

Eric Wong [off-list ref] writes:
quoted
You can use '\' to continue long lines with any Ruby version:

    "<citerefentry>" \
      "<refentrytitle>#{target}</refentrytitle>" \
      "<manvolnum>#{attrs[1]}</manvolnum>" \
    "</citerefentry>"
Junio C Hamano [off-list ref] wrote:
+          "<citerefentry>\n"
+            "<refentrytitle>#{target}</refentrytitle>"
+            "<manvolnum>#{attrs[1]}</manvolnum>\n"
+          "</citerefentry>\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:

          "<citerefentry>\n" \
            "<refentrytitle>#{target}</refentrytitle>" \
            "<manvolnum>#{attrs[1]}</manvolnum>\n" \
          "</citerefentry>\n"
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help