git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Avery Pennarun" <apenwarr@gmail.com>
To: "Thomas Rast" <trast@student.ethz.ch>
Cc: git@vger.kernel.org, "Junio C Hamano" <gitster@pobox.com>
Subject: Re: [PATCH] Documentation: replace [^~] with escapes everywhere
Date: Mon, 15 Sep 2008 19:56:48 -0400	[thread overview]
Message-ID: <32541b130809151656n4f39018fu2045eb6280d6da00@mail.gmail.com> (raw)
In-Reply-To: <1221470398-8698-3-git-send-email-trast@student.ethz.ch>

On Mon, Sep 15, 2008 at 5:19 AM, Thomas Rast <trast@student.ethz.ch> wrote:
> Replaces all ^ and ~ that are not part of a "literal" paragraph with
> {caret} and {tilde}.
>
> Tildes and carets are ordinarily used for ~sub~ and ^super^scripts.
> This only triggers if a suitable chunk of text is found within the
> current paragraph, so in most cases nothing happens (and the
> tilde/caret is taken literally).  However, it is a pitfall for anyone
> who later adds more text to the same paragraph, so we might as well do
> it right.

Rather than uglifying all the documentation to work around the syntax,
perhaps we just want to disable subscripts and superscripts
altogether?  I can't really imagine the git documentation needing
them.

To do so, we can add these lines to asciidoc.conf (I just did this on
another project yesterday, but I haven't tested in git.git):

[replacements]
# Disable superscripts.
\^(.+?)\^=^\1^
# Disable subscripts.
~(.+?)~=~\1~


(For reference, the regexes on the left side of the equal sign came
from a file in /etc/asciidoc somewhere.)

Have fun,

Avery

  reply	other threads:[~2008-09-15 23:57 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-15  9:19 [PATCH] Documentation: Quote ~(s) causing subscript Thomas Rast
2008-09-15  9:19 ` [PATCH] Documenation: git-bundle: quote tildes that cause subscript Thomas Rast
2008-09-15  9:19   ` [PATCH] Documentation: replace [^~] with escapes everywhere Thomas Rast
2008-09-15 23:56     ` Avery Pennarun [this message]
2008-09-16  0:05       ` Thomas Rast
2008-09-16  0:10         ` Avery Pennarun
2008-09-16  8:24           ` Junio C Hamano
2008-09-16 12:47             ` [PATCH] Documentation: disable sub/superscript characters ^/~ Thomas Rast
2008-09-16 15:58             ` [PATCH] Documentation: replace [^~] with escapes everywhere Avery Pennarun
2008-09-16 16:34               ` Junio C Hamano
2008-09-16 16:48               ` Junio C Hamano
2008-09-16 19:12                 ` Jeff King

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=32541b130809151656n4f39018fu2045eb6280d6da00@mail.gmail.com \
    --to=apenwarr@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=trast@student.ethz.ch \
    /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).