| Defaults: 256 group levels, 128 MiB input, 128 MiB output; exceeding one is an error | Read from the code | superdocuments/src/rtf/model.rs:155-172; reader.rs:146-151, 401-404, 1013-1017 | Input size and depth are checked directly; output size is checked in emit and push_run_with_style. |
| A run's code page is font cpg, then font fcharset, then the document ansicpg | Read from the code | superdocuments/src/rtf/reader.rs:895-911 | code_page() resolves in that order and caches the result per font. |
| Unsupported code pages (for example 437 and 850) warn and fall back to cp1252 | Read from the code | superdocuments/src/rtf/reader.rs:880-893; charset.rs:58-87 | resolve_number() picks the message from is_known_unsupported() or reports an unknown page. |
| The Symbol font decodes only the bullet and the ASCII punctuation range | Read from the code | superdocuments/src/rtf/charset.rs:20, 49-53, 463 | Documented on the Kind::Symbol variant. Test symbol_font_bullet_and_unmapped at charset.rs:463, not run. |
| Headings come from outline level, the style name 'Heading N' or 'Title', or large bold text | Read from the code | superdocuments/src/rtf/reader.rs:1200-1224, 1255-1297 | heading_from_style_name() and large_bold_level() implement the three rules. |
| Only HYPERLINK fields keep their instruction; other fields keep their result text | Read from the code | superdocuments/src/rtf/reader.rs:448-456, 1319-1366 | parse_hyperlink() returns None for anything that is not HYPERLINK, so the field adds no link. |
| Markdown output escapes markup characters and writes a hard break for each newline | Read from the code | superdocuments/src/rtf/render.rs:378-397 | escape_markdown() escapes backslash, backtick, asterisk, underscore, brackets, angle brackets and pipe, and writes backslash-newline for newline. |
| Writer output is ASCII: cp1252 as \'hh, other BMP characters as \uN? with \uc1, and it reads back with the same structure for every fixture | Read from the code | superdocuments/src/rtf/writer.rs:1-5, 13-14, 230-264; superdocuments/src/rtf/tests.rs:513-525 (writer_output_is_ascii_and_reads_back_with_the_same_structure) | non_ascii() and cp1252_byte() implement the escapes; the preamble declares \uc1. The named test is not run and compares a subset of the structure. |
| markdown_to_rtf parses only the Markdown subset the renderer writes; other syntax stays literal | Read from the code | superdocuments/src/rtf/markdown_in.rs:1-4, 11-92 | The module comment lists the supported syntax; unsupported text becomes a paragraph. |
| The structured reader replaces the flat RTF converter in superdocuments, and the revision Webfold pins has it | Read from the code | superdocuments/src/document.rs and src/rtf/ at the revision Webfold pins (68c216f) | In superdocuments the rtf arm of convert_bytes is crate::rtf::convert. At 68c216f, the revision Webfold pins, the arm is present and src/rtf/ holds the reader, writer and Markdown renderer. Earlier revisions had a flat plain-text function instead. Checked on 2026-11-13. |
| Golden test: every fixture's Markdown equals its .expected.md | Covered by a test | superdocuments/src/rtf/tests.rs:99-111 (golden_markdown_for_every_fixture) | Named test; not run. The FIXTURES list covers all 23 .rtf files in tests/fixtures/rtf. |
| A Markdown sample with headings, emphasis, a link, lists and a table round-trips to the same Markdown | Covered by a test | superdocuments/src/rtf/tests.rs:553-560 (markdown_to_rtf_round_trips_through_markdown) | Named test; not run. One sample, compared as exact text. |
| Depth, input size and output limits are explicit errors; truncated, mutated and random inputs do not panic | Covered by a test | superdocuments/src/rtf/tests.rs:438-480, 840-880 (exceeding_a_limit_is_an_explicit_error, truncated_and_mutated_fixtures_never_panic_or_hang, random_bytes_never_panic) | Named tests; not run. |