During initialization of DocumentPage instances, a bug caused rmrl to always render the template of the notebook's last page. The bugfix is trivial since this was only a mix-up (max instead of min).
In such cases, len(template_names) would be less thanself.num. Access with max would then raise an IndexError.
For all other exports (where self.num is always less than len(template_names)), this line will always select the last entry within template_names.
During initialization of
DocumentPage
instances, a bug caused rmrl to always render the template of the notebook's last page. The bugfix is trivial since this was only a mix-up (max
instead ofmin
).For more context (if needed) - consider the inline documentation prior to the culprit line: https://github.com/rschroll/rmrl/blob/89b5cc38ef45251b96bd3d1c3618429b6b46db92/rmrl/document.py#L60-L64
In such cases,
len(template_names)
would be less thanself.num
. Access withmax
would then raise anIndexError
.For all other exports (where
self.num
is always less thanlen(template_names)
), this line will always select the last entry withintemplate_names
.