# [PATCH] Documentation: fix header markup

3 messages from 2015-10-22 to 2015-10-22. Participants: Xue Fuqiao, Junio C Hamano.
Thread: https://gitlist.dev/t/40618

## Xue Fuqiao, 2015-10-22 12:59

Subject: [PATCH] Documentation: fix header markup
Message-ID: <1445518740-18221-1-git-send-email-xfq.free@gmail.com>
URL: https://gitlist.dev/e/1445518740-18221-1-git-send-email-xfq.free%40gmail.com

```
Asciidoctor is stricter than AsciiDoc when deciding if underlining
is a section title or the start of preformatted text.  Make the
length of the underlining match the text to ensure that it renders
correctly in all implementations.

Signed-off-by: Xue Fuqiao <xfq.free@gmail.com>
---
Currently, "Fixing a mistake by rewriting history" is surrounded by a
pair of <p> tags instead of a pair of <h3> tags in
https://git-scm.com/docs/user-manual.html.  This patch will (hopefully)
fix that.

 Documentation/user-manual.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt
index 1b7987e..764a270 100644
--- a/Documentation/user-manual.txt
+++ b/Documentation/user-manual.txt
@@ -1491,7 +1491,7 @@ resolving a merge>>.
 
 [[fixing-a-mistake-by-rewriting-history]]
 Fixing a mistake by rewriting history
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 If the problematic commit is the most recent commit, and you have not
 yet made that commit public, then you may just
-- 
2.6.2

```

## Junio C Hamano, 2015-10-22 16:36

Subject: Re: [PATCH] Documentation: fix header markup
Message-ID: <xmqq37x2uah6.fsf@gitster.mtv.corp.google.com>
URL: https://gitlist.dev/e/xmqq37x2uah6.fsf%40gitster.mtv.corp.google.com
In-Reply-To: <1445518740-18221-1-git-send-email-xfq.free@gmail.com>

```
Xue Fuqiao <xfq.free@gmail.com> writes:

> Asciidoctor is stricter than AsciiDoc when deciding if underlining
> is a section title or the start of preformatted text.  Make the
> length of the underlining match the text to ensure that it renders
> correctly in all implementations.
>
> Signed-off-by: Xue Fuqiao <xfq.free@gmail.com>
> ---

Looks obviously correct.  Will queue.

Thanks.

> Currently, "Fixing a mistake by rewriting history" is surrounded by a
> pair of <p> tags instead of a pair of <h3> tags in
> https://git-scm.com/docs/user-manual.html.  This patch will (hopefully)
> fix that.
>
>  Documentation/user-manual.txt | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt
> index 1b7987e..764a270 100644
> --- a/Documentation/user-manual.txt
> +++ b/Documentation/user-manual.txt
> @@ -1491,7 +1491,7 @@ resolving a merge>>.
>  
>  [[fixing-a-mistake-by-rewriting-history]]
>  Fixing a mistake by rewriting history
> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>  
>  If the problematic commit is the most recent commit, and you have not
>  yet made that commit public, then you may just

```

## Junio C Hamano, 2015-10-22 16:57

Subject: [PATCH] Match underline with the text
Message-ID: <xmqqvb9ysuxf.fsf_-_@gitster.mtv.corp.google.com>
URL: https://gitlist.dev/e/xmqqvb9ysuxf.fsf_-_%40gitster.mtv.corp.google.com
In-Reply-To: <xmqq37x2uah6.fsf@gitster.mtv.corp.google.com>

```
Even though AsciiDoc is more lenient when deciding if an underline
is for the contents on the previous line to find section headers, we
should match the length of them for other formatters to help them.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
---

 * A few more instances I found.

 Documentation/git-bisect.txt         | 2 +-
 Documentation/git-remote.txt         | 2 +-
 Documentation/git-upload-archive.txt | 2 +-
 Documentation/giteveryday.txt        | 2 +-
 Documentation/gitrevisions.txt       | 2 +-
 Documentation/urls-remotes.txt       | 2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/Documentation/git-bisect.txt b/Documentation/git-bisect.txt
index 2044fe6..51cacd7 100644
--- a/Documentation/git-bisect.txt
+++ b/Documentation/git-bisect.txt
@@ -256,7 +256,7 @@ Then compile and test the chosen revision, and afterwards mark
 the revision as good or bad in the usual manner.
 
 Bisect skip
-~~~~~~~~~~~~
+~~~~~~~~~~~
 
 Instead of choosing a nearby commit by yourself, you can ask Git to do
 it for you by issuing the command:
diff --git a/Documentation/git-remote.txt b/Documentation/git-remote.txt
index 3c9bf45..1d7ecea 100644
--- a/Documentation/git-remote.txt
+++ b/Documentation/git-remote.txt
@@ -1,5 +1,5 @@
 git-remote(1)
-============
+=============
 
 NAME
 ----
diff --git a/Documentation/git-upload-archive.txt b/Documentation/git-upload-archive.txt
index cbef61b..fba0f1c 100644
--- a/Documentation/git-upload-archive.txt
+++ b/Documentation/git-upload-archive.txt
@@ -1,5 +1,5 @@
 git-upload-archive(1)
-====================
+=====================
 
 NAME
 ----
diff --git a/Documentation/giteveryday.txt b/Documentation/giteveryday.txt
index 7be6e64..35473ad 100644
--- a/Documentation/giteveryday.txt
+++ b/Documentation/giteveryday.txt
@@ -1,5 +1,5 @@
 giteveryday(7)
-===============
+==============
 
 NAME
 ----
diff --git a/Documentation/gitrevisions.txt b/Documentation/gitrevisions.txt
index c0ed6d1..e903eb7 100644
--- a/Documentation/gitrevisions.txt
+++ b/Documentation/gitrevisions.txt
@@ -1,5 +1,5 @@
 gitrevisions(7)
-================
+===============
 
 NAME
 ----
diff --git a/Documentation/urls-remotes.txt b/Documentation/urls-remotes.txt
index 282758e..bd184cd 100644
--- a/Documentation/urls-remotes.txt
+++ b/Documentation/urls-remotes.txt
@@ -36,7 +36,7 @@ The `<pushurl>` is used for pushes only. It is optional and defaults
 to `<url>`.
 
 Named file in `$GIT_DIR/remotes`
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 You can choose to provide the name of a
 file in `$GIT_DIR/remotes`.  The URL

```
