Skip to content

Commit

Permalink
fix: #11
Browse files Browse the repository at this point in the history
Signed-off-by: yihong0618 <[email protected]>
  • Loading branch information
yihong0618 committed Jan 2, 2024
1 parent 90557b8 commit cd67643
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions epubhv/yomituki.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,6 @@ def ruby_soup(self, soup):
if ele.strip():
for ele2 in self.ruby_navigablestring(ele):
new_i.append(ele2)
elif ele:
new_i.append(ele)
i.replace_with(new_i)
new_i.unwrap()
elif isinstance(i, Tag) and i.name not in ("ruby", "rt", "rp"):
Expand All @@ -188,7 +186,7 @@ def ruby_navigablestring(self, navigablestring):
for k, g in groupby(yomi, lambda x: type(x)):
if k is None:
continue
if k == str:
elif k == str:
yield "".join(g)
else:
yield self.ruby_wraps_bs4(g)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "epubhv"
version = "0.5.0"
version = "0.5.1"
description = "make your epub books vertical or horizontal."
authors = [{ name = "yihong0618", email = "[email protected]" }]

Expand Down

0 comments on commit cd67643

Please sign in to comment.