mirror of
https://github.com/discourse/discourse.git
synced 2025-02-14 23:52:45 +08:00
12 lines
219 B
JavaScript
12 lines
219 B
JavaScript
export default function formatTextWithSelection(text, [start, len]) {
|
|
return [
|
|
'"',
|
|
text.substr(0, start),
|
|
"<",
|
|
text.substr(start, len),
|
|
">",
|
|
text.substr(start + len),
|
|
'"',
|
|
].join("");
|
|
}
|