summaryrefslogtreecommitdiff
path: root/Documentation/git-stripspace.txt
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2015-05-13 02:15:56 (GMT)
committerJunio C Hamano <gitster@pobox.com>2015-05-13 04:33:09 (GMT)
commitad3967a5a2bc8a2505ba618e59cd541775571ff8 (patch)
tree923fca2eed54186ccc92f4d39dde9cd73b6303a3 /Documentation/git-stripspace.txt
parent282616c72d1d08a77ca4fe1186cb708c38408d87 (diff)
downloadgit-ad3967a5a2bc8a2505ba618e59cd541775571ff8.zip
git-ad3967a5a2bc8a2505ba618e59cd541775571ff8.tar.gz
git-ad3967a5a2bc8a2505ba618e59cd541775571ff8.tar.bz2
doc: fix unmatched code fences in git-stripspace
The asciidoctor renderer is more picky than classic asciidoc, and insists that the start and end of a code fence be the same size. Found with this hacky perl script: foreach my $fn (@ARGV) { open(my $fh, '<', $fn); my ($fence, $fence_lineno, $prev); while (<$fh>) { chomp; if (/^----+$/) { if ($fence_lineno) { if ($_ ne $fence) { print "$fn:$fence_lineno:mismatched fence: ", length($fence), " != ", length($_), "\n"; } $fence_lineno = undef; } # hacky check to avoid title-underlining elsif ($prev eq '' || $prev eq '+') { $fence = $_; $fence_lineno = $.; } } $prev = $_; } } Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-stripspace.txt')
-rw-r--r--Documentation/git-stripspace.txt6
1 files changed, 3 insertions, 3 deletions
diff --git a/Documentation/git-stripspace.txt b/Documentation/git-stripspace.txt
index c87bfcb..28f7879 100644
--- a/Documentation/git-stripspace.txt
+++ b/Documentation/git-stripspace.txt
@@ -48,7 +48,7 @@ EXAMPLES
Given the following noisy input with '$' indicating the end of a line:
---------
+---------
|A brief introduction $
| $
|$
@@ -64,7 +64,7 @@ Given the following noisy input with '$' indicating the end of a line:
Use 'git stripspace' with no arguments to obtain:
---------
+---------
|A brief introduction$
|$
|A new paragraph$
@@ -78,7 +78,7 @@ Use 'git stripspace' with no arguments to obtain:
Use 'git stripspace --strip-comments' to obtain:
---------
+---------
|A brief introduction$
|$
|A new paragraph$