From 755db33da5fca3420ac8e2ecbb89f4085802eba7 Mon Sep 17 00:00:00 2001 From: sett Date: Sun, 16 Apr 2023 21:28:00 +0200 Subject: [PATCH] fix(pdf): reorder registry headings This commit reorders the registry headings, specifically moving the citation heading to after the figures heading. This ensures that the TOF is generated in the correct order. The TODO comment for adding other registry headings was removed as it is no longer necessary. Also, this commit updates the version number in globals/version.go from 2.7.9 to 2.7.10. --- globals/version.go | 2 +- pdf/pdf.go | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/globals/version.go b/globals/version.go index 3e3142b..68843ca 100644 --- a/globals/version.go +++ b/globals/version.go @@ -1,3 +1,3 @@ package globals -const Version = "2.7.9" +const Version = "2.7.10" diff --git a/pdf/pdf.go b/pdf/pdf.go index 3a01241..621d04f 100644 --- a/pdf/pdf.go +++ b/pdf/pdf.go @@ -192,13 +192,12 @@ func FromAst(md ast.Node) *spec.PDF { headings = append(headings, h) } } - if globals.Cfg.Citation.Enabled { - headings = append(headings, register.Citation.Heading()) - } if globals.Cfg.Tof.Enabled { headings = append(headings, register.Figures.Heading()) } - //TODO add other registry headings + if globals.Cfg.Citation.Enabled { + headings = append(headings, register.Citation.Heading()) + } toc.GenerateChapterTree(headings) chapters := toc.GenerateChapterTree(headings) for i, c := range chapters.Roots() {