pub fn display_text(markdown: &str) -> StringExpand description
The text of a markdown fragment as the agenda shows it, with the inline markup taken off.
This is how a heading reaches Task::heading:
emphasis, strong text, links and strikethrough contribute their text, and
an inline code span contributes its literal. An editor holding the raw
line can therefore compare what the file says against what it was handed
— parse_heading_line says where the title starts, and this says what it
looks like once extracted.
let line = "# TODO **Отчёт** за июль";
let heading = parse_heading_line(line).expect("a heading");
assert_eq!(display_text(&line[heading.title_start..]), "Отчёт за июль");