[ python-Bugs-736659 ] markupbase parse_declaration cannot recognize comments
SourceForge.net
noreply at sourceforge.net
Tue Aug 23 06:09:11 CEST 2005
Bugs item #736659, was opened at 2003-05-12 16:34
Message generated for change (Comment added) made by fdrake
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=736659&group_id=5470
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Library
Group: None
>Status: Closed
>Resolution: Wont Fix
Priority: 4
Submitted By: Jim Jewett (jimjjewett)
Assigned to: Fred L. Drake, Jr. (fdrake)
Summary: markupbase parse_declaration cannot recognize comments
Initial Comment:
In markupbase class parser method parse_declaration
It verfies that the first two characters are "<!"
Then it returns -1 if the next character is "-".
After that, it checks to see if the next two characters
are "--", but if they were, it would already have returned.
Solution: Check for comments before checking for a
short buffer.
if rawdata[j:j+1] == '--': #comment
# Locate --.*-- as the body of the comment
return self.parse_comment(i)
if rawdata[j:j+1] in ("-", ""):
# Start of comment followed by buffer
# boundary, or just a buffer boundary.
return -1
----------------------------------------------------------------------
>Comment By: Fred L. Drake, Jr. (fdrake)
Date: 2005-08-23 00:09
Message:
Logged In: YES
user_id=3066
Closed by docstring change in Lib/markupbase.py revisions
1.11, 1.10.4.1.
----------------------------------------------------------------------
Comment By: Fred L. Drake, Jr. (fdrake)
Date: 2004-09-09 01:18
Message:
Logged In: YES
user_id=3066
As noted in the related patch (#901369), this probably
shouldn't be considered a bug. Keeping this open pending
outcome of email discussion with OP.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=736659&group_id=5470
More information about the Python-bugs-list
mailing list