Skip to content

Keep node body content as markdown #147

Closed

Description

@mindsocket

Summary

Node content is currently assembled as plain text: parse-embedded.ts flattens each block with mdast-util-to-string, so headings, emphasis, code fences, links and list structure are lost. Keep content as the markdown source of the node's body instead.

Why

  • Rules can't check body structure, e.g. that a section heading or a fenced block exists. The bundled OKF schema's okf-computation-present rule can only test "any body", not a # Computation section.
  • Rendering a space (markdown.directory, or other formats) can't round-trip formatting.
  • Agents reading dump output lose structure.

Notes

  • This changes content for every space, and in every node format (page, embedded node, space on a page preamble), so it should be its own change.
  • Embedded nodes: decide what a sub-node's content holds, i.e. the markdown under its heading or list item, excluding nested embedded nodes.
  • Plugins that produce nodes from non-markdown sources should convert to markdown to match.
  • Once done, tighten okf-computation-present to look for a # Computation section.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions