discourse/test/javascripts/helpers/d-editor-helper.js

16 lines
252 B
JavaScript
Raw Normal View History

2018-07-29 15:51:32 -05:00
Ember.Test.registerAsyncHelper("formatTextWithSelection", function(
app,
text,
[start, len]
) {
return [
'"',
text.substr(0, start),
"<",
text.substr(start, len),
">",
text.substr(start + len),
'"'
].join("");
});