Skip to content

Commit

Permalink
Merge fed2836 into 92d5348
Browse files Browse the repository at this point in the history
  • Loading branch information
kn1cht committed Jul 22, 2019
2 parents 92d5348 + fed2836 commit 0ac3fc2
Show file tree
Hide file tree
Showing 3 changed files with 392 additions and 263 deletions.
6 changes: 2 additions & 4 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,8 @@ function normalizeForDefaultSort(str) {
'お' : ['お', 'こ', 'そ', 'と', 'の', 'ほ', 'も', 'よ', 'ろ', 'を']
};

for(const key in defaultSortDictionary) {
/* istanbul ignore if */
if(!defaultSortDictionary.hasOwnProperty(key)) { continue; }
str = str.replace(new RegExp(key, 'g'), defaultSortDictionary[key]);
for (const [key, value] of Object.entries(defaultSortDictionary)) {
str = str.replace(new RegExp(key, 'g'), value);
}
str = str.replace(/.[\u30FC\u2010-\u2015\u2212\uFF70-]/g, (match) => {
const firstLetter = match.slice(0, 1);
Expand Down

0 comments on commit 0ac3fc2

Please sign in to comment.