Skip to content

Commit 408ed73

Browse files
committed
markdown-toc.pl: the last "[Back to TOC]" link should always be in a separate line.
1 parent 0635855 commit 408ed73

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

markdown-toc.pl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,9 @@
120120

121121
print $out $src;
122122
if (++$i > 3 && $src !~ /Back to TOC/sm) {
123+
if ($src !~ /\n\n$/s) {
124+
print $out "\n";
125+
}
123126
print $out "[Back to TOC](#table-of-contents)\n\n";
124127
}
125128

0 commit comments

Comments
 (0)