make abbreviations clickable
This commit is contained in:
@@ -18,10 +18,11 @@
|
|||||||
}
|
}
|
||||||
"(" + abbrs.pairs().map((v) => { v.at(0) + ":\"" + v.at(1) + "\"" }).join(",") + ")"
|
"(" + abbrs.pairs().map((v) => { v.at(0) + ":\"" + v.at(1) + "\"" }).join(",") + ")"
|
||||||
});
|
});
|
||||||
|
let target_label = label("abbr_" + abbreviation);
|
||||||
if type(text) != type(none) {
|
if type(text) != type(none) {
|
||||||
text + " (" + abbreviation + ")";
|
link(target_label, text + " (" + abbreviation + ")");
|
||||||
} else {
|
} else {
|
||||||
abbreviation;
|
link(target_label, abbreviation)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -400,7 +400,12 @@
|
|||||||
gutter: 1em,
|
gutter: 1em,
|
||||||
..abbrs.pairs().map((a) => {
|
..abbrs.pairs().map((a) => {
|
||||||
(
|
(
|
||||||
align(left, block(text(a.at(0), weight: "bold"), width: max_abbr_width + 1em)),
|
align(left, {
|
||||||
|
[
|
||||||
|
#block(text(a.at(0), weight: "bold"), width: max_abbr_width + 1em)
|
||||||
|
#label("abbr_" + a.at(0))
|
||||||
|
]
|
||||||
|
}),
|
||||||
text(a.at(1))
|
text(a.at(1))
|
||||||
)
|
)
|
||||||
}).flatten()
|
}).flatten()
|
||||||
|
Reference in New Issue
Block a user