Tk Library Source Code

View Ticket
Login
Ticket UUID: 823346
Title: Minor updates to htmlparse
Type: Patch Version: None
Submitter: mic42 Created on: 2003-10-14 10:42:55
Subsystem: htmlparse Assigned To: andreas_kupries
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2003-10-25 02:39:46
Resolution: Accepted Closed By: andreas_kupries
    Closed on: 2003-10-24 19:39:46
Description:
The attached patch contains some minor updates to
htmlparse, so that it uses string functions in some
places where regexp/regsub isn't needed and simplifies
some code.

Changes:
MapEscapes now uses string map where possible.
DoMap eliminated
parse now uses string last for detection of incomplete
html, instead of the 10x slower regexp...
CClass eliminated, and re rewritten with \s shorthands
in parse
 
Overall performance improvement is minor (1% vor 150k
using debugCallback), but MapEscapes should be faster
than before.
User Comments: andreas_kupries added on 2003-10-25 02:39:46:
Logged In: YES 
user_id=75003

Applied, slightly modified and committed to head. 
Modifications: Corrected indentation in some places. The tmp 
variable used to create the list for string map had no 'variable' 
declaration and was thus in the global namespace. 
Added 'variable tmp' to ensure existence in the package 
namespace. Modified the incomplete html handling code 
minimally, replacing an [expr] by [incr -1].

mic42 added on 2003-10-14 17:42:55:

File Added - 64305: htmlparse.tcl.diff

Attachments: