From 65d6566b2ac5ca23c87179e24fa9bd4c14173ea4 Mon Sep 17 00:00:00 2001 From: Waylan Limberg Date: Thu, 29 Nov 2007 20:58:03 +0000 Subject: Added support for images inside links and updated tests. Fixes [1458136]. Note, to accomplish this, a negative lookbehind (for a !) was added to each link regex so they could be run before the image regex. The (fairly new) recursion on the link text then parses the image. Not sure how the negative lookbehind will affect performance. --- tests/misc/benchmark.dat.tmp | 72 +++++++++++++++++++++--------------------- tests/misc/image_in_links.html | 7 ++-- tests/misc/uche.html | 11 +++---- 3 files changed, 42 insertions(+), 48 deletions(-) (limited to 'tests/misc') diff --git a/tests/misc/benchmark.dat.tmp b/tests/misc/benchmark.dat.tmp index fabdd97..4fecb5c 100644 --- a/tests/misc/benchmark.dat.tmp +++ b/tests/misc/benchmark.dat.tmp @@ -1,54 +1,54 @@ -construction:0.000000:-24576.000000 +construction:0.000000:0.000000 adjacent-headers:0.010000:0.000000 -amp-in-url:0.000000:0.000000 -ampersand:0.010000:0.000000 -arabic:0.030000:0.000000 +amp-in-url:0.010000:0.000000 +ampersand:0.000000:0.000000 +arabic:0.040000:0.000000 attributes2:0.010000:0.000000 -bidi:0.090000:-57344.000000 +bidi:0.080000:0.000000 blank:0.000000:0.000000 -blank-block-quote:0.010000:0.000000 +blank-block-quote:0.000000:0.000000 blockquote-hr:0.020000:0.000000 -br:0.030000:0.000000 -bracket_re:1.580000:0.000000 -code-first-line:0.000000:0.000000 -comments:0.020000:0.000000 -div:0.030000:0.000000 -email:0.030000:0.000000 -funky-list:0.050000:0.000000 -h1:0.030000:0.000000 -hash:0.030000:0.000000 -headers:0.030000:0.000000 -hline:0.010000:0.000000 -html:0.040000:0.000000 +br:0.020000:0.000000 +bracket_re:1.230000:0.000000 +code-first-line:0.010000:0.000000 +comments:0.010000:0.000000 +div:0.010000:0.000000 +email:0.010000:0.000000 +funky-list:0.020000:0.000000 +h1:0.010000:0.000000 +hash:0.020000:0.000000 +headers:0.020000:0.000000 +hline:0.020000:0.000000 +html:0.030000:0.000000 image:0.010000:0.000000 -image-2:0.020000:0.000000 -image_in_links:0.010000:0.000000 -inside_html:0.010000:0.000000 +image-2:0.010000:0.000000 +image_in_links:0.020000:0.000000 +inside_html:0.020000:0.000000 japanese:0.050000:0.000000 -lazy-block-quote:0.010000:0.000000 -lists:0.040000:0.000000 +lazy-block-quote:0.020000:0.000000 +lists:0.050000:0.000000 lists2:0.020000:0.000000 -lists3:0.020000:0.000000 +lists3:0.010000:0.000000 lists4:0.020000:0.000000 -lists5:0.030000:0.000000 +lists5:0.010000:0.000000 markup-inside-p:0.020000:0.000000 mismatched-tags:0.020000:0.000000 -more_comments:0.020000:0.000000 +more_comments:0.010000:0.000000 multi-line-tags:0.030000:0.000000 multi-paragraph-block-quote:0.020000:0.000000 multi-test:0.050000:0.000000 -multiline-comments:0.030000:0.000000 +multiline-comments:0.020000:0.000000 normalize:0.020000:0.000000 -numeric-entity:0.020000:0.000000 +numeric-entity:0.030000:0.000000 php:0.030000:0.000000 pre:0.030000:0.000000 -russian:0.070000:0.000000 -some-test:0.080000:0.000000 -span:0.050000:0.000000 -stronintags:0.040000:0.000000 -tabs-in-lists:0.060000:0.000000 +russian:0.070000:-12288.000000 +some-test:0.090000:0.000000 +span:0.040000:0.000000 +stronintags:0.050000:0.000000 +tabs-in-lists:0.070000:0.000000 two-spaces:0.060000:0.000000 -uche:0.040000:0.000000 -underscores:0.050000:0.000000 +uche:0.050000:0.000000 +underscores:0.040000:0.000000 url_spaces:0.030000:0.000000 -utfbom:0.030000:0.000000 +utfbom:0.020000:0.000000 diff --git a/tests/misc/image_in_links.html b/tests/misc/image_in_links.html index fde1416..e2027b5 100644 --- a/tests/misc/image_in_links.html +++ b/tests/misc/image_in_links.html @@ -1,5 +1,2 @@ - -

[altname](path/to/image.png) -

- - +

altname +

\ No newline at end of file diff --git a/tests/misc/uche.html b/tests/misc/uche.html index e6c725b..f438f3d 100644 --- a/tests/misc/uche.html +++ b/tests/misc/uche.html @@ -1,10 +1,7 @@ -

asif

-

[](http://fourthought.com/) +

-

[text](http://link.com/) -

- - +

text +

\ No newline at end of file -- cgit v1.2.3