protect against / in page title (common in roam exports)
roam's namespace feature recommends the use of / in page titles, but since we are using a file-based approach here important to filter them out lest we end up with subfolder madness
This commit is contained in:
parent
e7c64d374c
commit
6e45be9b73
1 changed files with 7 additions and 1 deletions
|
@ -14,5 +14,11 @@
|
||||||
|
|
||||||
def canonical_wikilink(wikilink):
|
def canonical_wikilink(wikilink):
|
||||||
# hack hack
|
# hack hack
|
||||||
wikilink = wikilink.lower().replace(' ', '-').replace('\'', '').replace(',', '')
|
wikilink = (
|
||||||
|
wikilink.lower()
|
||||||
|
.replace(' ', '-')
|
||||||
|
.replace('\'', '')
|
||||||
|
.replace(',', '')
|
||||||
|
.replace('/', '-')
|
||||||
|
)
|
||||||
return wikilink
|
return wikilink
|
||||||
|
|
Loading…
Reference in a new issue