Document that text.lang and text.region is case-insensitive

Resolves #6549
This commit is contained in:
Y.D.X. 2025-07-24 19:08:28 +08:00
parent b05721869c
commit 2bbee17978
No known key found for this signature in database
GPG Key ID: 4BEB459A2C828AEA

View File

@ -411,6 +411,9 @@ pub struct TextElem {
/// = Einleitung /// = Einleitung
/// In diesem Dokument, ... /// In diesem Dokument, ...
/// ``` /// ```
///
/// The language code is case-insensitive, and will be normalized to
/// lowercase before made available to the [context]($context).
#[default(Lang::ENGLISH)] #[default(Lang::ENGLISH)]
#[ghost] #[ghost]
pub lang: Lang, pub lang: Lang,
@ -418,6 +421,9 @@ pub struct TextElem {
/// An [ISO 3166-1 alpha-2 region code.](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) /// An [ISO 3166-1 alpha-2 region code.](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)
/// ///
/// This lets the text processing pipeline make more informed choices. /// This lets the text processing pipeline make more informed choices.
///
/// The region code is case-insensitive, and will be normalized to
/// uppercase before made available to the [context]($context).
#[ghost] #[ghost]
pub region: Option<Region>, pub region: Option<Region>,