diff options
author | Ilya Kantor <iliakan@gmail.com> | 2017-09-23 10:53:47 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-09-24 10:13:28 +0900 |
commit | 9c03caca2c40870cf7f879d18e55db1c94877cd5 (patch) | |
tree | 499fd4763c3236f661101ed5c0c4c69278749f1e /userdiff.c | |
parent | 3d9c5b5c4461957fbbc0479e037990db04ebb740 (diff) | |
download | git-9c03caca2c40870cf7f879d18e55db1c94877cd5.tar.gz |
userdiff: fix HTML hunk header regexpik/userdiff-html-h-element-fix
Current HTML header regexp doesn't match headers without attributes.
So it fails to match <h1>...</h1>, while <h1 class="smth">...</h1> 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 <iliakan@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'userdiff.c')
-rw-r--r-- | userdiff.c | 2 |
1 files changed, 1 insertions, 1 deletions
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" |