Skip to content

Commit

Permalink
fix(pdf): reorder registry headings
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
dikkadev committed Apr 16, 2023
1 parent 2d60703 commit 755db33
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion globals/version.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package globals

const Version = "2.7.9"
const Version = "2.7.10"
7 changes: 3 additions & 4 deletions pdf/pdf.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit 755db33

Please sign in to comment.