Update headings list to display plain text, and add option to insert at beginning
This commit is contained in:
@@ -49,6 +49,16 @@ export function removeTodoLine(content: string, lineNumber: number): string {
|
||||
return lines.join('\n');
|
||||
}
|
||||
|
||||
/**
|
||||
* Insert a todo line at the beginning of the content.
|
||||
*/
|
||||
export function insertTodoAtBeginning(content: string, todoLine: string): string {
|
||||
if (!content) {
|
||||
return todoLine;
|
||||
}
|
||||
return todoLine + '\n' + content;
|
||||
}
|
||||
|
||||
/**
|
||||
* Insert a todo line at the end of the content.
|
||||
* Handles files with/without trailing newlines.
|
||||
|
||||
Reference in New Issue
Block a user