Skip to content
This repository was archived by the owner on Dec 2, 2024. It is now read-only.

Commit ad8bbcc

Browse files
committed
Calendars now work if they are in the root dir.
Also allowing single-quotes in config file. Closes #4.
1 parent 6490087 commit ad8bbcc

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

markupserve.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -73,18 +73,21 @@ def last_modified_string(file_path):
7373
os.path.getmtime(file_path)))
7474

7575
def file_path_to_server_path(path, root):
76+
if path is None:
77+
return '/view'
78+
7679
return os.path.join("/view", os.path.relpath(path, root))
7780

7881
def view_calendar(path, parent_path, root, config):
7982
files = os.listdir(path)
8083

8184
try:
82-
file_prefix = config.get("style", "file_prefix").strip('"')
85+
file_prefix = config.get("style", "file_prefix").strip('"').strip("'")
8386
except ConfigParser.Error:
8487
file_prefix = ""
8588

8689
try:
87-
file_suffix = config.get("style", "file_suffix").strip('"')
90+
file_suffix = config.get("style", "file_suffix").strip('"').strip("'")
8891
except ConfigParser.Error:
8992
file_suffix = ""
9093

0 commit comments

Comments
 (0)