ObsiViewer/Todo.md

3.7 KiB
Raw Blame History

Missing Features / Limitations

  • Heading varieties : No support for Setext headings (===/--- underlines), optional closing #, heading IDs with duplicate handling, nor preservation of a top-level h1 (current logic drops the first # heading unconditionally).

  • Paragraph semantics : Paragraph building treats every non-empty line as a <p> and inserts <br> between, breaking standard markdown rules about blank lines, lazy continuation lines, and container blocks (lists, blockquotes).

  • List handling : Regex conversion expects isolated list lines and wraps each <li> in its own <ul>/<ol>, so multi-line items, nested lists, tight/loose spacing, ordered list numbering, and bullet-marker variations (+, -, *) are all mis-rendered. Task list logic converts any single line but cannot coexist with proper list structure.

  • Blockquotes : Generic blockquote replacement only grabs one line after >, losing nested content, lazy continuations, and mixed blocks (e.g., lists inside blockquotes).

  • Emphasis rules : Simple replacements for */**/~~ ignore underscores, intraword emphasis rules, nesting, escaping, or edge cases like ***bold and italic***.

  • Inline code spans : Handles only single-line code sequences and does not honor backtick escapes, trim rules, or multiple backtick fences.

  • Links & images : Only processes inline destination syntax with absolute URLs. Missing relative path support, reference-style links ([ref][]), angle-bracket autolinks <https://>, image titles without URL, and no differentiation between external and internal links beyond scheme check.

  • Reference definitions : No parsing for link/image reference definitions at block level ([id]: URL "title"), so references cannot resolve.

  • Footnotes & definitions : Lacks footnote syntax ([^1]) and corresponding rendering.

  • Tables (GFM extensions) : Only pipe tables supported. Missing support for inline markdown within cells, row spans, or text alignment fallback when separators are malformed.

  • Code blocks : Indented code blocks (4 spaces) not detected; fenced blocks limited to triple backticks, no tilde fences (~~~), info string handling is case-sensitive, and language fallback doesnt respect GFM spec (e.g., unrecognized language should leave raw text).

  • HTML blocks/inlines : Raw HTML either stripped or double-escaped; theres no logic to allow HTML blocks or disallowed raw HTML rules from GFM.

  • Escaping : Backslash escapes for punctuation, entity references, and escaping special characters are unsupported;

    escapeHtml() only runs on select segments.

  • Hard/soft line breaks : Treats every newline as <br>, ignoring two-space hard break convention and soft break behavior.

  • Math/LaTeX : $$…$$ replaced with a static placeholder; inline math $…$, \( \) not handled.

  • Frontmatter : YAML frontmatter stripping not present; if notes contain --- blocks at top they flow into paragraph logic.

  • Metadata parsing : No support for Obsidian wiki-links [[Note]] (only attachments) or block references (^block-id), tags inside frontmatter, or embedded queries.

  • Performance/robustness : Repeated global regex replacements can introduce double-wrapping, miss overlapping patterns, and make escaping fragile. Lacking overall markdown parsing state leads to conflicts (e.g., #hashtag inside code blocks already removed via placeholder but inline code restoration may still break hashtags).

  • Internationalization : slugify() strips non-word characters, removing accents rather than transliterating; may produce empty IDs for non-Latin headings.