From 9c03caca2c40870cf7f879d18e55db1c94877cd5 Mon Sep 17 00:00:00 2001 From: Ilya Kantor Date: Sat, 23 Sep 2017 10:53:47 +0300 Subject: userdiff: fix HTML hunk header regexp Current HTML header regexp doesn't match headers without attributes. So it fails to match

...

, while

...

matches. Make attributes optional to fix this. The regexp is still far from perfect, but now it at least handles the common case. Signed-off-by: Ilya Kantor Signed-off-by: Junio C Hamano --- userdiff.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/userdiff.c b/userdiff.c index 2125d6da26..4a0e5202e4 100644 --- a/userdiff.c +++ b/userdiff.c @@ -37,7 +37,7 @@ IPATTERN("fortran", "|//|\\*\\*|::|[/<>=]="), IPATTERN("fountain", "^((\\.[^.]|(int|ext|est|int\\.?/ext|i/e)[. ]).*)$", "[^ \t-]+"), -PATTERNS("html", "^[ \t]*(<[Hh][1-6][ \t].*>.*)$", +PATTERNS("html", "^[ \t]*(<[Hh][1-6]([ \t].*)?>.*)$", "[^<>= \t]+"), PATTERNS("java", "!^[ \t]*(catch|do|for|if|instanceof|new|return|switch|throw|while)\n" -- cgit v1.2.3