Skip to content

Commit

Permalink
use sticky -> global regex in fmtDate. close #139, close #141.
Browse files Browse the repository at this point in the history
  • Loading branch information
leeoniya committed Mar 3, 2020
1 parent e92e6ff commit c1e4168
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion dist/uPlot.cjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ var subs = {
function fmtDate(tpl) {
var parts = [];

var R = /\{([a-z]+)\}|[^{]+/yi, m;
var R = /\{([a-z]+)\}|[^{]+/gi, m;

while (m = R.exec(tpl))
{ parts.push(m[0][0] == '{' ? subs[m[1]] : m[0]); }
Expand Down
2 changes: 1 addition & 1 deletion dist/uPlot.iife.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ var uPlot = (function (exports) {
function fmtDate(tpl) {
var parts = [];

var R = /\{([a-z]+)\}|[^{]+/yi, m;
var R = /\{([a-z]+)\}|[^{]+/gi, m;

while (m = R.exec(tpl))
{ parts.push(m[0][0] == '{' ? subs[m[1]] : m[0]); }
Expand Down
Loading

0 comments on commit c1e4168

Please sign in to comment.