Laverna / laverna

Laverna is a JavaScript note taking application with Markdown editor and encryption support. Consider it like open source alternative to Evernote.
https://laverna.cc/index.html
Mozilla Public License 2.0
9.19k stars 801 forks source link

Bug Report: uppercase tags #952

Open ghost opened 6 years ago

ghost commented 6 years ago

Tags created in markdown are automatically converted into lowercase, e.g. #Test, #test both reference to the same tag 'test'.

In Laverna -> Notebooks & Tags there is a button to manually create a new tag.

These tags are not converted to lowercase.

This way there can be the tags 'test' and 'Test'

For my understanding, only the lowercase version should exist since other variants can never be referenced by any note.

daed commented 6 years ago

I don't know how best to do this since there's no one to approve pull requests, but:

laverna\app\scripts\components\notebooks\form\tag\Controller.js:73:

            name: this.view.ui.name.val().trim().toLowerCase(),

Adding toLowerCase() fixes it.