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

Re: [PATCH] Document escaping of special characters in gitignore files

From
Thomas Rast <trast@student.ethz.ch>
Date
Jan 5, 2011, 19:38 UTC
Message-ID
<201101052038.28515.trast@student.ethz.ch>
In-Reply-To
<201101052027.24640.jnareb@gmail.com>
Jakub Narebski wrote:
Show 9 quoted lines
> Second, http://www.methods.co.nz/asciidoc/userguide.html#_text_formatting
> ("7. Text Formatting", "7.1. Quoted Text") says (emphasizis mine):
> 
>   Word phrases `enclosed in backtick characters` (grave accents) are also
>   rendered in a monospaced font but in this case the enclosed text is
>   __rendered literally__ and is not subject to further expansion (see
>   inline literal).
> 
> So yes, it is safe, and no, `{backslash}#` would not work.

This is correct, but the behaviour you quote was introduced in a minor release of asciidoc (!!!). From 71c020c5:

    Disable asciidoc 8.4.1+ semantics for `{plus}` and friends
    
    asciidoc 8.4.1 changed the semantics of inline backtick quoting so
    that they disable parsing of inline constructs, i.e.,
    
      Input:    `{plus}`
      Pre 8.4.1:        +
      Post 8.4.1:       {plus}
    
    Fix this by defining the asciidoc attribute 'no-inline-literal'
    (which, per the 8.4.1 changelog, is the toggle to return to the old
    behaviour) when under ASCIIDOC8.

So in fact with current settings in Documentation/Makefile, the brace escapes *are* expanded even within backticks.

-- 
Thomas Rast
trast@{inf,student}.ethz.ch
Previous: Jakub NarebskiNext: Bruce Korb
Message 5 of 8 in “Document escaping of special characters in gitignore files”
  1. Document escaping of special characters in gitignore filesJakub Narebski, Jan 5, 2011
  2. Andreas SchwabJan 5, 2011
  3. Junio C HamanoJan 5, 2011
  4. Jakub NarebskiJan 5, 2011
  5. Thomas RastJan 5, 2011
  6. Bruce KorbJan 5, 2011
  7. Junio C HamanoJan 5, 2011
  8. Jakub NarebskiJan 5, 2011

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.