void-packages/srcpkgs/terminal_markdown_viewer/patches/unichr.patch

23 lines
531 B
Diff

--- a/mdv/markdownviewer.py
+++ b/mdv/markdownviewer.py
@@ -129,6 +129,9 @@
import io
import os
import sys
+
+PY3 = True if sys.version_info[0] > 2 else False
+
import textwrap
is_app = 0
# code analysis for hilite:
@@ -158,6 +161,9 @@
from HTMLParser import HTMLParser
envget = os.environ.get
+if PY3:
+ unichr = chr
+
# ---------------------------------------------------------------------- Config
hr_sep, txt_block_cut, code_pref, list_pref, bquote_pref, hr_ends = \
'─', '✂', '| ', '- ', '|', '◈'