Files
Luma-Parser/designdoc.md
T
2026-06-29 15:56:30 +02:00

117 lines
2.1 KiB
Markdown

# Goal
A markup language that makes writing unknown things fast and confident.
# Idea
An opinionated successor to Markdown that focuses on semantics instead of presentation.
The file describes meaning. The renderer decides how that meaning is displayed.
# Core Primitives
| Syntax | Dimension | Meaning |
| ------ | ---------- | ----------------------------------- |
| `#n` | Hierarchy | Level `n` in the document structure |
| `!n` | Importance | Importance level `n` |
| `>n` | Quote | Quote depth `n` |
| `@n` | Confidence | Confidence level `n` |
If no number is provided, `n = 1`.
Examples:
- `!` = `!1`
- `#` = `#1`
- `@` = `@1`
- `>` = `>1`
# Example
```text
#2 Computer Science
! I love PCs
@-2 They are going to replace humans one day
> Love is truth
#1 Science
```
Possible Markdown rendering:
```markdown
# Science
## Computer Science
==I love PCs==
~~They are going to replace humans one day~~
> Love is truth
```
This rendering is only an example. The original semantics are preserved regardless of how they are displayed.
# Combining Primitives
Primitives can be combined by placing them directly next to each other.
Example:
```text
@-2!>2 A slightly important statement I believe is wrong, quoted inside another quote.
```
Meaning:
- Confidence: -2
- Importance: 1
- Quote depth: 2
# Inline Scopes
Modifiers can be changed inline.
A modifier without a number is level 1.
A modifier followed by `-` pops one level from that modifier's stack.
Example:
```text
!2@3 important trusted but @- important !5 more important !- 2 important and !- normal
```
Interpretation:
1. Importance 2, Confidence 3
2. Pop Confidence
3. Push Importance 5
4. Pop back to Importance 2
5. Pop back to normal
# Design Principle
Do not describe how text should look.
Describe:
- how important it is
- how trustworthy it is
- where it belongs
- whether it is a quote
The renderer decides how those concepts are displayed.
## ===test=== **123**
#1 test
#2 test \2
@2 test
testt
-----