From 30024a46838a4f7a273172ae03d82090064b3fed Mon Sep 17 00:00:00 2001 From: calvin Date: Sat, 6 Nov 2004 12:43:48 +0000 Subject: [PATCH] optimize img_re regular expression git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@1919 e7d03fd6-7b0d-0410-9947-9c21f3af8025 --- ChangeLog | 9 +++++++++ linkcheck/linkname.py | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index cd094431..4d9dce72 100644 --- a/ChangeLog +++ b/ChangeLog @@ -46,6 +46,15 @@ Type: feature Changed: linkcheck/ansicolor.py + * Remember a tag in the link parser. Saves one HTML + parse. + Type: feature + Changed: linkcheck/checker/urlbase.py, linkcheck/linkparse.py + + * Optimize link name parsing of img alt tags. + Type: feature + Changed: linkcheck/linkname.py + 1.13.5 "Die Musterknaben" (released 22.9.2004) * Use xgettext with Python support for .pot file creation, adjusted developer documentation. diff --git a/linkcheck/linkname.py b/linkcheck/linkname.py index 800b6bad..f556198c 100644 --- a/linkcheck/linkname.py +++ b/linkcheck/linkname.py @@ -24,7 +24,7 @@ import linkcheck.strformat imgtag_re = re.compile(r"(?i)\s+alt\s*=\s*"+\ r"""(?P("[^"\n]*"|'[^'\n]*'|[^\s>]+))""") -img_re = re.compile(r"""(?i)<\s*img\s+("[^"\n]*"|'[^'\n]*'|[^>]+)+>""") +img_re = re.compile(r"""(?i)<\s*img\s+("[^"\n]*"|'[^'\n]*'|[^>])+>""") endtag_re = re.compile(r"""(?i)""") def _unquote (txt):