diff options
| author | pan93412 <pan93412@gmail.com> | 2023-04-26 17:30:03 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-04-26 11:30:03 +0200 |
| commit | a6df909a8d8018ef87b66b2128c6acfa9fb0599c (patch) | |
| tree | ec1717715dac6944543e13df8b54fef3a3eae038 /library/src/math | |
| parent | 1d42d6674c5bbeca2be1ca9a35dccd71b9346228 (diff) | |
Allow passing `region` to LocalName (#926)
Diffstat (limited to 'library/src/math')
| -rw-r--r-- | library/src/math/mod.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/library/src/math/mod.rs b/library/src/math/mod.rs index 63bfdbbe..47c28d17 100644 --- a/library/src/math/mod.rs +++ b/library/src/math/mod.rs @@ -277,7 +277,7 @@ impl Count for EquationElem { } impl LocalName for EquationElem { - fn local_name(&self, lang: Lang) -> &'static str { + fn local_name(&self, lang: Lang, _: Option<Region>) -> &'static str { match lang { Lang::ARABIC => "معادلة", Lang::BOKMÅL => "Ligning", @@ -305,10 +305,11 @@ impl Refable for EquationElem { vt: &mut Vt, supplement: Option<Content>, lang: Lang, + region: Option<Region>, ) -> SourceResult<Content> { // first we create the supplement of the heading let mut supplement = - supplement.unwrap_or_else(|| TextElem::packed(self.local_name(lang))); + supplement.unwrap_or_else(|| TextElem::packed(self.local_name(lang, region))); // we append a space if the supplement is not empty if !supplement.is_empty() { |
