mirror of
https://github.com/storytold/photocraft.git
synced 2026-12-03 06:31:42 +01:00
Match rustfmt in German smart quote style detection
This commit is contained in:
1 parent
e5e05f40d0
commit
4277bc17c6
1 file changed
+1
-5
@@ -194,11 +194,7 @@ fn editor_rect(app: &mut PhotocraftApp, view: &craft::behavior::CanvasView, id:
|
||||
/// Use the language shown for the edit's caret or selection. Other languages keep the English marks.
|
||||
fn smart_quote_style(app: &PhotocraftApp) -> QuoteStyle {
|
||||
let german = super::styles_at(app).is_some_and(|(style, _)| {
|
||||
style
|
||||
.language
|
||||
.as_deref()
|
||||
.and_then(|tag| tag.split(['-', '_']).next())
|
||||
.is_some_and(|language| language.eq_ignore_ascii_case("de"))
|
||||
style.language.as_deref().and_then(|tag| tag.split(['-', '_']).next()).is_some_and(|language| language.eq_ignore_ascii_case("de"))
|
||||
});
|
||||
if german { QuoteStyle { apostrophe: QuoteStyle::GERMAN.single.1, ..QuoteStyle::GERMAN } } else { QuoteStyle::ENGLISH }
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user