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

Re: [PATCH 0/8] asciidoc fixups

From
Jeff King <peff@peff.net>
Date
May 13, 2015, 05:09 UTC
Message-ID
<20150513050951.GA7122@peff.net>
In-Reply-To
<20150513045650.GA6070@peff.net>
On Wed, May 13, 2015 at 12:56:50AM -0400, Jeff King wrote:
Show 8 quoted lines
>   - Lots of places where we backslash-escape some syntax for AsciiDoc
>     ends up rendered by AsciiDoctor with the backslashes included. In
>     some cases the quoting is unnecessary and we can drop it (see
>     patches 6 and 7 below). But in others it really is necessary, and
>     AsciiDoc generates bad output without the backslashes. The major
>     ones are "--" surrounded by spaces (which becomes an emdash), and
>     things like @\{HEAD}, which needs quoted to tell AsciiDoc that HEAD
>     isn't an attribute.

That example should be HEAD@\{yesterday}, of course, but I think you get the point.

Show 8 quoted lines
>   [1/8]: doc: fix misrendering due to `single quote'
>   [2/8]: doc: fix unquoted use of "{type}"
>   [3/8]: doc: fix hanging "+"-continuation
>   [4/8]: doc: fix length of underlined section-title
>   [5/8]: doc/add: reformat `--edit` option
>   [6/8]: doc: convert \--option to --option
>   [7/8]: doc: drop backslash quoting of some curly braces
>   [8/8]: doc: put example URLs inside literal backticks

While reviewing the changes to the output, I found this script, which shows the diff of the rendered HTML against the parent, very valuable:

    #!/bin/sh
    
    me=$(git rev-parse HEAD^{tree})
    parent=$(git rev-parse HEAD^^{tree})
    
    build() {
    	test -d build/$1 && return 0
    	mkdir -p build/tmp &&
    	make -j16 html &&
    	cp *.html build/tmp &&
    	mv build/tmp build/$1
    }
    
    check() {
    	test -d build/$1 && return 0
    	echo >&2 "doc for $1 not built"
    	return 1
    }
    
    build $me &&
    check $parent &&
    diff -Nru -I'^ 2015-05' build/$parent build/$me

I basically stopped at each commit in an interactive rebase and checked the output (to confirm that it was sane, and especially to confirm the cases where I claimed there should be no changes to the output).

-Peff
Previous: Jeff KingNext: Junio C Hamano
Message 21 of 37 in “doc: fix unmatched code fences”
  1. doc: fix unmatched code fencesJean-Noel Avila, May 12, 2015
  2. Junio C HamanoMay 12, 2015
  3. Jeff KingMay 13, 2015
  4. Junio C HamanoMay 13, 2015
  5. Jeff KingMay 13, 2015
  6. Junio C HamanoMay 13, 2015
  7. Jeff KingMay 13, 2015
  8. brian m. carlsonMay 13, 2015
  9. 0/8 asciidoc fixupsJeff King, May 13, 2015
  10. 1/8 doc: fix misrendering due to `single quote'Jeff King, May 13, 2015
  11. 2/8 doc: fix unquoted use of "{type}"Jeff King, May 13, 2015
  12. 3/8 doc: fix hanging "+"-continuationJeff King, May 13, 2015
  13. 4/8 doc: fix length of underlined section-titleJeff King, May 13, 2015
  14. 5/8 doc/add: reformat `--edit` optionJeff King, May 13, 2015
  15. 6/8 doc: convert \--option to --optionJeff King, May 13, 2015
  16. John KeepingMay 13, 2015
  17. Jeff KingMay 14, 2015
  18. Junio C HamanoMay 17, 2015
  19. 7/8 doc: drop backslash quoting of some curly bracesJeff King, May 13, 2015
  20. 8/8 doc: put example URLs and emails inside literal backticksJeff King, May 13, 2015
  21. Jeff KingMay 13, 2015
  22. Junio C HamanoMay 13, 2015
  23. Jeff KingMay 13, 2015
  24. Johannes SchindelinMay 13, 2015
  25. Jeff KingMay 14, 2015
  26. brian m. carlsonMay 13, 2015
  27. Jeff KingMay 14, 2015
  28. 9/8 doc: convert AsciiDoc {?foo} to ifdef::foo[]Jeff King, May 14, 2015
  29. Johannes SchindelinMay 14, 2015
  30. Jeff KingMay 14, 2015
  31. Johannes SchindelinMay 14, 2015
  32. Junio C HamanoMay 14, 2015
  33. Jeff KingMay 14, 2015
  34. Junio C HamanoMay 14, 2015
  35. David TurnerMay 14, 2015
  36. brian m. carlsonMay 15, 2015
  37. Jeff KingMay 15, 2015

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.