From: Eric Sunshine <sunshine@sunshineco.com>
To: Hiroyuki Sano <sh19910711@gmail.com>
Cc: Git List <git@vger.kernel.org>
Subject: Re: [GSoC][PATCH 1/2] userdiff: add built-in patterns for CSS
Date: Sun, 8 Mar 2015 19:08:31 -0400 [thread overview]
Message-ID: <CAPig+cTEbX+cD39-_5EC8o7uciBw7uL58C31ePMXCJ3SLzYJtg@mail.gmail.com> (raw)
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:
> 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
> 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]*\\([^;]*)$",
> --
prev parent reply other threads:[~2015-03-08 23:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-08 11:03 [GSoC][PATCH 1/2] userdiff: add built-in patterns for CSS Hiroyuki Sano
2015-03-08 11:03 ` [GSoC][PATCH 2/2] attrs: add "css" to the list of userdiff bulit-in patterns Hiroyuki Sano
2015-03-08 23:02 ` Eric Sunshine
2015-03-08 23:08 ` Eric Sunshine [this message]
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=CAPig+cTEbX+cD39-_5EC8o7uciBw7uL58C31ePMXCJ3SLzYJtg@mail.gmail.com \
--to=sunshine@sunshineco.com \
--cc=git@vger.kernel.org \
--cc=sh19910711@gmail.com \
/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.
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 NNTP newsgroup(s).