aboutsummaryrefslogtreecommitdiffstats
path: root/epy.py
diff options
context:
space:
mode:
authorbenadha <benawiadha@gmail.com>2019-10-24 13:09:40 +0700
committerbenadha <benawiadha@gmail.com>2019-10-24 13:09:40 +0700
commit046e5ea3ccbca1c8c0024ae56a408eac3d3208da (patch)
tree79d4d6e80f3a844fb0d7e4cddc6fbb4ae129941a /epy.py
parent2be838c5efd3049b9868bc7f252d4e1ab63af9fd (diff)
downloadepy-046e5ea3ccbca1c8c0024ae56a408eac3d3208da.tar.gz
textwrap.fill() --> textwrap.wrap()
Diffstat (limited to 'epy.py')
-rw-r--r--epy.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/epy.py b/epy.py
index 84e5b9a..96efaeb 100644
--- a/epy.py
+++ b/epy.py
@@ -305,15 +305,15 @@ class HTMLtoLines(HTMLParser):
text += [i.rjust(width//2 + len(i)//2)] + [""]
elif n in self.idinde:
text += [
- " "+j for j in textwrap.fill(i, width - 3).splitlines()
+ " "+j for j in textwrap.wrap(i, width - 3)
] + [""]
elif n in self.idbull:
- tmp = textwrap.fill(i, width - 3).splitlines()
+ tmp = textwrap.wrap(i, width - 3)
text += [
" - "+j if j == tmp[0] else " "+j for j in tmp
] + [""]
else:
- text += textwrap.fill(i, width).splitlines() + [""]
+ text += textwrap.wrap(i, width) + [""]
return text, self.imgs, sect
@@ -494,7 +494,7 @@ def meta(stdscr, ebook):
for i in ebook.get_meta():
data = re.sub("<[^>]*>", "", i[1])
data = re.sub("\t", "", data)
- mdata += textwrap.fill(i[0].upper() + ": " + data, wi - 6).splitlines()
+ mdata += textwrap.wrap(i[0].upper() + ": " + data, wi - 6)
src_lines = mdata
totlines = len(src_lines)