Thread (2 messages) flat view 2 messages, 2 authors, 2016-06-15

Re: [PATCH] diff funcname_pattern: Allow HTML header tags without attributes

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:45:23

Johan Herland [off-list ref] writes:
After looking over this once more, I think the HTML regexp should be
changed as follows. This fixes a buglet that was part of my original
HTML pattern, and although this patch textually depends on Brandon's
work, it is conceptually independent of his refactorization.
...
-	{ "html", "^[ \t]*(<[Hh][1-6][ \t].*>.*)$", REG_EXTENDED },
+	{ "html", "^[ \t]*(<[Hh][1-6]([ \t].*)?>.*)$", REG_EXTENDED },
I do not think these two particularly would make much difference.  Why
isn't it simply...

	"<[Hh][1-6].*"

without even any capture or anchor?

It would falsely hit oddball cases like <h1foo> which is not <h1>, but
anybody who uses such a nonstandard thing deserves it, imnvho ;-).
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help