On 29/05/2008, bobbyzhu <[EMAIL PROTECTED]> wrote:
>
>  I have used html5lib in my project.  It runs great except a minor
>  possible error.
>  [...]
>  I think it is because the following code:
>
>         if (self._lastChunkEndsWithCR and data[0] == "\n"):
>             data = data[1:]
>         self._lastChunkEndsWithCR = data[-1] == "\r"
>
>  if the data only contains a single "\n" and self._lastChunkEndsWithCR
>  happens to be True, then data would be "" after the first two lines.
>  So data[-1] would then raise an exception.

That does look like a bug - should be fixed now in r1159. Thanks for the report!

-- 
Philip Taylor
[EMAIL PROTECTED]

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"html5lib-discuss" group.
 To post to this group, send email to [email protected]
 To unsubscribe from this group, send email to [EMAIL PROTECTED]
 For more options, visit this group at 
http://groups.google.com/group/html5lib-discuss?hl=en-GB
-~----------~----~----~----~------~----~------~--~---

Reply via email to