File tree 1 file changed +6
-1
lines changed
1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -58,6 +58,7 @@ class or function within a module or module in a package. If the
58
58
import importlib ._bootstrap
59
59
import importlib ._bootstrap_external
60
60
import importlib .machinery
61
+ import importlib .resources
61
62
import importlib .util
62
63
import inspect
63
64
import io
@@ -631,15 +632,19 @@ class HTMLDoc(Doc):
631
632
632
633
def page (self , title , contents ):
633
634
"""Format an HTML page."""
635
+ css_data = importlib .resources .files ('pydoc_data' ).joinpath ('_pydoc.css' ).read_text ()
634
636
return '''\
635
637
<!DOCTYPE html>
636
638
<html lang="en">
637
639
<head>
638
640
<meta charset="utf-8">
639
641
<title>Python: %s</title>
642
+ <style>
643
+ %s
644
+ </style>
640
645
</head><body>
641
646
%s
642
- </body></html>''' % (title , contents )
647
+ </body></html>''' % (title , css_data , contents )
643
648
644
649
def heading (self , title , extras = '' ):
645
650
"""Format a page heading."""
You can’t perform that action at this time.
0 commit comments