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

[PATCH 2/3] docs: drop asciidoc7compatible flag

From
Jeff King <peff@peff.net>
Date
May 30, 2012, 10:22 UTC
Message-ID
<20120530102242.GB13341@sigill.intra.peff.net>
In-Reply-To
<20120530101758.GA13285@sigill.intra.peff.net>

When we made the switch to supporting asciidoc 8 in 4c7100a (Documentation: adjust to AsciiDoc 8, 2007-06-14), we were able to leave most of the documentation intact by defining asciidoc7compatible.

Since commit 6cf378f (docs: stop using asciidoc no-inline-literal, 2012-04-26), we don't support versions of asciidoc older than 8.4.1, which is when inline literals were introduced. Therefore there is not much point in keeping our documentation compatible with asciidoc 7.

So we are now free to drop the asciidoc7compatible flag and update the documentation itself to assume asciidoc8. Fortunately, doing the latter is very easy; we weren't using any of the constructs impacted by asciidoc7compatible, so there are no changes to make.

The reason is somewhat subtle. The asciidoc7compatible affects only super/sub-scripts ("^" and "~") and index terms. We don't use the latter at all. Nor we do we use the former, but we did have to protect them from accidental expansion in constructs like "rev^1". However, all of our uses of "~" and "^" are either in code blocks (which are rendered literally), or inside backticks. Prior to 6cf378f, backticks were not inline literals, and needed proper quoting. But post-6cf378f, we don't have to worry whether we are using the old or new rules, as those characters are not interpreted at all in either case.

I verified that the result of "make install-html install-man" is identical before and after this patch on asciidoc 8.6.7.

Signed-off-by: Jeff King <peff@peff.net>
---
It's possible that other recent versions of asciidoc might not generate
identical output, or that asciidoc7compatible might change in the future
to include some as-yet-undiscovered incompatibility (though I find that
unlikely, as it has been several years now). But in that case, I think
this is still the right thing to do, and we should update to the proper
asciidoc8 syntax.

I tweaked the configure.ac to stop setting ASCIIDOC7, since it no longer does anything. I believe this makes the whole version check a no-op, except for the message that is printed. It might be worth actually checking for asciidoc >= 8.4.1 in the configure script, but I will leave that to the folks who care about autoconf (apparently there is a dotted-version comparison function, but it was only in autoconf 2.53 or higher, and I have no idea what we consider recent enough autoconf).

 Documentation/Makefile | 9 ---------
 Makefile               | 6 ------
 config.mak.in          | 1 -
 configure.ac           | 7 -------
 4 files changed, 23 deletions(-)
diff --git a/Documentation/Makefile b/Documentation/Makefile
index 14286cb..030e2c8 100644
--- a/Documentation/Makefile
+++ b/Documentation/Makefile
@@ -66,12 +66,6 @@ endif
 -include ../config.mak
 
 #
-# For asciidoc ...
-#	-7.1.2,	set ASCIIDOC7
-#	8.0-,	no extra settings are needed
-#
-
-#
 # For docbook-xsl ...
 #	-1.68.1,	no extra settings are needed?
 #	1.69.0,		set ASCIIDOC_ROFF?
@@ -81,9 +75,6 @@ endif
 #	1.73.0-,	no extra settings are needed
 #
 
-ifndef ASCIIDOC7
-ASCIIDOC_EXTRA += -a asciidoc7compatible
-endif
 ifdef DOCBOOK_XSL_172
 ASCIIDOC_EXTRA += -a git-asciidoc-no-roff
 MANPAGE_XSL = manpage-1.72.xsl
diff --git a/Makefile b/Makefile
index 96ebcf9..55943a9 100644
--- a/Makefile
+++ b/Makefile
@@ -203,8 +203,6 @@ all::
 # Define NO_ST_BLOCKS_IN_STRUCT_STAT if your platform does not have st_blocks
 # field that counts the on-disk footprint in 512-byte blocks.
 #
-# Define ASCIIDOC7 if you want to format documentation with AsciiDoc 7
-#
 # Define DOCBOOK_XSL_172 if you want to format man pages with DocBook XSL v1.72
 # (not v1.73 or v1.71).
 #
@@ -1834,10 +1832,6 @@ ifndef V
 endif
 endif
 
-ifdef ASCIIDOC7
-	export ASCIIDOC7
-endif
-
 ifdef NO_INSTALL_HARDLINKS
 	export NO_INSTALL_HARDLINKS
 endif
diff --git a/config.mak.in b/config.mak.in
index b2ba710..802d342 100644
--- a/config.mak.in
+++ b/config.mak.in
@@ -28,7 +28,6 @@ VPATH = @srcdir@
 export exec_prefix mandir
 export srcdir VPATH
 
-ASCIIDOC7=@ASCIIDOC7@
 NEEDS_SSL_WITH_CRYPTO=@NEEDS_SSL_WITH_CRYPTO@
 NO_OPENSSL=@NO_OPENSSL@
 NO_CURL=@NO_CURL@
diff --git a/configure.ac b/configure.ac
index e125550..4e9012f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -437,21 +437,14 @@ if test -n "$ASCIIDOC"; then
 	AC_MSG_CHECKING([for asciidoc version])
 	asciidoc_version=`$ASCIIDOC --version 2>/dev/null`
 	case "${asciidoc_version}" in
-	asciidoc' '7*)
-		ASCIIDOC7=YesPlease
-		AC_MSG_RESULT([${asciidoc_version} > 7])
-		;;
 	asciidoc' '8*)
-		ASCIIDOC7=
 		AC_MSG_RESULT([${asciidoc_version}])
 		;;
 	*)
-		ASCIIDOC7=
 		AC_MSG_RESULT([${asciidoc_version} (unknown)])
 		;;
 	esac
 fi
-AC_SUBST(ASCIIDOC7)
 
 
 ## Checks for libraries.
-- 
1.7.11.rc0.12.g6048c92
Previous: Jeff KingNext: Jeff King
Message 14 of 15 in “"docs: stop using asciidoc no-inline-literal" breaks asciidoc 8.2.5”
  1. Ævar Arnfjörð BjarmasonMay 29, 2012
  2. Thomas RastMay 29, 2012
  3. Ævar Arnfjörð BjarmasonMay 29, 2012
  4. Junio C HamanoMay 29, 2012
  5. Jeff KingMay 29, 2012
  6. Jeff KingMay 29, 2012
  7. Dennis KaarsemakerMay 29, 2012
  8. Ævar Arnfjörð BjarmasonMay 29, 2012
  9. Ævar Arnfjörð BjarmasonMay 29, 2012
  10. Jeff KingMay 30, 2012
  11. Matthieu MoyMay 30, 2012
  12. 0/3 docs: asciidoc version tweaksJeff King, May 30, 2012
  13. 1/3 INSTALL: update asciidoc recommendationJeff King, May 30, 2012
  14. 2/3 docs: drop asciidoc7compatible flagJeff King, May 30, 2012
  15. 3/3 docs: drop antique comment from MakefileJeff King, May 30, 2012

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.