Skip to main content

Hybrid Philosophy: Markers Preserved

The Fundamental Problem

Every markdown editor faces a fundamental tension: users want to see their formatting while still having access to the raw syntax.
The Hybrid Philosophy shows BOTH the markers AND the styling simultaneously.

Three Pillars of Hybrid Editing

Document Fidelity

The actual markdown syntax exists in the document. When you save, copy, or export, markers are preserved exactly as typed.

Visual Feedback

Users see formatting while editing. Styled appearance provides immediate feedback that syntax is correct.

Edit Transparency

Markers are accessible for modification. Delete them, select them, copy them - no hidden UI layers.

The Brick Extension Concept

This is the same architectural pattern applied to different domains.

How Hybrid Rendering Works

Typing Experience

Decorations appear only when the pattern is complete. This prevents false styling while providing instant feedback.

Why State Machine, Not Regex?

State machine eliminates ambiguity that regex cannot handle.

Two Decoration Types

Block Element Markers

Terminal to Document Connection

Content preserved: Terminal stores actual characters in grid cells. VariableMD stores actual markers in document text. Decoration separate: Terminal applies color via ANSI codes (separate from cell content). VariableMD applies styling via CSS classes (separate from marker characters). State machine parsing: Terminal uses VTE parser to interpret escape sequences. VariableMD uses state machine to interpret markdown syntax. Real-time updates: Terminal renders cells as they arrive. VariableMD renders decorations as the user types.

Why This Matters

Hybrid approach achieves faster editing, lower error rate, AND higher user satisfaction than either extreme.

Key Principles

“The Hybrid Philosophy preserves the markdown source while presenting the rendered result - the user never loses access to either.”
“Just as terminal cells are atomic units with decorations, markdown markers are atomic units with their own decoration layer.”
“Decorations appear only when the pattern is complete. This prevents false positives while providing instant feedback.”
“What you type is what gets stored. No hidden abstractions.”

“The Hybrid Philosophy preserves the markdown source while presenting the rendered result - the user never loses access to either.”