diff mbox series

[4/6] diff-options.txt: move monospace markup out of attribute

Message ID f6241315a4d90185882a247d1c81ed7ee595d9a9.1620928059.git.martin.agren@gmail.com (mailing list archive)
State New
Headers show
Series AsciiDoc vs Asciidoctor, once again | expand

Commit Message

Martin Ågren May 13, 2021, 6:17 p.m. UTC
git-log.txt and git-show.txt want to use different defaults for the
`--no-diff-merges` option. They do this by defining a
"diff-merges-default" attribute as, e.g., `off` (with backticks), which
is then referenced in the common diff-options.txt.

AsciiDoc renders the default in monospace, as wanted, but Asciidoctor
renders the backticks literally.

Pull the formatting into diff-options.txt and define
"diff-merges-default" without any quotation or markup. We can't write
`{diff-merges-default)` with backticks since that would render as
"{diff-merges-default}", but we can use +{diff-merges-default}+ -- both
Asciidoc and Asciidoctor do the substitution and the parsing of the
plusses in the order we want.

Signed-off-by: Martin Ågren <martin.agren@gmail.com>
 Documentation/diff-options.txt | 2 +-
 Documentation/git-log.txt      | 2 +-
 Documentation/git-show.txt     | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
diff mbox series


diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt
index 530d115914..6eb8bfff5d 100644
--- a/Documentation/diff-options.txt
+++ b/Documentation/diff-options.txt
@@ -37,7 +37,7 @@  ifdef::git-log[]
 	Specify diff format to be used for merge commits. Default is
-	{diff-merges-default} unless `--first-parent` is in use, in which case
+	+{diff-merges-default}+ unless `--first-parent` is in use, in which case
 	`first-parent` is the default.
diff --git a/Documentation/git-log.txt b/Documentation/git-log.txt
index 1bbf865a1b..19560650bf 100644
--- a/Documentation/git-log.txt
+++ b/Documentation/git-log.txt
@@ -115,7 +115,7 @@  is when `--first-parent` is in use, in which case `first-parent` is
 the default format.
 :git-log: 1
-:diff-merges-default: `off`
+:diff-merges-default: off
diff --git a/Documentation/git-show.txt b/Documentation/git-show.txt
index 2b1bc7288d..f8341e51c0 100644
--- a/Documentation/git-show.txt
+++ b/Documentation/git-show.txt
@@ -51,7 +51,7 @@  The options below can be used to change the way `git show` generates
 diff output.
 :git-log: 1
-:diff-merges-default: `dense-combined`
+:diff-merges-default: dense-combined