mirror of
https://github.com/typst/typst
synced 2025-07-01 01:32:52 +08:00
Fix typos (#3126)
This commit is contained in:
parent
d651c6e0e6
commit
4a65c2115b
@ -73,10 +73,10 @@ impl Route<'_> {
|
|||||||
/// The maximum stack nesting depth.
|
/// The maximum stack nesting depth.
|
||||||
pub const MAX_SHOW_RULE_DEPTH: usize = 64;
|
pub const MAX_SHOW_RULE_DEPTH: usize = 64;
|
||||||
|
|
||||||
/// The maxmium layout nesting depth.
|
/// The maximum layout nesting depth.
|
||||||
pub const MAX_LAYOUT_DEPTH: usize = 72;
|
pub const MAX_LAYOUT_DEPTH: usize = 72;
|
||||||
|
|
||||||
/// The maxmium function call nesting depth.
|
/// The maximum function call nesting depth.
|
||||||
pub const MAX_CALL_DEPTH: usize = 80;
|
pub const MAX_CALL_DEPTH: usize = 80;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -836,13 +836,13 @@ impl<'a> Generator<'a> {
|
|||||||
) -> Option<Vec<(Option<Content>, Content)>> {
|
) -> Option<Vec<(Option<Content>, Content)>> {
|
||||||
let rendered = rendered.bibliography.as_ref()?;
|
let rendered = rendered.bibliography.as_ref()?;
|
||||||
|
|
||||||
// Determine for each citation key where it first occured, so that we
|
// Determine for each citation key where it first occurred, so that we
|
||||||
// can link there.
|
// can link there.
|
||||||
let mut first_occurances = HashMap::new();
|
let mut first_occurrences = HashMap::new();
|
||||||
for info in &self.infos {
|
for info in &self.infos {
|
||||||
for subinfo in &info.subinfos {
|
for subinfo in &info.subinfos {
|
||||||
let key = subinfo.key.as_str();
|
let key = subinfo.key.as_str();
|
||||||
first_occurances.entry(key).or_insert(info.location);
|
first_occurrences.entry(key).or_insert(info.location);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -866,7 +866,7 @@ impl<'a> Generator<'a> {
|
|||||||
// Render the first field.
|
// Render the first field.
|
||||||
let mut prefix = item.first_field.as_ref().map(|elem| {
|
let mut prefix = item.first_field.as_ref().map(|elem| {
|
||||||
let mut content = renderer.display_elem_child(elem, &mut None);
|
let mut content = renderer.display_elem_child(elem, &mut None);
|
||||||
if let Some(location) = first_occurances.get(item.key.as_str()) {
|
if let Some(location) = first_occurrences.get(item.key.as_str()) {
|
||||||
let dest = Destination::Location(*location);
|
let dest = Destination::Location(*location);
|
||||||
content = content.linked(dest);
|
content = content.linked(dest);
|
||||||
}
|
}
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
@ -1,7 +1,7 @@
|
|||||||
// Test shorthands for unicode codepoints.
|
// Test shorthands for unicode codepoints.
|
||||||
|
|
||||||
---
|
---
|
||||||
The non-breaking space~does work, soft-?hypen also does.
|
The non-breaking space~does work, soft-?hyphen also does.
|
||||||
|
|
||||||
---
|
---
|
||||||
// Make sure non-breaking and normal space always
|
// Make sure non-breaking and normal space always
|
||||||
|
@ -54,7 +54,7 @@ $ A = mat(
|
|||||||
$ x_"1,2" = frac(-b +- sqrt(b^2 - 4 a c), 2 a) $
|
$ x_"1,2" = frac(-b +- sqrt(b^2 - 4 a c), 2 a) $
|
||||||
|
|
||||||
---
|
---
|
||||||
// Test miscelaneous
|
// Test miscellaneous
|
||||||
#show math.equation: set text(fill: gradient.linear(..color.map.rainbow))
|
#show math.equation: set text(fill: gradient.linear(..color.map.rainbow))
|
||||||
#show math.equation: box
|
#show math.equation: box
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user