* FSE quote format is now configurable and random if there are 2:n available

* Remove old 3rd party string-format & replace with string_format.js version
* Some fix some bugs with string_format.js padding, width, and number format
This commit is contained in:
Bryan Ashby 2016-09-04 21:36:26 -06:00
parent d4d64f925d
commit f7c21baa52
25 changed files with 128 additions and 144 deletions

View file

@ -8,6 +8,7 @@ const theme = require('../core/theme.js');
const resetScreen = require('../core/ansi_term.js').resetScreen;
const StatLog = require('../core/stat_log.js');
const renderStringLength = require('../core/string_util.js').renderStringLength;
const stringFormat = require('../core/string_format.js');
// deps
const async = require('async');
@ -158,8 +159,8 @@ exports.getModule = class RumorzModule extends MenuModule {
const listFormat = config.listFormat || '{rumor}';
const focusListFormat = config.focusListFormat || listFormat;
entriesView.setItems(entries.map( e => listFormat.format( { rumor : e.log_value } ) ) );
entriesView.setFocusItems(entries.map(e => focusListFormat.format( { rumor : e.log_value } ) ) );
entriesView.setItems(entries.map( e => stringFormat(listFormat, { rumor : e.log_value } ) ) );
entriesView.setFocusItems(entries.map(e => stringFormat(focusListFormat, { rumor : e.log_value } ) ) );
entriesView.redraw();
return callback(null);