Commit 79215ee8 authored by Denis Salem's avatar Denis Salem
Browse files

Fixing benchmark, remove hardcoded css from codehighlight, update changelog

parent 7570f2be
......@@ -156,6 +156,7 @@
DONE | fix FAQ subfolders must not start with '/'
DONE | fix FAQ https://stackoverflow.com/questions/14547631/python-locale-error-unsupported-locale-setting.
DONE | Refactor DatesThread to ArchivesThread.
DONE | Fix Shabang issue for compatibility.
TODO | Force preview / full content in thread, for single entry.
TODO | Add definition in documentation for optional fields in blog configuration.
TODO | Open with navigator manual.
......
......@@ -56,13 +56,6 @@ class CodeHighlight:
code = argv[2]
result = pygments.highlight(code.replace("\:",":"), lexer, formatter).replace(".:",".:")
css = formatter.get_style_defs()
css += "\n."+name+"table {width: 100%; display: block;}"
css += "\n."+name+"table tr {width: 100%; display: block;}"
css += "\n."+name+"table tbody {width: 100%; display: block;}"
css += "\n."+name+"table .linenos {width: 4%; display: inline-block;vertical-align: top;}"
css += "\n."+name+"table .code {width: 95%; display: inline-block;vertical-align: top;}"
css += "\n."+name+"table td pre {vertical-align: top; overflow: hidden; overflow-x: scroll;}"
css += "\n."+name+" pre {overflow: hidden; overflow-x: scroll;}"
if not name+".css" in self._includes.keys():
self._includes[name+".css"] = css
......
......@@ -165,7 +165,12 @@ def gen_entries(markup_language, max_categories, max_id, hierarchical_categories
raise ValueError("Markup Language not supported")
def reset_folder(folder_path):
for f in os.listdir(folder_path):
try:
folder_content = os.listdir(folder_path)
except FileNotFoundError:
return
for f in folder_content:
file_path = folder_path+'/'+f
try:
if os.path.isfile(file_path):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment