>> (let* ((docdir (if (stringp docfile) (file-name-directory docfile))) >> - (regexp " \\(?:src\\)=\"\\([^#/.\"][^:\"#]+\\)\"")) >> + (regexp "<[[:alpha:]][^<>]*[ >> \t\n]src=\"\\([^#/.\"<>][^:\"#<>]*\\)\"")) > > This can cost O(N²) 🙁 > [ Admittedly, not on `master` any more, but `elpa.gnu.org` won't run > Emacs-32 for a few more years. ]
Actually, no, this is still O(N²) on `master` as well, still (the regexp search causes O(N) calls to `re_match` and *that* one is reduced to O(N)). === Stefan
