Merge pull request #32 from Vinluo/main

Add instructions about JSON newline escaping to avoid common mistakes
This commit is contained in:
Steph Ango
2026-01-27 07:36:18 -07:00
committed by GitHub
+14
View File
@@ -69,6 +69,20 @@ Text nodes contain Markdown content.
}
```
#### Newline Escaping (Common Pitfall)
In JSON, newline characters inside strings **must** be represented as `\n`. Do **not** use the literal sequence `\\n` in a `.canvas` file—Obsidian will render it as the characters `\` and `n` instead of a line break.
Examples:
```json
{ "type": "text", "text": "Line 1\nLine 2" }
```
```json
{ "type": "text", "text": "Line 1\\nLine 2" }
```
| Attribute | Required | Type | Description |
|-----------|----------|------|-------------|
| `text` | Yes | string | Plain text with Markdown syntax |