Skip to content

Commit

Permalink
fixes umlaut letters bug
Browse files Browse the repository at this point in the history
  • Loading branch information
hbi99 committed Sep 16, 2020
1 parent 6741e38 commit 4131751
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
6 changes: 3 additions & 3 deletions dist/defiant.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* defiant.js [v2.2.6]
* defiant.js [v2.2.7]
* http://www.defiantjs.com
* Copyright (c) 2013-2019 Hakan Bilgin <[email protected]>
* Copyright (c) 2013-2020 Hakan Bilgin <[email protected]>
* License GNU AGPLv3
*/
(function(window, module) {
Expand Down Expand Up @@ -899,7 +899,7 @@
var str = this;
if (this.indexOf('translate(') === -1) {
str = this.replace(/contains\(([^,]+),([^\\)]+)\)/g, function(c,h,n) {
var a = 'abcdefghijklmnopqrstuvwxyz';
var a = 'abcdefghijklmnopqrstuvwxyzåäö';
return "contains(translate("+ h +", \""+ a.toUpperCase() +"\", \""+ a +"\"),"+ n.toLowerCase() +")";
});
}
Expand Down
6 changes: 3 additions & 3 deletions dist/defiant.min.js

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "defiant.js",
"version": "2.2.6",
"version": "2.2.7",
"description": "Search JSON structures plus smart templating with XSLT and XPath.",
"author": {
"name": "Hakan Bilgin",
Expand All @@ -10,6 +10,10 @@
"engines": {
"node": ">=7.10.1"
},
"scripts": {
"watch": "gulp watch",
"build": "gulp build"
},
"keywords": [
"search",
"javascript",
Expand Down
2 changes: 1 addition & 1 deletion src/defiant.js
Original file line number Diff line number Diff line change
Expand Up @@ -894,7 +894,7 @@
var str = this;
if (this.indexOf('translate(') === -1) {
str = this.replace(/contains\(([^,]+),([^\\)]+)\)/g, function(c,h,n) {
var a = 'abcdefghijklmnopqrstuvwxyz';
var a = 'abcdefghijklmnopqrstuvwxyzåäö';
return "contains(translate("+ h +", \""+ a.toUpperCase() +"\", \""+ a +"\"),"+ n.toLowerCase() +")";
});
}
Expand Down

0 comments on commit 4131751

Please sign in to comment.