equal
deleted
inserted
replaced
29 export_content = HTML_HEADER % content |
29 export_content = HTML_HEADER % content |
30 elif content_format == 'markdown' and format == 'markdown': |
30 elif content_format == 'markdown' and format == 'markdown': |
31 export_content = content |
31 export_content = content |
32 else: |
32 else: |
33 if use_pandoc : |
33 if use_pandoc : |
|
34 # markdown2pdf is buggy => convert to HTML and use abiword to export in PDF |
|
35 if format == 'pdf' and USE_ABI: |
|
36 html_content = pandoc_convert(content, content_format, 'html', full=True) |
|
37 from cm.converters.abi_converters import AbiFileConverter |
|
38 converter = AbiFileConverter() |
|
39 full_content = converter.add_html_header(html_content) |
|
40 fix_content = do_tidy(full_content) |
|
41 export_content = converter.convert_from_html(fix_content, format) |
|
42 else: |
34 export_content = pandoc_convert(content, content_format, format, full=True) |
43 export_content = pandoc_convert(content, content_format, format, full=True) |
35 else : |
44 else : |
36 fix_content = content |
45 fix_content = content |
37 if content_format == 'html': |
46 if content_format == 'html': |
38 if USE_ABI: |
47 if USE_ABI: |