We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 12859bd commit 896a542Copy full SHA for 896a542
1 file changed
web_src/js/markup/tasklist.ts
@@ -3,8 +3,10 @@ import {showErrorToast} from '../modules/toast.ts';
3
4
const preventListener = (e: Event) => e.preventDefault();
5
6
-/** Toggle a task list checkbox in markdown content at the given byte position.
7
- * Returns the updated content, or null if the position is invalid. */
+/**
+ * Toggle a task list checkbox in markdown content at the given byte position.
8
+ * Returns the updated content, or null if the position is invalid.
9
+ */
10
export function toggleTasklistCheckbox(content: string, position: number, checked: boolean): string | null {
11
const buffer = new TextEncoder().encode(content);
12
// Indexes may fall off the ends and return undefined.
0 commit comments