comindware.ui
Version:
Comindware Core UI provides the basic components like editors, lists, dropdowns, popups that we so desperately need while creating Marionette-based single-page applications.
22 lines (18 loc) • 522 B
JavaScript
/**
* Developer: Stepan Burguchev
* Date: 9/1/2015
* Copyright: 2009-2016 Comindware®
* All Rights Reserved
* Published under the MIT license
*/
/* global module */
import { htmlHelpers } from '../index';
module.exports = function(text, fragment) {
if (!text) {
return '';
}
if (!fragment) {
return new Handlebars.SafeString(Handlebars.escapeExpression(text));
}
return new Handlebars.SafeString(htmlHelpers.highlightText(text, fragment, true));
};