Skip to content

Commit 6b309f2

Browse files
committed
docs(pandoc): note indented fences are intentionally out of scope
CommonMark allows fences indented up to 3 spaces, but every fence this scanner sees comes from code cell source, which always starts at column 0.
1 parent 3dbbd72 commit 6b309f2

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/core/pandoc/pandoc-partition.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ export function partitionMarkdown(markdown: string): PartitionedMarkdown {
7272
};
7373
}
7474

75+
// CommonMark also allows fences indented up to 3 spaces; intentionally
76+
// unsupported here since the fences this scanner sees (code cell source)
77+
// always start at column 0.
7578
const kFenceOpenRegex = /^(`{3,}|~{3,})/;
7679

7780
export function markdownWithExtractedHeading(markdown: string) {

0 commit comments

Comments
 (0)