From 2bfd616bc9b90e33ad3eee992a2d3f0e99fc92ec Mon Sep 17 00:00:00 2001 From: ryanss Date: Sun, 22 Feb 2015 10:37:44 -0500 Subject: Fix extra blank line above code blocks with +python3 --- ftplugin/hackernews.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ftplugin/hackernews.py b/ftplugin/hackernews.py index bdb2a48..9cb338b 100644 --- a/ftplugin/hackernews.py +++ b/ftplugin/hackernews.py @@ -45,7 +45,10 @@ def bwrite(s): s = s.encode('utf-8', errors='replace') # Code block markers for syntax highlighting - if s == unichr(160).encode('utf-8') and not b[-1]: + cb = unichr(160) + if isinstance(cb, unicode): + cb = cb.encode('utf-8') + if s == cb and not b[-1]: b[-1] = s return -- cgit v1.2.3