custom css feature @done

This commit is contained in:
math2001
2016-11-26 11:10:21 +11:00
parent 57f6989720
commit 4b1bc0d8bc
3 changed files with 26 additions and 2 deletions

View File

@ -27,7 +27,9 @@ def get_style():
"""Of course, this is temporal, there will be an option to customize the CSS"""
if os.path.exists(STYLE_FILE):
with open(STYLE_FILE) as fp:
return fp.read()
content = fp.read()
if content:
return content
return """
body {
@ -63,7 +65,7 @@ def get_style():
pre code {
padding-left: 0;
}
""".replace('\n', '').replace('\t', '')
"""
def pre_with_br(html):
"""Because the phantoms of sublime text does not support <pre> blocks