diff mbox series

Documentation: render special characters correctly

Message ID 20210729110252.116214-1-rybak.a.v@gmail.com (mailing list archive)
State Accepted
Commit f0b922473e246f4288669c2ed20a0b4b5d6dec13
Headers show
Series Documentation: render special characters correctly | expand

Commit Message

Andrei Rybak July 29, 2021, 11:02 a.m. UTC
Three hyphens are rendered verbatim, so "--" has to be used to produce a
dash.  There is no double arrow ("<->" is rendered as "<→"), so a left
and right arrow "<-->" have to be combined for that.

So fix asciidoc output for special characters.  This is similar to fixes
in commit de82095a95 (doc hash-function-transition: fix asciidoc output,
2021-02-05).

Signed-off-by: Andrei Rybak <rybak.a.v@gmail.com>
---
 Documentation/git-fetch.txt   | 2 +-
 Documentation/gittutorial.txt | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Comments

Jeff King July 29, 2021, 1:04 p.m. UTC | #1
On Thu, Jul 29, 2021 at 01:02:52PM +0200, Andrei Rybak wrote:

> Three hyphens are rendered verbatim, so "--" has to be used to produce a
> dash.  There is no double arrow ("<->" is rendered as "<→"), so a left
> and right arrow "<-->" have to be combined for that.
> 
> So fix asciidoc output for special characters.  This is similar to fixes
> in commit de82095a95 (doc hash-function-transition: fix asciidoc output,
> 2021-02-05).

Thanks. I looked at the doc-diff output before and after this patch, and
they both seem like strict improvements.

The double-arrow thing is kind of weird to me in the first place,
though. I suspect it might be more clear if it just spelled out what it
is trying to say with words. Something like:

  The pruning feature doesn't actually care about branches. Instead, it
  will prune local refs tracking remote ones as a function of...

But I'm OK to leave that to do on top; the current code simply renders
incorrectly, and your patch is fixing that.

-Peff
diff mbox series

Patch

diff --git a/Documentation/git-fetch.txt b/Documentation/git-fetch.txt
index 9067c2079e..550c16ca61 100644
--- a/Documentation/git-fetch.txt
+++ b/Documentation/git-fetch.txt
@@ -133,7 +133,7 @@  remember to run that, set `fetch.prune` globally, or
 linkgit:git-config[1].
 
 Here's where things get tricky and more specific. The pruning feature
-doesn't actually care about branches, instead it'll prune local <->
+doesn't actually care about branches, instead it'll prune local <-->
 remote-references as a function of the refspec of the remote (see
 `<refspec>` and <<CRTB,CONFIGURED REMOTE-TRACKING BRANCHES>> above).
 
diff --git a/Documentation/gittutorial.txt b/Documentation/gittutorial.txt
index 59ef5cef1f..0e0b863105 100644
--- a/Documentation/gittutorial.txt
+++ b/Documentation/gittutorial.txt
@@ -322,7 +322,7 @@  initiating this "pull".  If Bob's work conflicts with what Alice did since
 their histories forked, Alice will use her working tree and the index to
 resolve conflicts, and existing local changes will interfere with the
 conflict resolution process (Git will still perform the fetch but will
-refuse to merge --- Alice will have to get rid of her local changes in
+refuse to merge -- Alice will have to get rid of her local changes in
 some way and pull again when this happens).
 
 Alice can peek at what Bob did without merging first, using the "fetch"