rennat / pynliner

Python CSS-to-inline-styles conversion tool for HTML using BeautifulSoup and cssutils
http://pythonhosted.org/pynliner/
181 stars 93 forks source link

Just a small bugfix for when there is no context #12

Closed holm closed 11 years ago

holm commented 13 years ago

I am not really sure I did it the right way, but it fixed my issue.

The version bump was just for my own use for pip.

rennat commented 12 years ago

I don't see a problem with this other than the removal of the str call in __init__.py.

holm commented 12 years ago

The str call eats all the unicode characters, why is it needed?

rennat commented 11 years ago

Removing the str call results in a bug in beautiful soup which there is a test for:

======================================================================
FAIL: test_double_doctype (__main__.BeautifulSoupBugs)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "tests.py", line 204, in test_double_doctype
    self.assertNotIn("<!<!", output)
AssertionError: '<!<!' unexpectedly found in u'<!<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"\n"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">>'
rennat commented 11 years ago

After merging a separate (significant) change to the soupselect file, this pull request cannot be merged cleanly. Please pull the latest changes into your branch and resolve any issues then reopen this pull request.