Skip to content

Commit 8389ba8

Browse files
committed
Fix templates breaking tables
1 parent c1cfab7 commit 8389ba8

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
- Fixed underscores appearing in the default page title when present in the URL.
99
- Fixed links not being automatically capitalised.
1010
- Fixed named references not working.
11+
- Fixed template calls inside table cells breaking the table.
1112
- Fixed headings not working when containing formatting.
1213
- Fixed all index numbers in the TOC being '1'.
1314

src/parse.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,7 @@ export function parse(data: string, config: Config = {}): Result {
351351

352352
// Tables: {|, |+, !, |-, |, |}
353353
.replace(/\{\|.+\|\}/gs, (tableInner) => {
354+
if (tableInner.includes('{{')) return tableInner;
354355
return tableInner
355356
// {| data (open table)
356357
.replace(re(r`^ \{\| (.*?) $`), (_, attrs) => `<table ${attrs}><tr>`)

0 commit comments

Comments
 (0)