Blocks or Markdown, the eternal question

Aspect Blocks Markdown
Data structure recursive nested string, but we’ll need blocks no matter what.
Pain implement every node supported by my markdown engine. Suck shit if it isn’t supported someone else’s problem this will never go wrong i swear™

i guess what i’m thinking is that i really don’t want to have to hook into the markdown internals (@abf09a82-1361-4e77-9852-39247278d9a7)

Currently we have this garbage:

$ ag '== "table"'
models/note_migrate.go
178:                    } else if m["type"] == "table" {
369:                    } else if m["type"] == "table" {
552:                    } else if m["type"] == "table" {

models/note.go
324:                    } else if m["type"] == "table" {

where new data structures have to be handled in 4 different places (grows linearly with migrations which is insane.)

@{git.commit.embed:f2391d06dab664432be247535edc8a584cf6d26c}

and I don’t want to be duplicating types for every single node so we really want the absolute minimal set of necessary nodes.

  • Markdown
  • 2 Column

Any nodes that can be just plain old markdown, must be. Is there any reason for them not to be plain ol’ markdown?

Here were the types from the readme i wanted support for.

Group Type Fine as Plain Ol’ Markdown?
markdown h1/2/3
markdown todo list (automatic subtasks) ?
markdown table
markdown bullet/numbered
markdown details/summary ✅ (html in md yea)
markdown blockquote
markdown code
markdown divider
markdown TeX ✅ going to be rendered by mathjax anyway
advanced url (link preview?) ?
advanced image (local) ?
advanced image (external)
advanced file (embedded) ?
db query table
db query kanban board
db query gallery ?
db query list ?
db query calendar ?
db query timeline ?
misc breadcrumbs ?
misc 2/3/4/5 columns ❌ no, this needs custom representation. don’t want to use HTML for this.
misc mermaid ✅ just use code blocks again and mermaid plugin
misc link to person/page/date ✅ currently working @3a319e6a
misc @ a day/time, and then have that show up in queries somehow???? ?

blocks or markdown

Version d2be1cc261fb
Updated
Author avatar Helena Doc № PNMR-2eERp0ng