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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

12 lines
218 B
JavaScript
Raw Normal View History

export default function formatTextWithSelection(text, [start, len]) {
2018-07-29 16:51:32 -04:00
return [
'"',
text.substr(0, start),
"<",
text.substr(start, len),
">",
text.substr(start + len),
'"'
].join("");
}