From: "Ash Holland" <ash@sorrel.sh>
To: "Johannes Sixt" <j6t@kdbg.org>
Cc: <git@vger.kernel.org>, "Junio C Hamano" <gitster@pobox.com>,
"Boxuan Li" <liboxuan@connect.hku.hk>,
"Alban Gruin" <alban.gruin@gmail.com>
Subject: Re: [PATCH] userdiff: support Markdown
Date: Wed, 29 Apr 2020 13:21:13 +0100 [thread overview]
Message-ID: <C2DOR3QPGHWC.2H494OQI75ZRW@what> (raw)
In-Reply-To: <91ff4bdb-9b53-8fd1-6282-ac19a9caf1d8@kdbg.org>
On Fri Apr 24, 2020 at 8:21 PM BST, Johannes Sixt wrote:
> Am 24.04.20 um 01:42 schrieb Ash Holland:
> > On Thu Apr 23, 2020 at 9:17 PM PST, Johannes Sixt wrote:
> >> Am 21.04.20 um 03:00 schrieb Ash Holland:
> >>> diff --git a/userdiff.c b/userdiff.c
> >>> index efbe05e5a..f79adb3a3 100644
> >>> --- a/userdiff.c
> >>> +++ b/userdiff.c
> >>> @@ -79,6 +79,9 @@ PATTERNS("java",
> >>> "|[-+0-9.e]+[fFlL]?|0[xXbB]?[0-9a-fA-F]+[lL]?"
> >>> "|[-+*/<>%&^|=!]="
> >>> "|--|\\+\\+|<<=?|>>>?=?|&&|\\|\\|"),
> >>> +PATTERNS("markdown",
> >>> + "^ {0,3}#{1,6}( .*)?$",
> >>
> >> What is the purpose of making the heading text optional? Why would you
> >> want to match a sequence of hash marks without any text following it?
> >
> > Strictly speaking, a markdown heading is allowed to be empty -- see for
> > example https://spec.commonmark.org/0.29/#example-49. I'm happy to
> > change it if you think it's more useful to show a previous heading which
> > contains text than an empty one, though.
>
> I don't know what makes sense, I don't write markdown regularly. A quick
> check shows that the sequence of hashmarks appears in the hunk header.
> Is that useful? (A genuine question!)
I think probably it would be more confusing to have Git silently ignore
empty headings, having occasionally written documents with empty
headings in the past (e.g. when I know I want some different sections,
but I don't know what to call them yet). Probably not many people would
ever run into this situation either way, though.
next prev parent reply other threads:[~2020-04-29 12:36 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-21 1:00 [PATCH] userdiff: support Markdown Ash Holland
2020-04-21 2:22 ` Emma Brooks
2020-04-23 23:32 ` Ash Holland
2020-04-28 21:57 ` Junio C Hamano
2020-04-29 12:12 ` Ash Holland
2020-04-23 18:17 ` Johannes Sixt
2020-04-23 23:42 ` Ash Holland
2020-04-24 17:21 ` Johannes Sixt
2020-04-29 12:21 ` Ash Holland [this message]
2020-04-29 23:05 ` [PATCH v2] " Ash Holland
2020-04-30 17:31 ` Junio C Hamano
2020-05-01 11:49 ` Ash Holland
2020-05-01 14:26 ` Johannes Sixt
2020-05-02 13:15 ` [PATCH v3] " Ash Holland
2020-05-02 13:58 ` Johannes Sixt
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=C2DOR3QPGHWC.2H494OQI75ZRW@what \
--to=ash@sorrel.sh \
--cc=alban.gruin@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=j6t@kdbg.org \
--cc=liboxuan@connect.hku.hk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).