Skip to content

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
fix problem when new chapters are added, #1 (comment)
  • Loading branch information
ute committed Mar 25, 2024
1 parent 8c910c9 commit c1739b1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@
Emo_think.png
_renderinfo.json
quickanswers.tex
_renderinginfo

2 changes: 1 addition & 1 deletion _extensions/qquestion/_extension.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
title: qquestion
author: Ute Hahn
version: 0.4.0
version: 0.4.5
quarto-required: ">=1.4.0"
contributes:
filters:
Expand Down
5 changes: 4 additions & 1 deletion _extensions/qquestion/projectutils.lua
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ local function update_otherchapinfo(rinfo, newinfo)
local oldchap = rinfo.rendr
local newchap = newinfo.rendr
local OK = true
local nnew = #newchap
if rinfo.isbook then
--pout(newchap)
iexclude = rinfo.currentindex
Expand All @@ -139,7 +140,9 @@ local function update_otherchapinfo(rinfo, newinfo)
if OK then
-- pout("checking chap "..i)
-- pout("names: old "..v.file.." - new: "..newchap[i].file)
OK = v.file == newchap[i].file
if i > nnew then OK = false
else OK = v.file == newchap[i].file
end
end
end
if not OK then
Expand Down

0 comments on commit c1739b1

Please sign in to comment.