File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 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
5858import  importlib ._bootstrap 
5959import  importlib ._bootstrap_external 
6060import  importlib .machinery 
61+ import  importlib .resources 
6162import  importlib .util 
6263import  inspect 
6364import  io 
@@ -631,15 +632,19 @@ class HTMLDoc(Doc):
631632
632633    def  page (self , title , contents ):
633634        """Format an HTML page.""" 
635+         css_data  =  importlib .resources .files ('pydoc_data' ).joinpath ('_pydoc.css' ).read_text ()
634636        return  '''\  
635637 <!DOCTYPE html>
636638<html lang="en"> 
637639<head> 
638640<meta charset="utf-8"> 
639641<title>Python: %s</title> 
642+ <style> 
643+ %s 
644+ </style> 
640645</head><body> 
641646%s 
642- </body></html>'''  %  (title , contents )
647+ </body></html>'''  %  (title , css_data ,  contents )
643648
644649    def  heading (self , title , extras = '' ):
645650        """Format a page heading.""" 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments