brianreavis / sifter.js

A library for textually searching arrays and hashes of objects by property (or multiple properties). Designed specifically for autocomplete.
1.1k stars 125 forks source link

Added the Danish letter Æ to a #1

Closed flamber closed 11 years ago

flamber commented 11 years ago

Other Danish letters are Ø and Å, which is already there.

brianreavis commented 11 years ago

Æ and æ should probably be transliterated to "ae" instead of "a". That way, something like "traer" is equivalent to "trær". Along the lines of this:

'ae': '(?:[Ææ]|ae)',

The problem with this rule, though, is that it conflicts with the rules for "a" and "e". But that's not something a small refactor couldn't fix.

flamber commented 11 years ago

Okay, but when translating Danish chars, the official way is: æ = ae, ø = oe, å = aa. So I don't see a reason not to include æ, when ø and å is included as single char.