Skip to content

Commit 7dcd5c5

Browse files
Fixed bug where we assumed a str
Bug from yesterday's commit.
1 parent 2a847e1 commit 7dcd5c5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

wiktextract/page.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2781,7 +2781,9 @@ def usex_template_fn(name, ht):
27812781
ruby = []
27822782
contents = item.children
27832783
if lang_code == "ja":
2784-
if contents and re.match(r"\s*$", contents[0]):
2784+
print(contents)
2785+
if (contents and isinstance(contents, str) and
2786+
re.match(r"\s*$", contents[0])):
27852787
contents = contents[1:]
27862788
exp = ctx.parse(ctx.node_to_wikitext(contents),
27872789
# post_template_fn=head_post_template_fn,

0 commit comments

Comments
 (0)