scragg0x / realms-wiki

Git based wiki inspired by Gollum
http://realms.io
GNU General Public License v2.0
833 stars 90 forks source link

Capital letters in file names cause file content not to be found #53

Closed theherk closed 9 years ago

theherk commented 9 years ago

Create and commit a file in the repository called Capital.md.

echo "### File with Capitalized Name" > Capital.md

The index finds the file and allows you to open it, but there is no content.

theherk commented 9 years ago

Actually, I found that the to_canonical function does s.lower(). I have updated this. Before issuing a PR I thought I'd ask what the purpose of lower casing the string is. If the file system differentiates, it seems this should do so, as well. The rest of to_canonical makes sense for urls (except maybe the conversion of double dashes). Why lower case?

scragg0x commented 9 years ago

I think I borrowed much of the to_canonical from Gollum. I think the idea of the lowercase is simply to prevent links like /Captial, /captial, /CaPiTaL having separate pages. I will merge a pull request