git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] userdiff: support Markdown

From
Ash Holland <ash@sorrel.sh>
Date
Apr 23, 2020, 23:42 UTC
Message-ID
<C28ZH8NBU8BS.1WKC7DSJANUIM@what>
In-Reply-To
<33f037a9-d3d5-042a-d3ba-7e4b8364663a@kdbg.org>
On Thu Apr 23, 2020 at 9:17 PM PST, Johannes Sixt wrote:
Show 14 quoted lines
> 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.

Previous: Johannes SixtNext: Johannes Sixt
Message 7 of 15 in “userdiff: support Markdown”
  1. userdiff: support MarkdownAsh Holland, Apr 21, 2020
  2. Emma BrooksApr 21, 2020
  3. Ash HollandApr 23, 2020
  4. Junio C HamanoApr 28, 2020
  5. Ash HollandApr 29, 2020
  6. Johannes SixtApr 23, 2020
  7. Ash HollandApr 23, 2020
  8. Johannes SixtApr 24, 2020
  9. Ash HollandApr 29, 2020
  10. userdiff: support MarkdownAsh Holland, Apr 29, 2020
  11. Junio C HamanoApr 30, 2020
  12. Ash HollandMay 1, 2020
  13. Johannes SixtMay 1, 2020
  14. userdiff: support MarkdownAsh Holland, May 2, 2020
  15. Johannes SixtMay 2, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.