Return a non-empty description string from a frontmatter dict. Checks ``description`` first, then the legacy ``brief`` key. Returns an empty string when neither key holds a non-blank string value.
(fm: dict)
| 690 | |
| 691 | |
| 692 | def _resolve_description(fm: dict) -> str: |
| 693 | """Return a non-empty description string from a frontmatter dict. |
| 694 | |
| 695 | Checks ``description`` first, then the legacy ``brief`` key. Returns |
| 696 | an empty string when neither key holds a non-blank string value. |
| 697 | """ |
| 698 | for key in ("description", "brief"): |
| 699 | v = fm.get(key) |
| 700 | if isinstance(v, str) and v.strip(): |
| 701 | return v.strip() |
| 702 | return "" |
| 703 | |
| 704 | |
| 705 | def _read_concept_briefs(wiki_dir: Path) -> str: |
no test coverage detected