* Post-processing of markdown files. */
| 485 | * Post-processing of markdown files. |
| 486 | */ |
| 487 | void TextfileWindow::AfterLoadMarkdown() |
| 488 | { |
| 489 | for (size_t line_index = 0; line_index < this->lines.size(); ++line_index) { |
| 490 | Line &line = this->lines[line_index]; |
| 491 | |
| 492 | /* Find and mark all hyperlinks in the line. */ |
| 493 | this->FindHyperlinksInMarkdown(line, line_index); |
| 494 | |
| 495 | /* All lines beginning with # are headings. */ |
| 496 | if (!line.text.empty() && line.text[0] == '#') { |
| 497 | this->jumplist.push_back(line_index); |
| 498 | this->lines[line_index].colour = TC_GOLD; |
| 499 | this->link_anchors.emplace_back(line_index, 0, 0, MakeAnchorSlug(line.text)); |
| 500 | } |
| 501 | } |
| 502 | } |
| 503 | |
| 504 | /* virtual */ void TextfileWindow::OnClick([[maybe_unused]] Point pt, WidgetID widget, [[maybe_unused]] int click_count) |
| 505 | { |
no test coverage detected