pub fn wrap_script_class(
lang: Option<&str>,
default: ScriptClass,
) -> ScriptClassExpand description
Resolve the script class to realize semantic wrap punctuation as.
Per-item script evidence only overrides the style-declared default when
that default is ScriptClass::Cjk — i.e. the style has opted in via
options.multilingual.realization-default: cjk. A style that has not
opted in (default is ScriptClass::Latin, which includes every
existing style today) realizes Latin wrap punctuation unconditionally,
regardless of the item’s language.
This gate exists because raw item language is not the same as the
item’s rendered script: a style can romanize a non-Latin source (e.g.
Chicago’s “romanized + original-script [translation]” mode for East Asian
references) so the citation displays as Latin-script prose even though
the reference’s language is zh/ja/ko. Without the gate, such an
item’s CJK language evidence would incorrectly force full-width wrap
punctuation onto an otherwise entirely Latin-script citation. See
docs/specs/PUNCTUATION_REALIZATION.md §5.