You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add nofix language tag to skip code blocks (#5)
Add support for `nofix` and `*-nofix` language tags to prevent boxfix
from processing code blocks. This is useful for documentation that
needs to show intentionally broken diagrams as examples.
- Skip code blocks with `nofix` or `*-nofix` (e.g., `text-nofix`)
- Add "before" example files showing broken LLM output
- Update README with vibecoded section and nofix documentation
- Add tests for the new behavior
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: README.md
+9-4Lines changed: 9 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
LLMs generate ASCII diagrams with broken borders. This fixes them.
4
4
5
-
```
5
+
```nofix
6
6
Before After
7
7
┌─────────────────────┐ ┌─────────────────────┐
8
8
│ Component A │ → │ Component A │
@@ -14,7 +14,7 @@ Before After
14
14
15
15
LLMs generate ASCII diagrams with misaligned right borders. The top and bottom boundary lines (`┌───┐`, `└───┘`) are usually correct because they're repetitive patterns. But content lines with variable text end up short:
16
16
17
-
```
17
+
```nofix
18
18
┌─────────────────────────┐
19
19
│ This line is too short│ ← Right border doesn't align
The key insight: **boundary lines are reliable, content lines aren't**.
104
104
105
-
```
105
+
```nofix
106
106
┌─────────────────────┐ ← Boundary: LLMs get this right (repetitive)
107
107
│ Content here │ ← Content: LLMs mess this up (variable)
108
108
│ More content │ ← Content: Same problem
@@ -138,7 +138,7 @@ The key insight: **boundary lines are reliable, content lines aren't**.
138
138
```
139
139
┌─────────────────┐
140
140
│ ┌─────────────┐ │
141
-
│ │ Inner │ │
141
+
│ │ Inner │ │
142
142
│ └─────────────┘ │
143
143
└─────────────────┘
144
144
```
@@ -149,6 +149,7 @@ The key insight: **boundary lines are reliable, content lines aren't**.
149
149
- Lines without border characters
150
150
- Already-aligned diagrams
151
151
- Non-diagram code blocks
152
+
- Code blocks with `nofix` or `*-nofix` language tag (e.g., ` ```nofix ` or ` ```text-nofix `)
152
153
153
154
## Programmatic API
154
155
@@ -339,6 +340,10 @@ If your diagram has content that overflows the boundaries, you'll need to either
339
340
340
341
Boundary expansion is planned for a future release.
341
342
343
+
## Vibecoded
344
+
345
+
This entire library was built with [Claude Code](https://claude.ai/code) and Claude Opus 4.5. Every line of code, test, and documentation was generated through AI-assisted development.
Copy file name to clipboardExpand all lines: examples/README.md
+16-20Lines changed: 16 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,14 +2,12 @@
2
2
3
3
This directory contains examples of properly aligned diagrams that demonstrate boxfix output.
4
4
5
-
> **Note:** This repository has a Claude Code hook that automatically runs boxfix on markdown files. This means any intentionally misaligned "Before" examples get auto-fixed. The examples below show what boxfix produces, and inline comparisons show what it fixes.
6
-
7
5
## What Gets Fixed
8
6
9
7
boxfix pads short content lines to match boundary widths. Here's what broken input looks like vs fixed output:
10
8
11
9
**Broken (what LLMs often generate):**
12
-
```
10
+
```nofix
13
11
┌──────────────┐ ← boundary is 16 chars wide
14
12
│ Short│ ← content line is only 8 chars (missing padding)
15
13
│ Also short│ ← another short line
@@ -28,13 +26,15 @@ The boundary lines (`┌───┐`, `└───┘`) are the reference widt
28
26
29
27
## Examples
30
28
31
-
| File | Description |
32
-
|------|-------------|
33
-
|[`simple-box.md`](./simple-box.md)| Single box with content lines |
34
-
|[`nested-boxes.md`](./nested-boxes.md)| Boxes within boxes |
35
-
|[`multiple-boxes.md`](./multiple-boxes.md)| Several boxes in one diagram |
0 commit comments