Ideally, should be able to separately format them from main content, per below, though that does add complexity.
#[derive(Debug, Deserialize, Serialize, Clone, JsonSchema, PartialEq)]
pub struct Affix {
pub content: AffixContent,
pub wrap: Option<WrapPunctuation>,
pub rendering: Option<Rendering>,
}
#[derive(Debug, Deserialize, Serialize, Clone, JsonSchema, PartialEq)]
/// A literal string or localized term to be added to the beginning or end of a rendered component.
pub enum AffixContent {
Literal(String),
Term(String),
}
A more limited alternative would just be to turn off formatting of the prefix or suffix.
I started to work on this, but think I'll defer.
Ideally, should be able to separately format them from main content, per below, though that does add complexity.
A more limited alternative would just be to turn off formatting of the prefix or suffix.