git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Derek Moore <derek.p.moore@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: git-log man2html conversion broken: http://git-scm.com/docs/git-log
Date: Wed, 8 Oct 2014 22:29:56 -0400	[thread overview]
Message-ID: <20141009022956.GA18440@peff.net> (raw)
In-Reply-To: <CAMsgyKadiE-HOH_oLK=Fc0UQXnEuUTMHmz3=9zRiMvU0fr4KvA@mail.gmail.com>

On Wed, Oct 08, 2014 at 12:49:54PM -0500, Derek Moore wrote:

> The HTML for the git-log man page is being misrendered on the official site.
> 
> See the placehoders list under "format:<string>" in the PRETTY FORMATS section.

Thanks for the report. This renders fine locally with asciidoc, but the
git-scm.com site uses the ruby asciidoctor gem. I think the issue is
that the start and end markers for the code block are not identical:

-------
The author of fe6e0ee was Junio C Hamano, 23 hours ago
The title was >>t4119: test autocomputing -p<n> for traditional diff
input.<<

--------

Note that we start with 7 hyphens, but end with 8.

The git-scm issue was already reported here (the site's issues are
tracked separately from the mailing list):

  https://github.com/git/git-scm.com/issues/447

but I doubt if asciidoctor folks have been notified. I'll call their
attention to that issue; they should produce the same output as regular
asciidoc for this case.

In the meantime, I don't know if it is worth us applying this workaround
to the documentation (I'd feel better if I had actually confirmed that
it fixed the problem):

-- >8 --
Subject: docs: use identical start/end lines for code blocks

Some AsciiDoc implementations (like the AsciiDoctor gem) do not
recognize the end of a code block if it does not match the start
line exactly. Those implementations are wrong, but we can work around it
and make our sources look nicer at the same time.

---
diff --git a/Documentation/pretty-formats.txt b/Documentation/pretty-formats.txt
index eecc39d..d3e3d25 100644
--- a/Documentation/pretty-formats.txt
+++ b/Documentation/pretty-formats.txt
@@ -91,7 +91,7 @@ instead of '\n'.
 E.g, 'format:"The author of %h was %an, %ar%nThe title was >>%s<<%n"'
 would show something like this:
 +
--------
+--------
 The author of fe6e0ee was Junio C Hamano, 23 hours ago
 The title was >>t4119: test autocomputing -p<n> for traditional diff input.<<
 

      parent reply	other threads:[~2014-10-09  2:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-08 17:49 git-log man2html conversion broken: http://git-scm.com/docs/git-log Derek Moore
2014-10-08 20:46 ` [PATCH] Documentation: fix misrender of pretty-formats in Asciidoctor brian m. carlson
2014-10-08 20:53   ` Junio C Hamano
2014-10-09  2:31   ` Jeff King
2014-10-09  2:58     ` brian m. carlson
2014-10-09  2:29 ` Jeff King [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20141009022956.GA18440@peff.net \
    --to=peff@peff.net \
    --cc=derek.p.moore@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).