@@ -529,7 +529,7 @@ def test_export_html():
529
529
console .print ("[b]foo <script> 'test' [link=https://example.org]Click[/link]" )
530
530
html = console .export_html ()
531
531
print (repr (html ))
532
- expected = '<!DOCTYPE html>\n <html>\n <head>\n <meta charset="UTF-8">\n <style>\n .r1 {font-weight: bold}\n .r2 {color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold}\n .r3 {color: #008000; text-decoration-color: #008000; font-weight: bold}\n body {\n color: #000000;\n background-color: #ffffff;\n }\n </style>\n </head>\n <body>\n <pre style="font-family:Menlo,\' DejaVu Sans Mono\' ,consolas,\' Courier New\' ,monospace"><code><span class="r1">foo <</span><span class="r2">script</span><span class="r1">> </span><span class="r3">'test'</span><span class="r1"> </span><a class="r1" href="https://example.org">Click</a>\n </code></pre>\n </body>\n </html>\n '
532
+ expected = '<!DOCTYPE html>\n <html>\n <head>\n <meta charset="UTF-8">\n <style>\n .r1 {font-weight: bold}\n .r2 {color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold}\n .r3 {color: #008000; text-decoration-color: #008000; font-weight: bold}\n body {\n color: #000000;\n background-color: #ffffff;\n }\n </style>\n </head>\n <body>\n <pre style="font-family:Menlo,\' DejaVu Sans Mono\' ,consolas,\' Courier New\' ,monospace"><code style="font-family:inherit" ><span class="r1">foo <</span><span class="r2">script</span><span class="r1">> </span><span class="r3">'test'</span><span class="r1"> </span><a class="r1" href="https://example.org">Click</a>\n </code></pre>\n </body>\n </html>\n '
533
533
assert html == expected
534
534
535
535
@@ -538,7 +538,7 @@ def test_export_html_inline():
538
538
console .print ("[b]foo [link=https://example.org]Click[/link]" )
539
539
html = console .export_html (inline_styles = True )
540
540
print (repr (html ))
541
- expected = '<!DOCTYPE html>\n <html>\n <head>\n <meta charset="UTF-8">\n <style>\n \n body {\n color: #000000;\n background-color: #ffffff;\n }\n </style>\n </head>\n <body>\n <pre style="font-family:Menlo,\' DejaVu Sans Mono\' ,consolas,\' Courier New\' ,monospace"><code><span style="font-weight: bold">foo </span><span style="font-weight: bold"><a href="https://example.org">Click</a></span>\n </code></pre>\n </body>\n </html>\n '
541
+ expected = '<!DOCTYPE html>\n <html>\n <head>\n <meta charset="UTF-8">\n <style>\n \n body {\n color: #000000;\n background-color: #ffffff;\n }\n </style>\n </head>\n <body>\n <pre style="font-family:Menlo,\' DejaVu Sans Mono\' ,consolas,\' Courier New\' ,monospace"><code style="font-family:inherit" ><span style="font-weight: bold">foo </span><span style="font-weight: bold"><a href="https://example.org">Click</a></span>\n </code></pre>\n </body>\n </html>\n '
542
542
assert html == expected
543
543
544
544
@@ -591,7 +591,7 @@ def test_save_text():
591
591
592
592
593
593
def test_save_html ():
594
- expected = " <!DOCTYPE html>\n <html>\n <head>\n <meta charset=\ " UTF-8\ " >\n <style>\n \n body {\n color: #000000;\n background-color: #ffffff;\n }\n </style>\n </head>\n <body>\n <pre style=\ " font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\ " ><code>foo\n </code></pre>\n </body>\n </html>\n "
594
+ expected = ' <!DOCTYPE html>\n <html>\n <head>\n <meta charset="UTF-8">\n <style>\n \n body {\n color: #000000;\n background-color: #ffffff;\n }\n </style>\n </head>\n <body>\n <pre style="font-family:Menlo,\ ' DejaVu Sans Mono\ ' ,consolas,\ ' Courier New\ ' ,monospace"><code style="font-family:inherit" >foo\n </code></pre>\n </body>\n </html>\n '
595
595
console = Console (record = True , width = 100 )
596
596
console .print ("foo" )
597
597
with tempfile .TemporaryDirectory () as path :
0 commit comments