mirror of
https://github.com/embarklabs/neo-blessed.git
synced 2025-01-24 18:00:45 +00:00
fix some helper functions.
This commit is contained in:
parent
b962994201
commit
983b5a745a
@ -94,7 +94,7 @@ helpers.escape = function(text) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
helpers.parseTags = function(text) {
|
helpers.parseTags = function(text) {
|
||||||
return Element.prototype._parseTags.call(
|
return helpers.Element.prototype._parseTags.call(
|
||||||
{ parseTags: true, screen: Screen.global }, text);
|
{ parseTags: true, screen: Screen.global }, text);
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -128,7 +128,7 @@ helpers.generateTags = function(style, text) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
helpers.attrToBinary = function(style, element) {
|
helpers.attrToBinary = function(style, element) {
|
||||||
return Element.prototype.sattr.call(element || {}, style);
|
return helpers.Element.prototype.sattr.call(element || {}, style);
|
||||||
};
|
};
|
||||||
|
|
||||||
helpers.stripTags = function(text) {
|
helpers.stripTags = function(text) {
|
||||||
@ -149,3 +149,10 @@ helpers.dropUnicode = function(text) {
|
|||||||
.replace(unicode.chars.combining, '')
|
.replace(unicode.chars.combining, '')
|
||||||
.replace(unicode.chars.surrogate, '?');
|
.replace(unicode.chars.surrogate, '?');
|
||||||
};
|
};
|
||||||
|
|
||||||
|
helpers.__defineGetter__('Element', function() {
|
||||||
|
if (!helpers._element) {
|
||||||
|
helpers._element = require('./widgets/element');
|
||||||
|
}
|
||||||
|
return helpers._element;
|
||||||
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user