Merge pull request #3114 from mart-e/import-markdown-wp

This commit is contained in:
Justin Mayer 2023-06-04 10:35:44 +02:00 committed by GitHub
commit 1b360acafa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 3 deletions

View file

@ -839,12 +839,15 @@ def fields2pelican(
if pandoc_version >= (1, 16) else '--no-wrap' if pandoc_version >= (1, 16) else '--no-wrap'
cmd = ('pandoc --normalize {0} --from=html' cmd = ('pandoc --normalize {0} --from=html'
' --to={1} {2} -o "{3}" "{4}"') ' --to={1} {2} -o "{3}" "{4}"')
cmd = cmd.format(parse_raw, out_markup, wrap_none, cmd = cmd.format(parse_raw,
out_markup if out_markup != 'markdown' else "gfm",
wrap_none,
out_filename, html_filename) out_filename, html_filename)
else: else:
from_arg = '-f html+raw_html' if not strip_raw else '-f html' from_arg = '-f html+raw_html' if not strip_raw else '-f html'
cmd = ('pandoc {0} --to={1}-smart --wrap=none -o "{2}" "{3}"') cmd = ('pandoc {0} --to={1}-smart --wrap=none -o "{2}" "{3}"')
cmd = cmd.format(from_arg, out_markup, cmd = cmd.format(from_arg,
out_markup if out_markup != 'markdown' else "gfm",
out_filename, html_filename) out_filename, html_filename)
try: try: