Skip to content

Commit 14f9d1e

Browse files
committed
More fixes
1 parent 90c5a87 commit 14f9d1e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/tools/generate/generate_ebooks.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const update_links = (chapter, chapter_config) => {
1616
body = body.replace(/{{\s*figure_dropdown.*?}}/gsm,'');
1717
// For PDFs tables cannot be in figures
1818
body = body.replace(/<figure (id="[^"]*?")><div class="table-wrap"><div class="table-wrap-container"><table([^>]*?)>/gs,'<table $1$2>');
19-
body = body.replace(/<\/table><\/div><\/div>[\n ]*<figcaption>(.*?)<\/figcaption>([\n ]*)<\/figure>/gs,'</table><p class="table-caption">$1</p>');
19+
body = body.replace(/<\/table>[\n ]*<\/div>[\n ]*<\/div>[\n ]*<figcaption>(.*?)<\/figcaption>([\n ]*)<\/figure>/gs,'</table><p class="table-caption">$1</p>');
2020
// Replace current chapter header ids to full id (e.g. <h2 id="introduction"> -> <h2 id="javascript-introduction">)
2121
body = body.replace(/<h([0-6]) id="/g,'<h$1 id="' + chapter.metadata.chapter + '-');
2222
// Replace other chapter references with hash to anchor link (e.g. ./javascript#fig-1 -> #javascript-fig-1)

0 commit comments

Comments
 (0)