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

Re: [PATCH] Documentation: remove unnecessary backslashes

From
brian m. carlson <sandals@crustytoothpaste.net>
Date
Jan 22, 2016, 02:46 UTC
Message-ID
<20160122024612.GB686558@vauxhall.crustytoothpaste.net>
In-Reply-To
<20160120203430.GB6092@sigill.intra.peff.net>
On Wed, Jan 20, 2016 at 03:34:30PM -0500, Jeff King wrote:
Show 13 quoted lines
> On Wed, Jan 20, 2016 at 12:28:53PM -0800, Junio C Hamano wrote:
> > On the other hand, if this line must be spelled like the above to
> > please asciidoctor, i.e. the first and the last must not have
> > backslashes and the second must have backslashes, I'd have to say
> > we have a bigger problem.  Perhaps asciidoctor needs to be fixed
> > until normal people like we can rely on it.
> 
> Yeah, that is the "insane" part I mentioned. It _does_ make sense
> syntactically ("-1" cannot possibly be an attribute name, so it does not
> parse as one), but I do not like the degree to which writers must know
> all of the arcane syntax rules (and cannot rely on something simple like
> "{ is special, so I must escape it, and over-escaping is not a
> problem").

The underlying issue is that both AsciiDoc and Asciidoctor use regexps to parse their data, which we all know is a bad idea. Asciidoctor does less forward looking because it's much faster, so it's a bit less flexible with overescaping.

There are plans for Asciidoctor to move to a defined grammar at some point, which should hopefully make things a bit less insane.

-- 
brian m. carlson / brian with sandals: Houston, Texas, US
+1 832 623 2791 | https://www.crustytoothpaste.net/~bmc | My opinion only
OpenPGP: RSA v4 4096b: 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187
Previous: Jeff KingNext: Matt Kraai
Message 5 of 6 in “Documentation: remove unnecessary backslashes”
  1. Documentation: remove unnecessary backslashesMatt Kraai, Jan 20, 2016
  2. Jeff KingJan 20, 2016
  3. Junio C HamanoJan 20, 2016
  4. Jeff KingJan 20, 2016
  5. brian m. carlsonJan 22, 2016
  6. Matt KraaiJan 20, 2016

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.