Version 1.0
A storage-efficient, backward-compatible evolution of Markdown especially for LLM consumption
- Introduction
- Design Principles
- Syntax Reference
- Parsing Rules
- Implementation Guide
- Migration Tools
- Examples
- FAQ
Quick Markdown (QMD) is a lightweight markup language that maintains Markdown's readability while significantly reducing storage requirements and token consumption.
Primarily, many Large Language Models (LLMs) consume Markdown files, and the traditional Markdown format consumes more tokens due to its multi-character syntax. To consume fewer tokens than Markdown, we introduce Quick Markdown (QMD), which achieves efficiency through single-character markers, intelligent whitespace handling, and context-aware parsing.
- Token Efficient: Reduces LLM token consumption
- Storage Efficient: Smaller file sizes (comparably)
- Backward Compatible: Accepts traditional Markdown syntax
- Fast Parsing: Simpler tokens enable faster processing
- Clean Syntax: More visually distinctive markers
- Universal Accessibility: All characters typeable on standard keyboards
- Single-Character Markers: Replace multi-character sequences with single characters to reduce token count
- Context-Aware Parsing: Derive meaning from position and indentation
- Progressive Enhancement: Support traditional syntax while generating optimized output
- Minimal Ambiguity: Each marker has one clear purpose
- LLM Optimization: Minimize token usage for AI model consumption
| Level | Traditional | QMD | Example |
|---|---|---|---|
| 1 | # |
! |
!Title |
| 2 | ## |
> |
>Chapter |
| 3 | ### |
- |
-Section |
| 4 | #### |
. |
.Subsection |
| 5 | ##### |
: |
:Minor |
| 6 | ###### |
; |
;Micro |
Note: Space after marker is optional in QMD
| Style | Traditional | QMD | Example |
|---|---|---|---|
| Bold | **text** |
*text* |
*important* |
| Italic | *text* |
/text/ |
/emphasis/ |
| Bold+Italic | ***text*** |
*/text/* |
*/critical/* |
| Strikethrough | ~~text~~ |
~text~ |
~deleted~ |
| Code | `code` |
`code` |
`var x = 1` |
Unordered Lists
- First item
- Second item
Continuation of second
- Third item
- Nested item
- Another nested
Even deeper
Ordered Lists
1. First item
2. Second item
Continuation
3. Third item
a. Nested
b. Items
Task Lists
+ Completed task
x Failed task
* In progress
. Pending task
Automatic Detection
https://example.com → auto-linked
user@example.com → auto-linked
Explicit Links
[text](url) → standard syntax maintained
[text][ref] → reference style
[ref]: https://long-url.com
Images
 → standard syntax maintained
Fenced Code
`language
code here
more code
`
Indented Code (4 spaces)
function example() {
return true;
}
Compact Format
Col1 | Col2 | Col3
-----+------+-----
A | B | C
D | E | F
Alignment
Left | Center | Right
:----|:------:|-----:
A | B | C
" Simple quote
" Continues here
" Nested quotes:
" Inner quote
" Deeper level
Any of these on a line by itself:
---
***
___
Inline math: $\alpha + \beta = \gamma$
Display math: $$\int_{0}^{\infty} e^{-x^2} dx = \frac{\sqrt{\pi}}{2}$$
@note{ This is a note }
@warning{ Important warning }
@tip{ Helpful tip }
-
First Character Rule: The first non-whitespace character determines line type
!>-.:;→ Heading+x*.→ List item (bullet, completed, failed, in progress, pending)"→ Blockquote`→ Code block start/end@→ Special block
-
Indentation Significance
- Preserves hierarchy in lists
- 4 spaces = code block
- 2 spaces = list continuation
-
Context Preservation
- URLs are auto-detected and linked
- Email addresses are auto-linked
- Smart quote conversion
- Explicit markers override auto-detection
- Traditional Markdown syntax is always valid
- QMD syntax is preferred for generation
Text Formatting vs. List Markers:
*at line start = task list item (in progress)*inline = bold formatting- Parser uses position context to determine meaning
Example:
* Working on this task
This is *bold text* in a paragraph
!Quick Markdown Guide
>Introduction
This document demonstrates /all/ QMD features with *efficient* syntax.
-Key Features
• Single-character headings
• Smart text formatting
Continuation without markers
• Automatic URL detection: https://example.com
• Optimized task lists with ASCII characters
.Task Management Example
+ Review documentation
x Fix broken tests (failed due to timeout)
* Implement new parser
. Schedule team meeting
:Implementation Details
`python
def parse_qmd(text):
lines = text.split('\n')
for line in lines:
process_line(line)
`
;Mathematical Support
The quadratic formula: $x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}$
" As stated in the specification:
" QMD reduces storage while maintaining readability
@note{ Remember: traditional Markdown syntax still works! }
Traditional Markdown (231 bytes):
## Shopping List
**Important** items to buy:
- Milk
- Bread
- Whole wheat
- Sourdough
- ~~Eggs~~ Already have
### Tasks
- [x] Buy groceries
- [ ] Call store
- [~] Check prices
### Notes
Check https://store.com for *deals*.QMD Version (217 bytes,approximately 6.1 % reduction):
>Shopping List
*Important* items to buy:
• Milk
• Bread
• Whole wheat
• Sourdough
• ~Eggs~ Already have
-Tasks
+ Buy groceries
. Call store
* Check prices
-Notes
Check https://store.com for /deals/.
For larger files, the compression ratio between QMD and MD should be significantly better
!Project Alpha Development
-Current Sprint Tasks
+ Implement user authentication
+ Set up database schema
* Working on API endpoints
* Debugging payment integration
x Failed deployment (config issues)
. Code review scheduled
. Write documentation
. Deploy to staging
-Next Sprint
. Plan feature roadmap
. Conduct user testing
. Performance optimization
Q: Is QMD compatible with existing Markdown parsers?
A: QMD parsers accept traditional Markdown. However, traditional parsers won't understand QMD-specific syntax.
Q: Can I mix traditional and QMD syntax?
A: Yes! QMD parsers handle both formats seamlessly.
Q: How does the parser distinguish between * for bold and * for task lists?
A: Context-aware parsing: * at line start = task item, * inline = bold formatting.
Q: What about Markdown extensions (tables, footnotes, etc.)?
A: QMD supports common extensions with optimized syntax where beneficial.
Q: How do I handle conflicts (e.g., / in URLs)?
A: QMD uses context-aware parsing. / only triggers italic formatting when surrounded by spaces or at word boundaries.
Q: Is there a standard file extension?
A: Use .qmd for pure QMD files, .md for mixed content.
Q: Why ASCII characters for task lists instead of Unicode symbols?
A: ASCII ensures universal keyboard accessibility, reduces storage by 75%, and eliminates encoding issues across different systems.
Q: How much token reduction can I expect when using QMD with LLMs?
A: Typically 20-30% reduction in token count compared to traditional Markdown, leading to lower API costs and faster processing.
| Character | Unicode | Purpose | Bytes (UTF-8) |
|---|---|---|---|
! |
U+0021 | Heading 1 | 1 |
> |
U+003E | Heading 2 | 1 |
- |
U+002D | Heading 3 | 1 |
. |
U+002E | Heading 4 | 1 |
: |
U+003A | Heading 5 | 1 |
; |
U+003B | Heading 6 | 1 |
| Character | Unicode | Purpose | Bytes (UTF-8) |
|---|---|---|---|
* |
U+002A | Bold | 1 |
/ |
U+002F | Italic | 1 |
~ |
U+007E | Strikethrough | 1 |
| Character | Unicode | Purpose | Bytes (UTF-8) | Accessibility |
|---|---|---|---|---|
+ |
U+002B | Completed | 1 | Universal |
x |
U+0078 | Failed | 1 | Universal |
* |
U+002A | In progress | 1 | Universal |
. |
U+002E | Pending | 1 | Universal |
| Character | Unicode | Purpose | Bytes (UTF-8) |
|---|---|---|---|
• |
U+2022 | Bullet | 3 |
" |
U+0022 | Blockquote | 1 |
v1.0
- Initial QMD specification
- Unicode task list characters
- Basic syntax definitions
QMD Specification v1.0 - Quick, Quality, Quantum-leap
