pub struct Repairs {
pub closed_emphasis: usize,
pub closed_fence: usize,
pub reverted_code_span: usize,
pub dropped_marker: usize,
pub escaped_char: usize,
pub tag_emphasis: usize,
pub stripped_html: usize,
pub rewritten_bullet: usize,
pub rewritten_table: usize,
pub converted_marker: usize,
}Expand description
Counts of what normalization repaired and what was changed to fit the channel. The first four
(repairs) measure how often the model breaks formatting; the last six (changes) measure
what a channel changes, before adopting it — to ask about each separately, use
Repairs::any and Repairs::changed.
Fields§
§closed_emphasis: usizeEmphasis left unclosed at the end of a block and closed for it (like **영향 범위).
closed_fence: usizeCode fences left unclosed at the end of the document and closed for it.
reverted_code_span: usizeUnmatched backtick runs turned back into text instead of code.
dropped_marker: usizeOrphaned ** dropped (preceded by text, like 꼬리**).
escaped_char: usizeCharacters escaped because the channel would read them as syntax (GitHub’s \~, \<,
\*).
tag_emphasis: usizeEmphasis emitted differently because the channel cannot read the markers in that position
(**「설정」**가) — <strong> on GitHub, U+2060 inserted inside the markers on Slack.
stripped_html: usizeSource HTML stripped — tags the channel cannot render, comments, and <br> turned into
line breaks.
rewritten_bullet: usizeList markers rewritten with a different symbol — bullets (* , • → - ; on Telegram
- → • ) and numbers (1) → 1.).
rewritten_table: usizeTables rewritten into a different shape from the source (delimiter row and cell padding normalized, or lowered to fixed width).
converted_marker: usizeEmphasis markers and links rewritten in a different notation — _기울임_ → *기울임*,
__굵게__ → **굵게**, <url|텍스트> → [텍스트](url). Counted only on channels that
emit Markdown.
Implementations§
Source§impl Repairs
impl Repairs
Sourcepub fn any(&self) -> bool
pub fn any(&self) -> bool
Whether normalization repaired anything — the first four (closed emphasis and fences,
reverted backticks, dropped markers). It asks whether the model broke formatting. Changes
made to fit the channel (escapes, bullets, tables …) are not counted — that is
Repairs::changed.