Re: [PATCH] Documentation: replace [^~] with escapes everywhere
- From
Avery Pennarun <apenwarr@gmail.com>
- Date
- Sep 15, 2008, 23:56 UTC
- Message-ID
- <32541b130809151656n4f39018fu2045eb6280d6da00@mail.gmail.com>
- 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:
Show 9 quoted lines
> 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