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

Re: [GSoC][PATCH 1/2] userdiff: add built-in patterns for CSS

From
Eric Sunshine <sunshine@sunshineco.com>
Date
Mar 8, 2015, 23:08 UTC
Message-ID
<CAPig+cTEbX+cD39-_5EC8o7uciBw7uL58C31ePMXCJ3SLzYJtg@mail.gmail.com>
In-Reply-To
<1425812624-6671-1-git-send-email-sh19910711@gmail.com>
On Sun, Mar 8, 2015 at 7:03 AM, Hiroyuki Sano <sh19910711@gmail.com> wrote:
Show 14 quoted lines
> Add regex patterns for CSS. The word regex maches selectors, properties,
> and values. On the other hand, the funcname regex matches lines contains
> the curly brace character.
>
> Signed-off-by: Hiroyuki Sano <sh19910711@gmail.com>
> ---
> diff --git a/t/t4034/css/post b/t/t4034/css/post
> new file mode 100644
> index 0000000..7e64463
> --- /dev/null
> +++ b/t/t4034/css/post
> @@ -0,0 +1,32 @@
> [...]
> +.class, elm:hover, elm:first-child, elm:lang(en), #id, elm#id, .num123{
Mental note: colon and parentheses are present
Show 11 quoted lines
> diff --git a/userdiff.c b/userdiff.c
> index 2ccbee5..8374a2a 100644
> --- a/userdiff.c
> +++ b/userdiff.c
> @@ -37,6 +37,9 @@ IPATTERN("fortran",
>          "|//|\\*\\*|::|[/<>=]="),
>  PATTERNS("html", "^[ \t]*(<[Hh][1-6][ \t].*>.*)$",
>          "[^<>= \t]+"),
> +PATTERNS("css",
> +        "^.*[{].*$",
> +        "[-_\\.,#a-zA-Z0-9]+"),

Is the intention that this should match "elm:lang(en)" as an atom, or separately match "elm", "lang", and "en"?

>  PATTERNS("java",
>          "!^[ \t]*(catch|do|for|if|instanceof|new|return|switch|throw|while)\n"
>          "^[ \t]*(([A-Za-z_][A-Za-z_0-9]*[ \t]+)+[A-Za-z_][A-Za-z_0-9]*[ \t]*\\([^;]*)$",
> --
Previous: Eric Sunshine
Message 4 of 4 in “userdiff: add built-in patterns for CSS”
  1. Hiroyuki SanoMar 8, 2015
  2. [GSoC][PATCH 2/2] attrs: add "css" to the list of userdiff bulit-in patternsHiroyuki Sano, Mar 8, 2015
  3. Eric SunshineMar 8, 2015
  4. Eric SunshineMar 8, 2015

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.