mirror of
https://github.com/redmine/redmine.git
synced 2026-02-06 14:50:11 +01:00
* Add TablesortScrubber to both CommonMark and Textile Formatters. It will now be determined on the server-side whether to use tablesort. * Migrate tablesort to Stimulus controller. * Update tablesort to v5.7.0. * Switch tablesort to ESM. Patch by Takashi Kato (user:tohosaku). git-svn-id: https://svn.redmine.org/redmine/trunk@24357 e93f8b46-1217-0410-a6f0-8f06a7374b81
7 lines
635 B
JavaScript
7 lines
635 B
JavaScript
/*!
|
||
* tablesort v5.7.0 (2026-01-03)
|
||
* http://tristen.ca/tablesort/demo/
|
||
* Copyright (c) 2026 ; Licensed MIT
|
||
*/
|
||
const r=function(n){return n.replace(/[^\-?0-9.]/g,"")},o=function(n,t){return n=parseFloat(n),t=parseFloat(t),n=isNaN(n)?0:n,t=isNaN(t)?0:t,n-t},e={name:"number",pattern:function(n){return n.match(/^[-+]?[£\x24Û¢´€]?\d+\s*([,\.]\d{0,2})/)||n.match(/^[-+]?\d+\s*([,\.]\d{0,2})?[£\x24Û¢´€]/)||n.match(/^[-+]?(\d)*-?([,\.]){0,1}-?(\d)+([E,e][\-+][\d]+)?%?$/)},sort:function(n,t){return n=r(n),t=r(t),o(t,n)}};typeof window.Tablesort<"u"&&Tablesort.extend(e.name,e.pattern,e.sort);var u=e;export{u as default};
|