Skip to content

Commit

Permalink
Use a base URL for w3 server (fixes images)
Browse files Browse the repository at this point in the history
  • Loading branch information
liZe committed Jun 21, 2012
1 parent a10e691 commit 2ba6784
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion weasyprint/tests/w3_test_suite/web.py
Expand Up @@ -144,10 +144,11 @@ def run_test(chapter_num=None, section_num=None, test_index=None,
with open(filename, 'rb') as fd:
source = fd.read().decode('utf8')

html = HTML(string=source, base_url=filename)
pages = [
'data:image/png;base64,' + (
png_bytes.encode('base64').replace('\n', ''))
for _, _, png_bytes in HTML(string=source).get_png_pages(
for _, _, png_bytes in html.get_png_pages(
stylesheets=[default_stylesheet])]

formatter = HtmlFormatter(linenos='inline')
Expand Down

0 comments on commit 2ba6784

Please sign in to comment.