()
| 517 | |
| 518 | |
| 519 | def test_export_html() -> None: |
| 520 | console = Console(record=True, width=100) |
| 521 | console.print("[b]foo <script> 'test' [link=https://example.org]Click[/link]") |
| 522 | html = console.export_html() |
| 523 | print(repr(html)) |
| 524 | 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}\nbody {\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' |
| 525 | assert html == expected |
| 526 | |
| 527 | |
| 528 | def test_export_html_inline() -> None: |
nothing calls this directly
no test coverage detected