diff --git a/medium-parser/medium_parser/core.py b/medium-parser/medium_parser/core.py index 146e443..a6841b3 100644 --- a/medium-parser/medium_parser/core.py +++ b/medium-parser/medium_parser/core.py @@ -361,7 +361,7 @@ class MediumParser: out_paragraphs.append(header_template_rendered) elif paragraph["type"] == "IMG": image_template = jinja_env.from_string( - '
{{ paragraph.metadata.alt }}
' + '
{{ paragraph.metadata.alt }}
' ) image_caption_template = jinja_env.from_string( "
{{ text }}
" @@ -530,7 +530,7 @@ class MediumParser: elif paragraph["type"] == "MIXTAPE_EMBED": # TODO: redirect all Medium embeding articles to Fredium embed_template = jinja_env.from_string( - '

{{ embed_title }}

{{ embed_description }}

{{ embed_site }}

' + '

{{ embed_title }}

{{ embed_description }}

{{ embed_site }}

' ) if paragraph.get("mixtapeMetadata") is not None: url = paragraph["mixtapeMetadata"]["href"] diff --git a/medium-parser/tests/templates/post.html b/medium-parser/tests/templates/post.html index 0222447..13f948f 100644 --- a/medium-parser/tests/templates/post.html +++ b/medium-parser/tests/templates/post.html @@ -1,8 +1,8 @@ -
-
+
+
-

- < Go to the original +

+ < Go to the original

{% if previewImageId %} Preview image {% endif %} -

{{ title }}

- {% if subtitle %}

{{ subtitle }}

{% endif %} +

{{ title }}

+ {% if subtitle %}

{{ subtitle }}

{% endif %}
-
-
+
+
@@ -31,7 +33,7 @@ target="_blank" title="{{ creator.bio }}" class="block font-semibold text-gray-900">{{ creator.name }} -
{% for paragraph in content %}{{ paragraph }}{% endfor %}
- {% for tag in tags %}#{{ tag.normalizedTagSlug }}{% endfor %} + {% for tag in tags %}#{{ tag.normalizedTagSlug }}{% endfor %}
-
+