minify css in functions.py@get_style
This commit is contained in:
@ -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):
|
||||
|
||||
@ -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()])
|
||||
|
||||
Reference in New Issue
Block a user