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