From a6df909a8d8018ef87b66b2128c6acfa9fb0599c Mon Sep 17 00:00:00 2001 From: pan93412 Date: Wed, 26 Apr 2023 17:30:03 +0800 Subject: Allow passing `region` to LocalName (#926) --- library/src/math/mod.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'library/src/math') 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) -> &'static str { match lang { Lang::ARABIC => "معادلة", Lang::BOKMÅL => "Ligning", @@ -305,10 +305,11 @@ impl Refable for EquationElem { vt: &mut Vt, supplement: Option, lang: Lang, + region: Option, ) -> SourceResult { // 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() { -- cgit v1.2.3