Remove trailing blank lines from description text.
(opt: Option)
| 84 | |
| 85 | |
| 86 | def strip_trailing_blanks(opt: Option) -> Option: |
| 87 | """Remove trailing blank lines from description text.""" |
| 88 | stripped = opt.text.rstrip("\n ") |
| 89 | if stripped == opt.text: |
| 90 | return opt |
| 91 | return opt.model_copy(update={"text": stripped}) |
| 92 | |
| 93 | |
| 94 | def _subset_has_cross_reference(subset: Option, extra_flags: frozenset[str]) -> bool: |