diff --git a/SublimeHighlight.py b/SublimeHighlight.py index cb0219a..e56e7c8 100644 --- a/SublimeHighlight.py +++ b/SublimeHighlight.py @@ -13,14 +13,15 @@ import sublime_plugin import subprocess import tempfile -if desktop.get_desktop() == 'Windows': - import winclip from pygments import highlight from pygments.lexers import * from pygments.formatters import * from pygments.styles import STYLE_MAP +if desktop.get_desktop() == 'Windows': + import winclip + # Don't judge me. Just don't. If you knew, you wouldn't. __lexers = ['_asybuiltins', '_clbuiltins', '_lassobuiltins', '_luabuiltins', '_mapping', '_openedgebuiltins', '_phpbuiltins', '_postgres_builtins', @@ -32,6 +33,7 @@ DEFAULT_STYLE = "default" FORMATS = ('html', 'rtf',) +WIN_CR_RE = re.compile(r"\r(?!\n)|(?