minify css in functions.py@get_style

This commit is contained in:
Mathieu PATUREL
2017-02-11 09:10:03 +11:00
parent 7257cb467e
commit 7bdda5f5c7
2 changed files with 2 additions and 4 deletions

View File

@ -68,8 +68,6 @@ def markdown2html(md, basepath, color_scheme):
# BeautifulSoup uses the <br/> but the sublime phantoms do not support them...
html = html.replace('<br/>', '<br />').replace('<hr/>', '<hr />')
sublime.set_clipboard(html) # print('hello')
return html
def show_html(md_view, preview):

View File

@ -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()])