Indentation caused <pre> issues.
This commit is contained in:
		
							parent
							
								
									d678c1072c
								
							
						
					
					
						commit
						2d77af19b7
					
				| @ -35,9 +35,6 @@ def pandoc(filename): | ||||
|     proc = subprocess.run(['pandoc', filename], stdout=subprocess.PIPE) | ||||
|     return proc.stdout.decode('utf-8').strip() | ||||
| 
 | ||||
| def indent_block(t, block): | ||||
|     return '\n'.join(t + line for line in block.split('\n')) | ||||
| 
 | ||||
| def extract_markdown_title(filename): | ||||
|     with open(filename) as f: | ||||
|         for line in f: | ||||
| @ -49,7 +46,7 @@ def extract_markdown_title(filename): | ||||
| def markdown_to_html(input_file, output_dir): | ||||
|     title = extract_markdown_title(input_file) | ||||
|     title = html.escape(title) | ||||
|     content = indent_block(8 * ' ', pandoc(input_file)) | ||||
|     content = pandoc(input_file) | ||||
|     html_out = template_base.format(title=title, content=content) | ||||
|     output_file = os.path.join( | ||||
|         output_dir, | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user