From: "Piotr Findeisen" <piotr.findeisen@gmail.com>
To: "Jonas Fonseca" <fonseca@diku.dk>
Cc: git@vger.kernel.org
Subject: Re: Documentation/user-manual.txt, asciidoc and "--" escapes
Date: Mon, 10 Nov 2008 08:38:24 +0100 [thread overview]
Message-ID: <ddb82bf60811092338m3aad8041w20de23f18aa7d56e@mail.gmail.com> (raw)
In-Reply-To: <2c6b72b30811091052k77200785j722c8aed2beb7684@mail.gmail.com>
Hi!
>>> The attached file is a result of running `git diff HEAD~1`.
>
> Please read Documentation/SubmittingPatches for the preferred way to
> contribute patches.
Ok, I'll look there, when you tell me this patch is worth anything.
>>> Asciidoc replaces "--" with "—" when not in verbatim mode. This is
>>> sometimes unwanted -- especially when citing command line options like
>>> "git diff --cached". This commit includes proper quotes in user-manual.txt.
>
> Newer asciidoc versions have the following "workaround". Maybe adding
> something like this to Documentation/asciidoc.conf would be more
> future proof.
>
> # -- Spaced and unspaced em dashes (entity reference —)
> # But disallow unspaced in man pages because double-dash option name prefixes
> # are pervasive.
> ifndef::doctype-manpage[]
> (^|[^-\\])--($|[^-])=\1—\2
> endif::doctype-manpage[]
> ifdef::doctype-manpage[]
> (^|\s*[^\S\\])--($|\s+)=\1—\2
> endif::doctype-manpage[]
> \\--(?!-)=--
Well, this doesn't solve the problem -- I'm not talking about
manpages, the "--" where replaced with single "—" on the
http://www.kernel.org/pub/software/scm/git/docs/user-manual.html page.
Yes, we can disable such a replacement in the config file, but take a
look at the sentence "...how to fetch and study a project using
git—read these chapters...". In this case "--" in the source file was
replaced with "—" and this is what we want.
I noticed that all substitutions "--" -> "—", where "—" is a part of
sentence punctuation, match \w--\w pattern (e.g. no spaces on both
sides) and probably this is how it should be written in English. But
basing on this doesn't seem to me to be fool proof.
Best regards,
Piotr
next prev parent reply other threads:[~2008-11-10 7:39 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <ddb82bf60811061904t5defc492m80cd1b759674eb6@mail.gmail.com>
2008-11-07 3:09 ` Fwd: Documentation/user-manual.txt, asciidoc and "--" escapes Piotr Findeisen
2008-11-09 8:44 ` Piotr Findeisen
2008-11-09 18:52 ` Jonas Fonseca
2008-11-10 7:38 ` Piotr Findeisen [this message]
2008-11-10 10:07 ` Jonas Fonseca
2008-11-10 10:14 ` Piotr Findeisen
2008-11-12 0:04 ` Jonas Fonseca
2008-11-14 13:02 ` Piotr Findeisen
2008-11-15 12:07 ` Junio C Hamano
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=ddb82bf60811092338m3aad8041w20de23f18aa7d56e@mail.gmail.com \
--to=piotr.findeisen@gmail.com \
--cc=fonseca@diku.dk \
--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).