mirror of https://github.com/python/cpython.git
[3.13] gh-131204: Fix `difflib.HtmlDiff` may not use monospaced font (GH-131221) (#131242)
(cherry picked from commit 7fd6160
)
This commit is contained in:
parent
a3ca70c527
commit
130fa4c94f
|
@ -1628,7 +1628,7 @@ def _line_pair_iterator():
|
|||
</html>"""
|
||||
|
||||
_styles = """
|
||||
table.diff {font-family:Courier; border:medium;}
|
||||
table.diff {font-family: Menlo, Consolas, Monaco, Liberation Mono, Lucida Console, monospace; border:medium}
|
||||
.diff_header {background-color:#e0e0e0}
|
||||
td.diff_header {text-align:right}
|
||||
.diff_next {background-color:#c0c0c0}
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
content="text/html; charset=utf-8" />
|
||||
<title></title>
|
||||
<style type="text/css">
|
||||
table.diff {font-family:Courier; border:medium;}
|
||||
table.diff {font-family: Menlo, Consolas, Monaco, Liberation Mono, Lucida Console, monospace; border:medium}
|
||||
.diff_header {background-color:#e0e0e0}
|
||||
td.diff_header {text-align:right}
|
||||
.diff_next {background-color:#c0c0c0}
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
Use monospace font from System Font Stack for cross-platform support in :class:`difflib.HtmlDiff`.
|
Loading…
Reference in New Issue