cu / silicon

Silicon Notes, a web-based personal knowledge base with few frills
Other
220 stars 7 forks source link

check for duplicate pages is slightly broken #7

Closed cu closed 1 year ago

cu commented 1 year ago

Silicon should refuse to add duplicate page names to the related pages field of each page. But it seems like this check is being executed before the page name is slugified. This check should be improved so that it checks after that step.

If foo_bar is an existing related page, it correctly (albiet silently) refuses to create a related page named exactly foo_bar. But it accepts variants like Foo_bar and Foo Bar and adds the (slugified) page to the related pages, which is just not right, man.

Interestingly, removing any of the duplicate page names removes them all.