mirror of
https://github.com/Mottie/tablesorter.git
synced 2025-01-12 15:24:21 +00:00
cleaned up replaceAccents function
This commit is contained in:
parent
ff71c529d0
commit
8659d91074
BIN
README.markdown
BIN
README.markdown
Binary file not shown.
@ -1,5 +1,5 @@
|
|||||||
/*!
|
/*!
|
||||||
* TableSorter 2.3.6 - Client-side table sorting with ease!
|
* TableSorter 2.3.7 - Client-side table sorting with ease!
|
||||||
* @requires jQuery v1.2.6+
|
* @requires jQuery v1.2.6+
|
||||||
*
|
*
|
||||||
* Copyright (c) 2007 Christian Bach
|
* Copyright (c) 2007 Christian Bach
|
||||||
@ -18,7 +18,7 @@
|
|||||||
$.extend({
|
$.extend({
|
||||||
tablesorter: new function() {
|
tablesorter: new function() {
|
||||||
|
|
||||||
this.version = "2.3.6";
|
this.version = "2.3.7";
|
||||||
|
|
||||||
var parsers = [], widgets = [];
|
var parsers = [], widgets = [];
|
||||||
this.defaults = {
|
this.defaults = {
|
||||||
@ -914,20 +914,18 @@
|
|||||||
"U" : "\u00da\u00d9\u00db\u00dc" // ÚÙÛÜ
|
"U" : "\u00da\u00d9\u00db\u00dc" // ÚÙÛÜ
|
||||||
};
|
};
|
||||||
this.replaceAccents = function(s) {
|
this.replaceAccents = function(s) {
|
||||||
|
var a, acc = '[', eq = this.characterEquivalents;
|
||||||
if (!this.characterRegex) {
|
if (!this.characterRegex) {
|
||||||
var a, acc = '[',
|
|
||||||
reg = this.characterEquivalents;
|
|
||||||
this.characterRegexArray = {};
|
this.characterRegexArray = {};
|
||||||
for (a in reg) {
|
for (a in eq) {
|
||||||
if (typeof a === 'string') {
|
if (typeof a === 'string') {
|
||||||
acc += reg[a];
|
acc += eq[a];
|
||||||
this.characterRegexArray[a] = new RegExp('[' + reg[a] + ']', 'g');
|
this.characterRegexArray[a] = new RegExp('[' + eq[a] + ']', 'g');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.characterRegex = new RegExp(acc + ']');
|
this.characterRegex = new RegExp(acc + ']');
|
||||||
}
|
}
|
||||||
if (this.characterRegex.test(s)) {
|
if (this.characterRegex.test(s)) {
|
||||||
var a, eq = this.characterEquivalents;
|
|
||||||
for (a in eq) {
|
for (a in eq) {
|
||||||
if (typeof a === 'string') {
|
if (typeof a === 'string') {
|
||||||
s = s.replace( this.characterRegexArray[a], a );
|
s = s.replace( this.characterRegexArray[a], a );
|
||||||
|
4
js/jquery.tablesorter.min.js
vendored
4
js/jquery.tablesorter.min.js
vendored
File diff suppressed because one or more lines are too long
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "tablesorter",
|
"name": "tablesorter",
|
||||||
"version": "2.3.6",
|
"version": "2.3.7",
|
||||||
"title": "tablesorter",
|
"title": "tablesorter",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Christian Bach",
|
"name": "Christian Bach",
|
||||||
|
Loading…
Reference in New Issue
Block a user