userdiff: fix HTML hunk header regexp
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>
This commit is contained in:
parent
3d9c5b5c44
commit
9c03caca2c
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user