-
Notifications
You must be signed in to change notification settings - Fork 6
Description
1. Current State
markdown-plus.nvim is currently architected around GitHub Flavored Markdown (GFM). The logic for parsing, formatting, and handling syntax is tightly coupled to GFM rules. While this serves a large portion of users, it creates significant limitations for those working in other ecosystems.
2. Problem Statement
As the plugin grows, we are encountering friction due to this single-flavor design:
- Missing Syntax: Users of Obsidian, Typora, and other tools cannot use extended syntax features (e.g.,
==highlight==,++underline++,[[WikiLinks]]). - Context Failures: Users of Quarto and LaTeX encounter bugs where the GFM-centric parser misinterprets valid syntax (e.g., pipes
|inside math blocks being treated as table separators). - Rigidity: There is no clean way to "switch modes" based on the project or file type.
3. Goal of this Research
The goal of this issue is to research and design a robust architecture that supports polymorphic markdown behavior. We aim to move from a "Hardcoded Logic" model to a "Capability-Based" model (likely an Adapter/Strategy pattern).
This is NOT an implementation plan yet. This issue serves as a central hub to:
- Identify all architectural challenges.
- Gather requirements for different flavors (Obsidian, Quarto, CommonMark, etc.).
- Discuss design patterns (Adapters, Registry, Context Detection).
- Formulate a roadmap for the eventual refactor.
We will use the comments below to document specific research areas, open questions, and design considerations.