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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Mar 8, 2015 at 7:03 AM, Hiroyuki Sano <sh19910711@xxxxxxxxx> 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@xxxxxxxxx>
> ---
> 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]*\\([^;]*)$",
> --
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]