1
0
mirror of https://github.com/DataTables/DataTables.git synced 2025-01-19 12:52:11 +01:00

Update media/src/core/core.info.js

Use greedy match regex for replacements

Otherwise, you could have:
"_START_ of _TOTAL_, showing _START_ to _END_"
replaced as:
"1 of 5, showing _START_ to 3"
This commit is contained in:
Tim Tucker 2012-09-03 13:52:30 -03:00
parent 59dc2aed9c
commit 3485f6530a

View File

@ -1,5 +1,4 @@
/** /**
* Generate the node required for the info display * Generate the node required for the info display
* @param {object} oSettings dataTables settings object * @param {object} oSettings dataTables settings object
@ -109,9 +108,9 @@ function _fnInfoMacros ( oSettings, str )
} }
return str. return str.
replace('_START_', sStart). replace(/_START_/g, sStart).
replace('_END_', sEnd). replace(/_END_/g, sEnd).
replace('_TOTAL_', sTotal). replace(/_TOTAL_/g, sTotal).
replace('_MAX_', sMax); replace(/_MAX_/g, sMax);
} }