diff options
Diffstat (limited to 'ftplugin')
| -rw-r--r-- | ftplugin/hackernews.py | 5 |
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 |
