View Single Post
Old 12-30-2012, 03:05 AM   #459
Sergey Dubinets
Junior Member
Sergey Dubinets began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Dec 2012
Device: Kindle
I am at v.0.58 I believe.

1. & 11. agree. Sorry for false alarm.
12.
srctext = re.sub(r"<a/>",r"", srctext)
srctext = re.sub(r"<a ?></a>",r"", srctext)

"<a />", "<a> </a>" would not be removed but are as empty as "<a ></a>".
It's not a perf bottle neck for sure, but you may consider matching both empty tags in single expression, like "(<a\s*/>)|(<a\s*>\s*</a>)".

I'll upgrade to 0.59 now.

Thanks.
Sergey Dubinets is offline   Reply With Quote