From: Junio C Hamano <gitster@pobox.com>
To: William Duclot <william.duclot@ensimag.grenoble-inp.fr>
Cc: git@vger.kernel.org, simon.rabourg@ensimag.grenoble-inp.fr,
antoine.queru@ensimag.grenoble-inp.fr,
francois.beutin@ensimag.grenoble-inp.fr, j6t@kdbg.org,
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Subject: Re: [PATCH] userdiff: add built-in pattern for CSS
Date: Thu, 02 Jun 2016 16:07:41 -0700 [thread overview]
Message-ID: <xmqq1t4frxz6.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <20160602224809.5167-1-william.duclot@ensimag.grenoble-inp.fr> (William Duclot's message of "Fri, 3 Jun 2016 00:48:09 +0200")
William Duclot <william.duclot@ensimag.grenoble-inp.fr> writes:
> diff --git a/userdiff.c b/userdiff.c
> index 6bf2505..00fc3bf 100644
> --- a/userdiff.c
> +++ b/userdiff.c
> @@ -148,6 +148,18 @@ PATTERNS("csharp",
> "[a-zA-Z_][a-zA-Z0-9_]*"
> "|[-+0-9.e]+[fFlL]?|0[xXbB]?[0-9a-fA-F]+[lL]?"
> "|[-+*/<>%&^|=!]=|--|\\+\\+|<<=?|>>=?|&&|\\|\\||::|->"),
> +IPATTERN("css",
> + "!^.*;\n"
> + "^[_a-z0-9].*$",
> + /* -- */
> + /*
> + * This regex comes from W3C CSS specs. Should theoretically also
> + * allow ISO 10646 characters U+00A0 and higher,
> + * but they are not handled in this regex.
> + */
> + "-?[_a-zA-F][-_a-zA-F0-9]*" /* identifiers */
> + "|-?[0-9]+|\\#[0-9a-fA-F]+" /* numbers */
You could now lose A-F from the above two lines. In fact, the first
line "identifiers" has "a-zA-F", which probably would work correctly
under IPATTERN() to include 'G-Z' as part of the legit letters for
identifiers, but is indeed misleading.
> +),
> { "default", NULL, -1, { NULL, 0 } },
> };
> #undef PATTERNS
next prev parent reply other threads:[~2016-06-02 23:07 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-20 13:28 [PATCH] userdiff: add built-in pattern for CSS William Duclot
2016-05-20 22:37 ` Junio C Hamano
2016-05-24 14:25 ` William Duclot
2016-05-24 19:06 ` Junio C Hamano
2016-05-24 22:12 ` William Duclot
2016-05-24 22:18 ` Junio C Hamano
2016-05-26 21:11 ` Johannes Sixt
2016-05-27 7:48 ` William Duclot
2016-06-02 22:48 ` William Duclot
2016-06-02 23:07 ` Junio C Hamano [this message]
2016-06-03 5:52 ` Johannes Sixt
2016-06-03 6:41 ` Matthieu Moy
2016-06-03 6:56 ` Johannes Sixt
2016-06-03 9:45 ` William Duclot
2016-06-03 15:50 ` Junio C Hamano
2016-06-06 7:28 ` William Duclot
2016-06-06 18:00 ` Junio C Hamano
2016-06-06 20:45 ` William Duclot
2016-06-06 20:55 ` Junio C Hamano
2016-06-03 12:32 ` William Duclot
2016-06-03 21:31 ` 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=xmqq1t4frxz6.fsf@gitster.mtv.corp.google.com \
--to=gitster@pobox.com \
--cc=antoine.queru@ensimag.grenoble-inp.fr \
--cc=francois.beutin@ensimag.grenoble-inp.fr \
--cc=git@vger.kernel.org \
--cc=j6t@kdbg.org \
--cc=matthieu.moy@grenoble-inp.fr \
--cc=simon.rabourg@ensimag.grenoble-inp.fr \
--cc=william.duclot@ensimag.grenoble-inp.fr \
/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).