Skip to content

Commit 2bf81ce

Browse files
committed
fix: handle optional marker parameter in toc command
Fix TypeScript error by providing default empty string for optional marker parameter when converting to Required type.
1 parent b22494b commit 2bf81ce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/commands/toc.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ export async function generateToc(
113113
position: options.position ?? 'after-title',
114114
title: options.title ?? 'Table of Contents',
115115
headingLevel: options.headingLevel ?? 2,
116-
marker: options.marker,
116+
marker: options.marker ?? '',
117117
skipEmpty: options.skipEmpty ?? true,
118118
dryRun: options.dryRun ?? false,
119119
verbose: options.verbose ?? false,

0 commit comments

Comments
 (0)