Skip to content

Structural Safety

How FoldNotes protects your content

FoldNotes understands the structure of your document — headings own sections, lists have children, code blocks are atomic units. Some edits would break that structure and hide or orphan content. Rather than letting you lose work silently, FoldNotes either blocks the operation (with a brief explanation) or repairs the structure automatically.


Headings Cannot Be Indented

Markdown headings (#, ##, ###, etc.) must start at the beginning of a line. If a heading were indented with Tab, the # characters would no longer be at column zero — the heading would stop being a heading, lose its fold arrow, and any folded content beneath it could become inaccessible.

What happens: pressing Tab on a heading line plays a beep (macOS) or shows a brief "Headings cannot be indented" flash. The heading stays where it is.

This applies to all heading levels, whether or not the heading currently has folded children.


Folded Parents Cannot Be Indented

When a paragraph has folded (hidden) children, indenting the parent would change its nesting level without moving the hidden children. On unfold, the children would appear at the wrong depth — or worse, become orphaned from their parent entirely.

What happens: Tab is silently blocked on any paragraph whose children are currently folded. Unfold first, then indent.


Editing a Folded Heading Unfolds It

You can freely edit a heading's text while its children are folded — changing ## Draft to ## Final is fine. But if an edit removes the heading syntax (deleting the # characters, or inserting a space before them), the paragraph is no longer a heading. Its folded children would be orphaned — hidden content with no fold arrow to reveal it.

What happens: FoldNotes detects the structural change and automatically unfolds the children. Your hidden content reappears in the document, and you can continue editing without losing anything.


Code Block Isolation

Content inside a fenced code block (between ``` markers) is not processed as Markdown. This means:

  • Typing inside a code block inserts characters exactly as typed — no auto-formatting, no list continuation, no heading detection
  • Pasting inside a code block inserts plain text — no Markdown-to-rich-text conversion
  • # characters inside code blocks are not treated as headings or tags
  • Spell checking is disabled inside code blocks

This prevents code, configuration files, and preformatted text from being corrupted by Markdown processing.


Tables Are Protected Units

Table rows are grouped as a single structural unit. While editing inside a table:

  • Paste is blocked on macOS (use the table editor instead)
  • Fold arrows do not appear on individual table rows
  • Drag handles only appear on the header row — dragging moves the entire table

Task Identity Is Preserved

Each task in FoldNotes has an invisible unique identifier that persists across edits, fold/unfold, drag-and-drop, and even cut-and-paste within the same document. This identifier powers deep links, the inspector's task list, and future integrations.

To protect these identifiers, Writing Tools (macOS Sequoia) is limited to proofreading mode. The "Rewrite" feature replaces text wholesale, bypassing the incremental editing pipeline — this would destroy every task's identity in the rewritten section. Proofreading (which suggests individual corrections you accept one by one) preserves them.


Quick Reference

Scenario What FoldNotes does
Tab on a heading Blocks with beep/flash
Tab on a folded parent Blocks silently
Heading syntax removed while children folded Auto-unfolds children
Typing inside a code block Plain text, no Markdown processing
Pasting inside a code block Plain text insertion
Pasting inside a table (macOS) Blocked with beep
Dragging a table row Moves entire table
Writing Tools "Rewrite" Disabled (proofread only)

Tips

  • Unfold before restructuring — if you want to change a heading's level or indent its content, unfold it first. FoldNotes won't stop you from editing, but working with visible content is always safer.
  • Undo is always available — every structural operation (fold, unfold, drag, indent) is a single undo step. Press Cmd+Z to reverse it.