Files
discourse/test/javascripts/helpers/d-editor-helper.js.es6
Robin Ward 4fa580fbd1 Revert "Rename all test files from JS -> ES6"
This reverts commit 2abe85b8344de1102c1589a9ac9421a8b296f2b5.
2020-03-25 16:13:43 -04:00

12 lines
218 B
JavaScript

export default function formatTextWithSelection(text, [start, len]) {
return [
'"',
text.substr(0, start),
"<",
text.substr(start, len),
">",
text.substr(start + len),
'"'
].join("");
}