You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ponymail.apache.org by se...@apache.org on 2026/07/12 16:17:24 UTC
(incubator-ponymail-foal) branch master updated: This fixes #326
This is an automated email from the ASF dual-hosted git repository.
sebbASF pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-foal.git
The following commit(s) were added to refs/heads/master by this push:
new d6cdecd This fixes #326
d6cdecd is described below
commit d6cdecdf7e0eb995605d98574dadd13b70f4131e
Author: Sebb <se...@apache.org>
AuthorDate: Sun Jul 12 17:17:15 2026 +0100
This fixes #326
---
webui/js/source/base-js-extensions.js | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/webui/js/source/base-js-extensions.js b/webui/js/source/base-js-extensions.js
index 68b8c7f..85c9234 100644
--- a/webui/js/source/base-js-extensions.js
+++ b/webui/js/source/base-js-extensions.js
@@ -24,7 +24,8 @@ String.prototype.format = function() {
let args = arguments;
let n = 0;
let t = this;
- let rtn = this.replace(/(?!%)?%([-+]*)([0-9.]*)([a-zA-Z])/g, function(m, pm, len, fmt) {
+ let rtn = this.replace(/(?!%)?%([-+]?)([0-9.]*)([disu])/g, function(m, pm, len, fmt) {
+ // pm (plus/minus) is currently ignored
len = parseInt(len || '1');
// We need the correct number of args, balk otherwise, using ourselves to format the error!
if (args.length <= n) {
@@ -48,6 +49,11 @@ String.prototype.format = function() {
return varg;
}
});
+ if (args.length != n) {
+ let err = "Error interpolating string '%s': Expected %u argments, got %u!".format(t, n, args.length);
+ console.log(err);
+ throw err;
+ }
return rtn;
};