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

16 lines
252 B
JavaScript

Ember.Test.registerAsyncHelper("formatTextWithSelection", function(
app,
text,
[start, len]
) {
return [
'"',
text.substr(0, start),
"<",
text.substr(start, len),
">",
text.substr(start + len),
'"'
].join("");
});