Skip to content

Commit

Permalink
better comment about removing empty formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
domoritz committed Jul 1, 2016
1 parent e6d4f64 commit 263474b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/timeunit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ export function format(timeUnit: TimeUnit, abbreviated = false, field='datum.dat
}

if (out.length > 0) {
// clean up quarter formatting remainders
// clean up empty formatting expressions that may have been generated by the quarter time unit
const template = '{{' + field + ' | time:\'' + out.join(' ') + '\'}}';
return template.replace(new RegExp('{{' + field + ' \\| time:\'\'}}', 'g'), '');
} else {
Expand Down

0 comments on commit 263474b

Please sign in to comment.