summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorryanss2015-02-22 10:37:44 -0500
committerryanss2015-02-22 10:37:44 -0500
commit2bfd616bc9b90e33ad3eee992a2d3f0e99fc92ec (patch)
treec5417786df90d3610d275be3f1a604d5c033fbb0
parentb06f8a77ffac7a00d08584bb4f643401fa37d288 (diff)
downloadvim-hn-2bfd616bc9b90e33ad3eee992a2d3f0e99fc92ec.tar.gz
Fix extra blank line above code blocks with +python3
-rw-r--r--ftplugin/hackernews.py5
1 files changed, 4 insertions, 1 deletions
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