From 01b16cd9f8b5926ef2fdf8946a36e55931e6309c Mon Sep 17 00:00:00 2001
From: unkn0w7n <51942695+unkn0w7n@users.noreply.github.com>
Date: Sun, 10 Mar 2024 18:31:00 +0530
Subject: [PATCH] ...
fix html.
---
recipes/natgeo.recipe | 7 +++----
recipes/natgeohis.recipe | 7 +++----
recipes/natgeomag.recipe | 7 +++----
3 files changed, 9 insertions(+), 12 deletions(-)
diff --git a/recipes/natgeo.recipe b/recipes/natgeo.recipe
index a5f0a15cb4..3580693ad9 100644
--- a/recipes/natgeo.recipe
+++ b/recipes/natgeo.recipe
@@ -66,6 +66,7 @@ def parse_inline(inl):
yield '
{}{}
'.format(
imgs['caption']['text'], ' ' + imgs['caption']['credit']
)
+ yield ''
def parse_cont(content):
@@ -81,8 +82,7 @@ def parse_body(x):
if 'type' in x:
tag = x['type']
if tag == 'inline':
- for inl in parse_inline(x):
- yield inl
+ yield ''.join(parse_inline(x))
elif 'attrs' in x and 'href' in x.get('attrs', {}):
yield '<' + tag + ' href = "{}">'.format(x['attrs']['href'])
for yld in parse_cont(x):
@@ -124,8 +124,7 @@ def parse_article(edg):
yield inl
elif isinstance(item, list):
for line in item:
- for p in parse_body(line):
- yield p
+ yield ''.join(parse_body(line))
def article_parse(data):
diff --git a/recipes/natgeohis.recipe b/recipes/natgeohis.recipe
index b005e9e339..89a2b59ea0 100644
--- a/recipes/natgeohis.recipe
+++ b/recipes/natgeohis.recipe
@@ -65,6 +65,7 @@ def parse_inline(inl):
yield '{}{}
'.format(
imgs['caption']['text'], ' ' + imgs['caption']['credit']
)
+ yield ''
def parse_cont(content):
@@ -80,8 +81,7 @@ def parse_body(x):
if 'type' in x:
tag = x['type']
if tag == 'inline':
- for inl in parse_inline(x):
- yield inl
+ yield ''.join(parse_inline(x))
elif 'attrs' in x and 'href' in x.get('attrs', {}):
yield '<' + tag + ' href = "{}">'.format(x['attrs']['href'])
for yld in parse_cont(x):
@@ -123,8 +123,7 @@ def parse_article(edg):
yield inl
elif isinstance(item, list):
for line in item:
- for p in parse_body(line):
- yield p
+ yield ''.join(parse_body(line))
def article_parse(data):
diff --git a/recipes/natgeomag.recipe b/recipes/natgeomag.recipe
index 98d444ada7..537263eb65 100644
--- a/recipes/natgeomag.recipe
+++ b/recipes/natgeomag.recipe
@@ -70,6 +70,7 @@ def parse_inline(inl):
yield '{}{}
'.format(
imgs['caption']['text'], ' ' + imgs['caption']['credit']
)
+ yield ''
def parse_cont(content):
@@ -85,8 +86,7 @@ def parse_body(x):
if 'type' in x:
tag = x['type']
if tag == 'inline':
- for inl in parse_inline(x):
- yield inl
+ yield ''.join(parse_inline(x))
elif 'attrs' in x and 'href' in x.get('attrs', {}):
yield '<' + tag + ' href = "{}">'.format(x['attrs']['href'])
for yld in parse_cont(x):
@@ -128,8 +128,7 @@ def parse_article(edg):
yield inl
elif isinstance(item, list):
for line in item:
- for p in parse_body(line):
- yield p
+ yield ''.join(parse_body(line))
def article_parse(data):