Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
groupe-calcul
spip2pelican
Commits
0b9faa27
Commit
0b9faa27
authored
Jun 01, 2018
by
Matthieu Boileau
Browse files
Solve conversion issues
parent
dad9ddeb
Changes
1
Hide whitespace changes
Inline
Side-by-side
spip2pelican.py
View file @
0b9faa27
...
...
@@ -94,7 +94,7 @@ def html_img(s):
new_src
=
re
.
sub
(
r
"\ADocuments/.*"
,
src_replace
,
img_src
)
img
[
'src'
]
=
new_src
return
soup
.
prettify
(
)
return
soup
.
prettify
(
formatter
=
None
)
# formatter=None to avoid ">" -> ">" conversion
def
nullify_url
(
message
,
text
,
url
):
...
...
@@ -298,7 +298,7 @@ class Article:
if
self
.
skip_reason
:
print
(
" SKIPPING:"
,
self
.
skip_reason
)
else
:
self
.
title
=
spip_to_markdown
(
self
.
title
,
self
.
website
)
self
.
title
=
spip_to_markdown
(
self
.
title
,
self
.
website
)
.
strip
()
# strip to remove any CR at end of string
tags
=
[]
authors
=
AUTHORS
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment