git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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
Previous: Thomas RastNext: Thomas Rast
Message 4 of 12 in “Documentation: Quote ~(s) causing subscript”
  1. Documentation: Quote ~(s) causing subscriptThomas Rast, Sep 15, 2008
  2. Documenation: git-bundle: quote tildes that cause subscriptThomas Rast, Sep 15, 2008
  3. Documentation: replace [^~] with escapes everywhereThomas Rast, Sep 15, 2008
  4. Avery PennarunSep 15, 2008
  5. Thomas RastSep 16, 2008
  6. Avery PennarunSep 16, 2008
  7. Junio C HamanoSep 16, 2008
  8. Documentation: disable sub/superscript characters ^/~Thomas Rast, Sep 16, 2008
  9. Avery PennarunSep 16, 2008
  10. Junio C HamanoSep 16, 2008
  11. Junio C HamanoSep 16, 2008
  12. Jeff KingSep 16, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.