fix path bugs
This commit is contained in:
parent
efbaf9e217
commit
e565a0a77a
|
@ -69,7 +69,7 @@ def extract_name(file_path):
|
|||
|
||||
|
||||
def remove_ext(path):
|
||||
return os.path.splitext(path)[0]
|
||||
return re.sub(r"\..*$", "", path)
|
||||
|
||||
|
||||
def clean_url(url):
|
||||
|
|
|
@ -77,7 +77,7 @@ def edit(name):
|
|||
# Page doesn't exist
|
||||
return redirect(url_for('wiki.create', name=cname))
|
||||
|
||||
name = remove_ext(page['name'])
|
||||
name = remove_ext(page['path'])
|
||||
g.assets['js'].append('editor.js')
|
||||
return render_template('wiki/edit.html',
|
||||
name=name,
|
||||
|
|
Loading…
Reference in a new issue