UNPKG

markdown-table-prettify

Version:

Transforms markdown tables to be more readable.

23 lines (22 loc) 1.05 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ConfigSizeLimitChecker = void 0; var ConfigSizeLimitChecker = /** @class */ (function () { function ConfigSizeLimitChecker(_loggers, _maxTextLength) { this._loggers = _loggers; this._maxTextLength = _maxTextLength; } ConfigSizeLimitChecker.prototype.isWithinAllowedSizeLimit = function (text) { var whithinLimit = text.length <= this._maxTextLength; this.logWhenTooBig(whithinLimit); return whithinLimit; }; ConfigSizeLimitChecker.prototype.logWhenTooBig = function (whithinLimit) { var _this = this; if (!whithinLimit) { this._loggers.forEach(function (_) { return _.logInfo("Skipped markdown table prettifying due to text size limit. Configure this in the extension settings (current limit: " + _this._maxTextLength + " chars)."); }); } }; return ConfigSizeLimitChecker; }()); exports.ConfigSizeLimitChecker = ConfigSizeLimitChecker;