public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: "SZEDER Gábor" <szeder.dev@gmail•com>
To: "Jean-Noël Avila" <jn.avila@free•fr>
Cc: Patrick Steinhardt <ps@pks•im>, Johannes Sixt <j6t@kdbg•org>,
	git@vger•kernel.org
Subject: Re: [PATCH] doc: fix asciidoctor synopsis processing of triple-dots
Date: Mon, 31 Mar 2025 19:45:20 +0200	[thread overview]
Message-ID: <Z+rUsCW0zEb8kAK8@szeder.dev> (raw)
In-Reply-To: <20250331125608.92419-1-jn.avila@free.fr>

On Mon, Mar 31, 2025 at 02:55:51PM +0200, Jean-Noël Avila wrote:
> The processing of triple dot notation is tricky because it can be
> mis-interpreted as an ellipsis. The special processing of the ellipsis
> is now complete and takes into account the case of
> `git-mv <source>... <dest>`
> 
> Signed-off-by: Jean-Noël Avila <jn.avila@free•fr>
> ---
>  Documentation/asciidoctor-extensions.rb.in | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/asciidoctor-extensions.rb.in b/Documentation/asciidoctor-extensions.rb.in
> index 2494f17a51..f2be66c4ad 100644
> --- a/Documentation/asciidoctor-extensions.rb.in
> +++ b/Documentation/asciidoctor-extensions.rb.in
> @@ -49,7 +49,7 @@ module Git
>  
>        def process parent, reader, attrs
>          outlines = reader.lines.map do |l|
> -          l.gsub(/(\.\.\.?)([^\]$.])/, '`\1`\2')
> +          l.gsub(/(\.\.\.?)([^\]$\. ])/, '{empty}`\1`{empty}\2')
>             .gsub(%r{([\[\] |()>]|^)([-a-zA-Z0-9:+=~@,/_^\$]+)}, '\1{empty}`\2`{empty}')
>             .gsub(/(<[-a-zA-Z0-9.]+>)/, '__\\1__')
>             .gsub(']', ']{empty}')
> @@ -72,6 +72,7 @@ module Git
>            %(<inlineequation><alt><![CDATA[#{equation = node.text}]]></alt><mathphrase><![CDATA[#{equation}]]></mathphrase></inlineequation>)
>          elsif type == :monospaced
>            node.text.gsub(/(\.\.\.?)([^\]$.])/, '<literal>\1</literal>\2')
> +                        .gsub(/^\.\.\.?$/, '<literal>\0</literal>\2')
>                .gsub(%r{([\[\s|()>.]|^|\]|&gt;)(\.?([-a-zA-Z0-9:+=~@,/_^\$]+\.{0,2})+)}, '\1<literal>\2</literal>')
>                .gsub(/(&lt;[-a-zA-Z0-9.]+&gt;)/, '<emphasis>\1</emphasis>')
>          else
> @@ -100,6 +101,7 @@ module Git
>        def convert_inline_quoted node
>          if node.type == :monospaced
>            node.text.gsub(/(\.\.\.?)([^\]$.])/, '<code>\1</code>\2')
> +            .gsub(/^\.\.\.?$/, '<code>\0</code>')
>                .gsub(%r{([\[\s|()>.]|^|\]|&gt;)(\.?([-a-zA-Z0-9:+=~@,/_^\$]+\.{0,2})+)}, '\1<code>\2</code>')
>                .gsub(/(&lt;[-a-zA-Z0-9.]+&gt;)/, '<em>\1</em>')
>  

Thanks.  I can confirm that this patch addresses the issue I reported
with the manpage of 'git diff' (though I think the commit message
could go into a bit more detail as to what problem this patch attempts
to solve and how).

Alas, the issue caused by 'diff-generate-patch.adoc' in the manpages
of diff-files, diff-index, log, etc. is still present.

  reply	other threads:[~2025-03-31 17:45 UTC|newest]

Thread overview: 65+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-04 20:05 [PATCH 0/5] doc: git diff reformatting Jean-Noël Avila via GitGitGadget
2024-08-04 20:05 ` [PATCH 1/5] doc: git-diff: apply new documentation guidelines Jean-Noël Avila via GitGitGadget
2024-08-05  9:11   ` Patrick Steinhardt
2024-08-05 18:51     ` Jean-Noël AVILA
2024-08-06  6:27       ` Patrick Steinhardt
2024-08-04 20:05 ` [PATCH 2/5] doc: git-diff: apply format changes to diff-options Jean-Noël Avila via GitGitGadget
2024-08-04 20:05 ` [PATCH 3/5] doc: git-diff: apply format changes to diff-format Jean-Noël Avila via GitGitGadget
2024-08-04 20:05 ` [PATCH 4/5] doc: git-diff: apply format changes to diff-generate-patch Jean-Noël Avila via GitGitGadget
2024-08-05  5:53   ` Johannes Sixt
2024-08-05 16:08     ` Junio C Hamano
2024-08-07 20:43       ` [RFC] formatting macro Jean-Noël AVILA
2024-08-12  6:35         ` Johannes Sixt
2024-08-12 15:22           ` Junio C Hamano
2024-08-13 20:42           ` Jean-Noël AVILA
2024-08-05 20:12     ` [PATCH 4/5] doc: git-diff: apply format changes to diff-generate-patch Jean-Noël AVILA
2024-08-04 20:05 ` [PATCH 5/5] doc: git-diff: apply format changes to config part Jean-Noël Avila via GitGitGadget
2024-11-11 16:53 ` [PATCH v2 0/5] doc: git diff reformatting Jean-Noël Avila via GitGitGadget
2024-11-11 16:53   ` [PATCH v2 1/5] doc: git-diff: apply new documentation guidelines Jean-Noël Avila via GitGitGadget
2024-11-12  0:48     ` Junio C Hamano
2024-11-12  8:40       ` Jean-Noël Avila
2024-11-12  9:13         ` Junio C Hamano
2024-11-12 18:28           ` Johannes Sixt
2024-11-12 23:01             ` Junio C Hamano
2024-11-13  7:31               ` Johannes Sixt
2024-11-13  8:59               ` Jean-Noël Avila
2024-11-11 16:53   ` [PATCH v2 2/5] doc: git-diff: apply format changes to diff-options Jean-Noël Avila via GitGitGadget
2024-11-12  0:52     ` Junio C Hamano
2024-11-12  9:04       ` Jean-Noël Avila
2024-11-12  9:14         ` Junio C Hamano
2024-11-11 16:53   ` [PATCH v2 3/5] doc: git-diff: apply format changes to diff-format Jean-Noël Avila via GitGitGadget
2024-11-12 18:51     ` Johannes Sixt
2024-11-12 23:03       ` Junio C Hamano
2024-11-13  7:39         ` Johannes Sixt
2024-11-13  8:10       ` Jean-Noël Avila
2024-11-11 16:53   ` [PATCH v2 4/5] doc: git-diff: apply format changes to diff-generate-patch Jean-Noël Avila via GitGitGadget
2024-11-11 16:53   ` [PATCH v2 5/5] doc: git-diff: apply format changes to config part Jean-Noël Avila via GitGitGadget
2024-11-12 18:51     ` Johannes Sixt
2024-11-13  8:12       ` Jean-Noël Avila
2024-11-16 19:36   ` [PATCH v3 0/5] doc: git diff reformatting Jean-Noël Avila via GitGitGadget
2024-11-16 19:36     ` [PATCH v3 1/5] doc: git-diff: apply new documentation guidelines Jean-Noël Avila via GitGitGadget
2024-11-17 14:04       ` Johannes Sixt
2024-11-17 16:44         ` Jean-Noël AVILA
2024-11-18  0:35           ` Junio C Hamano
2024-11-18  0:27         ` Junio C Hamano
2024-11-16 19:36     ` [PATCH v3 2/5] doc: git-diff: apply format changes to diff-options Jean-Noël Avila via GitGitGadget
2024-11-16 19:36     ` [PATCH v3 3/5] doc: git-diff: apply format changes to diff-format Jean-Noël Avila via GitGitGadget
2024-11-16 19:36     ` [PATCH v3 4/5] doc: git-diff: apply format changes to diff-generate-patch Jean-Noël Avila via GitGitGadget
2024-11-16 19:36     ` [PATCH v3 5/5] doc: git-diff: apply format changes to config part Jean-Noël Avila via GitGitGadget
2024-11-18 22:05     ` [PATCH v4 0/5] doc: git diff reformatting Jean-Noël Avila via GitGitGadget
2024-11-18 22:05       ` [PATCH v4 1/5] doc: git-diff: apply new documentation guidelines Jean-Noël Avila via GitGitGadget
2025-03-31  9:37         ` SZEDER Gábor
2025-03-31 12:55           ` [PATCH] doc: fix asciidoctor synopsis processing of triple-dots Jean-Noël Avila
2025-03-31 17:45             ` SZEDER Gábor [this message]
2025-03-31 20:30               ` Jean-Noël AVILA
2025-04-01 11:08               ` Jean-Noël Avila
2025-04-01 21:48                 ` Junio C Hamano
2025-04-02  6:49                   ` Jean-Noël Avila
2025-04-07 15:11                     ` Junio C Hamano
2024-11-18 22:05       ` [PATCH v4 2/5] doc: git-diff: apply format changes to diff-options Jean-Noël Avila via GitGitGadget
2024-11-18 22:05       ` [PATCH v4 3/5] doc: git-diff: apply format changes to diff-format Jean-Noël Avila via GitGitGadget
2024-11-18 22:05       ` [PATCH v4 4/5] doc: git-diff: apply format changes to diff-generate-patch Jean-Noël Avila via GitGitGadget
2024-11-18 22:05       ` [PATCH v4 5/5] doc: git-diff: apply format changes to config part Jean-Noël Avila via GitGitGadget
2024-11-26  4:32       ` [PATCH v4 0/5] doc: git diff reformatting Junio C Hamano
2024-11-26  6:55         ` Johannes Sixt
2024-11-26  7:15           ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Z+rUsCW0zEb8kAK8@szeder.dev \
    --to=szeder.dev@gmail$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    --cc=j6t@kdbg$(echo .)org \
    --cc=jn.avila@free$(echo .)fr \
    --cc=ps@pks$(echo .)im \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox