mirror of
https://github.com/kotaindah55/extended-markdown-syntax.git
synced 2026-07-22 12:00:23 +00:00
6 lines
No EOL
226 B
TypeScript
6 lines
No EOL
226 B
TypeScript
/**
|
|
* Get text on a specific line, based on newline character (\n).
|
|
*/
|
|
export function getTextAtLine(text: string, lineStart: number, lineEnd: number) {
|
|
return text.split("\n").slice(lineStart, lineEnd + 1).join("\n");
|
|
} |