Skip to content

Commit

Permalink
Fix version + add version check to register-glossary
Browse files Browse the repository at this point in the history
  • Loading branch information
quachpas committed Aug 12, 2024
1 parent d50c95a commit 3a5f4cd
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions themes/default.typ
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
// # Panics
// If the key is not found, it will raise a `key_not_found` error
#let __get_entry_with_key(loc, key) = {
let entries = if sys.version <= version(0, 11, 0) {
let entries = if sys.version <= version(0, 11, 1) {
__glossary_entries.final()
} else {
__glossary_entries.at(loc)
Expand Down Expand Up @@ -799,6 +799,9 @@
// # Arguments
// entries (array<dictionary>): the list of entries
#let register-glossary(entry-list) = {
if sys.version <= version(0, 11, 1) {
return
}
// Normalize entry-list
let entries = __normalize_entry_list(entry-list)

Expand Down Expand Up @@ -851,7 +854,7 @@
panic("entry-list is required")
}
let entries = ()
if sys.version <= version(0, 11, 0) {
if sys.version <= version(0, 11, 1) {
// Normalize entry-list
entries = __normalize_entry_list(entry-list)

Expand All @@ -868,7 +871,7 @@
// Glossary
let body = []
body += context {
let el = if sys.version <= version(0, 11, 0) {
let el = if sys.version <= version(0, 11, 1) {
entries
} else if entry-list != none {
__glossary_entries.get().values().filter(x => x.key in entry-list.map(x => x.key))
Expand Down

0 comments on commit 3a5f4cd

Please sign in to comment.