From 7bdda5f5c7a17b7796004b23c9363d7ffa9bdd6a Mon Sep 17 00:00:00 2001 From: Mathieu PATUREL Date: Sat, 11 Feb 2017 09:10:03 +1100 Subject: [PATCH] minify css in functions.py@get_style --- MLPApi.py | 2 -- functions.py | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/MLPApi.py b/MLPApi.py index 22ca211..970212f 100644 --- a/MLPApi.py +++ b/MLPApi.py @@ -68,8 +68,6 @@ def markdown2html(md, basepath, color_scheme): # BeautifulSoup uses the
but the sublime phantoms do not support them... html = html.replace('
', '
').replace('
', '
') - sublime.set_clipboard(html) # print('hello') - return html def show_html(md_view, preview): diff --git a/functions.py b/functions.py index 2945f19..97e4308 100644 --- a/functions.py +++ b/functions.py @@ -124,10 +124,10 @@ def pre_with_br(html): def get_style(color_scheme): - css = ''.join([line.strip() + ' ' for line in DEFAULT_STYLE.splitlines()]) + css = DEFAULT_STYLE if os.path.exists(USER_STYLE_FILE): with open(USER_STYLE_FILE) as fp: css += '\n' + fp.read() + '\n' if color_scheme: css += pygments_from_theme(color_scheme) - return css + return ''.join([line.strip() + ' ' for line in css.splitlines()])