@entro314labs/markdownfix 0.0.6 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.remarkrc.js +2 -0
- package/README.md +66 -32
- package/package.json +2 -2
package/.remarkrc.js
CHANGED
|
@@ -76,6 +76,8 @@ export default {
|
|
|
76
76
|
['remark-lint-final-newline', true],
|
|
77
77
|
['remark-lint-hard-break-spaces', true],
|
|
78
78
|
['remark-lint-no-empty-sections', true],
|
|
79
|
+
// Allow .md, .mdx, and .mdd file extensions
|
|
80
|
+
['remark-lint-file-extension', ['md', 'mdx', 'mdd']],
|
|
79
81
|
|
|
80
82
|
// Must be last - handles the output formatting
|
|
81
83
|
'remark-stringify'
|
package/README.md
CHANGED
|
@@ -71,22 +71,27 @@ markdownfix setup
|
|
|
71
71
|
## What Gets Formatted
|
|
72
72
|
|
|
73
73
|
### Lists
|
|
74
|
+
|
|
74
75
|
- **Unordered**: `-` (never `*` or `+`)
|
|
75
76
|
- **Ordered**: `1.` incremental (never `1)`)
|
|
76
77
|
|
|
77
78
|
### Emphasis
|
|
79
|
+
|
|
78
80
|
- **Italic**: `_text_` (underscore, not asterisk)
|
|
79
81
|
- **Bold**: `**text**` (double asterisk, not underscore)
|
|
80
82
|
|
|
81
83
|
### Headings
|
|
84
|
+
|
|
82
85
|
- **Style**: ATX (`# Title`), never setext (`===`)
|
|
83
86
|
- **Hierarchy**: Must progress sequentially (no skipping levels)
|
|
84
87
|
|
|
85
88
|
### Code Blocks
|
|
89
|
+
|
|
86
90
|
- Always fenced (` ``` `) with language identifiers
|
|
87
91
|
- Never indented code blocks
|
|
88
92
|
|
|
89
93
|
### Formatting
|
|
94
|
+
|
|
90
95
|
- **Line length**: 100 characters max with smart wrapping
|
|
91
96
|
- **Tables**: Padded cells with aligned pipes (auto-formatted)
|
|
92
97
|
- **Final newline**: All files must end with `\n`
|
|
@@ -94,11 +99,11 @@ markdownfix setup
|
|
|
94
99
|
|
|
95
100
|
## File Support
|
|
96
101
|
|
|
97
|
-
| Extension | Support
|
|
98
|
-
|
|
99
|
-
| `.md`
|
|
100
|
-
| `.mdx`
|
|
101
|
-
| `.mdd`
|
|
102
|
+
| Extension | Support | Features | Use Case |
|
|
103
|
+
| --------- | ----------- | --------------------------------------- | ------------------------------- |
|
|
104
|
+
| `.md` | ✅ Full | GFM, frontmatter, tables, task lists | Documentation, READMEs, blogs |
|
|
105
|
+
| `.mdx` | ✅ Full | Above + JSX components, imports/exports | React docs, interactive content |
|
|
106
|
+
| `.mdd` | ⚠️ Optional | Business documents (see below) | Invoices, proposals, contracts |
|
|
102
107
|
|
|
103
108
|
### MDD Support
|
|
104
109
|
|
|
@@ -106,7 +111,7 @@ This formatter can **optionally** format `.mdd` files if you install the [MDD pa
|
|
|
106
111
|
|
|
107
112
|
```bash
|
|
108
113
|
# Install MDD support
|
|
109
|
-
pnpm add mdd
|
|
114
|
+
pnpm add @entro314labs/mdd
|
|
110
115
|
|
|
111
116
|
# Now .mdd files will be formatted
|
|
112
117
|
pnpm run format
|
|
@@ -209,11 +214,13 @@ markdownfix/
|
|
|
209
214
|
### `.remarkrc.js`
|
|
210
215
|
|
|
211
216
|
Central configuration defining:
|
|
217
|
+
|
|
212
218
|
- All formatting rules
|
|
213
219
|
- Plugin chain order
|
|
214
220
|
- Lint rule settings
|
|
215
221
|
|
|
216
222
|
**Plugin order is critical:**
|
|
223
|
+
|
|
217
224
|
1. `remark-frontmatter` - Parse YAML/TOML
|
|
218
225
|
2. `remark-gfm` - GitHub Flavored Markdown
|
|
219
226
|
3. `remark-mdx` - MDX support (conditional)
|
|
@@ -223,6 +230,7 @@ Central configuration defining:
|
|
|
223
230
|
### `.remarkignore`
|
|
224
231
|
|
|
225
232
|
Files excluded from processing:
|
|
233
|
+
|
|
226
234
|
- `README.md`
|
|
227
235
|
- `CHANGELOG.md`
|
|
228
236
|
- `LICENSE`
|
|
@@ -246,6 +254,7 @@ author: Optional but recommended
|
|
|
246
254
|
**Cause**: No markdown files found or all files excluded
|
|
247
255
|
|
|
248
256
|
**Solution**:
|
|
257
|
+
|
|
249
258
|
- Ensure markdown files exist in `content/` directory
|
|
250
259
|
- Check `.remarkignore` patterns
|
|
251
260
|
- Verify correct file extensions (`.md`, `.mdx`)
|
|
@@ -255,6 +264,7 @@ author: Optional but recommended
|
|
|
255
264
|
**Cause**: Some rules require manual fixes (duplicate headings, broken links)
|
|
256
265
|
|
|
257
266
|
**Solution**:
|
|
267
|
+
|
|
258
268
|
- Read console output for specific violations
|
|
259
269
|
- Manually fix reported issues
|
|
260
270
|
- Use `pnpm run format:check` to separate formatting from lint errors
|
|
@@ -264,6 +274,7 @@ author: Optional but recommended
|
|
|
264
274
|
**Cause**: Invalid JSX syntax
|
|
265
275
|
|
|
266
276
|
**Solution**:
|
|
277
|
+
|
|
267
278
|
- Verify JSX is valid JavaScript
|
|
268
279
|
- Check all tags are properly closed
|
|
269
280
|
- Ensure React components use `<Component />` not `<Component>`
|
|
@@ -285,45 +296,67 @@ pnpm run process:safe
|
|
|
285
296
|
|
|
286
297
|
**Disable VS Code remark extensions** - they may conflict with this opinionated configuration. Always use command line processing.
|
|
287
298
|
|
|
288
|
-
##
|
|
299
|
+
## Entro314 Labs Markdown Ecosystem
|
|
289
300
|
|
|
290
|
-
|
|
301
|
+
markdownfix is part of a comprehensive markdown ecosystem. For complete documentation, see [PROJECT\_ECOSYSTEM.md](../PROJECT_ECOSYSTEM.md).
|
|
291
302
|
|
|
292
|
-
|
|
303
|
+
### Companion Projects
|
|
293
304
|
|
|
294
|
-
|
|
305
|
+
#### 📄 [MDD (Markdown Document)](https://github.com/entro314-labs/mdd)
|
|
295
306
|
|
|
296
|
-
|
|
307
|
+
**The missing document layer for the AI-to-Office pipeline.**
|
|
297
308
|
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
-
|
|
301
|
-
-
|
|
302
|
-
-
|
|
309
|
+
Semantic document format for professional business documents:
|
|
310
|
+
|
|
311
|
+
- **Semantic directives**: `::letterhead`, `::signature-block`, `::header`, `::footer`
|
|
312
|
+
- **Multi-format output**: HTML, PDF, DOCX from single source
|
|
313
|
+
- **AI workflow integration**: ChatGPT/Claude markdown → professional documents
|
|
314
|
+
- **Zero configuration**: Professional styling built-in
|
|
315
|
+
- **200+ document types**: Comprehensive business document catalog
|
|
316
|
+
- **Version control friendly**: Plain text `.mdd` files
|
|
317
|
+
|
|
318
|
+
**Installation**: `npm install -g @entro314labs/mdd`
|
|
319
|
+
|
|
320
|
+
**Quick start**:
|
|
303
321
|
|
|
304
322
|
```bash
|
|
305
|
-
#
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
#
|
|
323
|
+
# Preview business document
|
|
324
|
+
mdd-preview document.mdd
|
|
325
|
+
|
|
326
|
+
# Or use with npx
|
|
327
|
+
npx mdd-preview examples/invoice.mdd
|
|
309
328
|
```
|
|
310
329
|
|
|
311
|
-
**
|
|
330
|
+
markdownfix can **optionally format `.mdd` files** by installing MDD as a dependency.
|
|
331
|
+
|
|
332
|
+
#### 🖥️ [Anasa](https://github.com/entro314-labs/anasa)
|
|
312
333
|
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
334
|
+
Desktop knowledge management application with MDD integration:
|
|
335
|
+
|
|
336
|
+
- Bidirectional linking and graph visualization
|
|
337
|
+
- TipTap WYSIWYG editor
|
|
338
|
+
- **First GUI editor for MDD format**
|
|
339
|
+
- Create professional business documents inside your knowledge base
|
|
340
|
+
- Live preview and PDF export
|
|
341
|
+
|
|
342
|
+
**Status**: MDD integration planned ([see integration spec](../anasa/MDD_INTEGRATION_SPEC.md))
|
|
343
|
+
|
|
344
|
+
### When to Use Which
|
|
345
|
+
|
|
346
|
+
| Document Type | Use | File Extension | Package |
|
|
347
|
+
| ------------------------------ | ----------- | -------------- | --------------------------- |
|
|
348
|
+
| README files | markdownfix | `.md` | `@entro314labs/markdownfix` |
|
|
349
|
+
| Technical documentation | markdownfix | `.md` | `@entro314labs/markdownfix` |
|
|
350
|
+
| Blog posts | markdownfix | `.md` / `.mdx` | `@entro314labs/markdownfix` |
|
|
351
|
+
| React component docs | markdownfix | `.mdx` | `@entro314labs/markdownfix` |
|
|
352
|
+
| **Business letters** | **MDD** | **`.mdd`** | **`@entro314labs/mdd`** |
|
|
353
|
+
| **Invoices** | **MDD** | **`.mdd`** | **`@entro314labs/mdd`** |
|
|
354
|
+
| **Proposals** | **MDD** | **`.mdd`** | **`@entro314labs/mdd`** |
|
|
355
|
+
| **Contracts** | **MDD** | **`.mdd`** | **`@entro314labs/mdd`** |
|
|
356
|
+
| Knowledge base + business docs | Anasa + MDD | `.md` + `.mdd` | Desktop app |
|
|
323
357
|
|
|
324
358
|
## Documentation
|
|
325
359
|
|
|
326
|
-
- **[COMPREHENSIVE-GUIDE.md](COMPREHENSIVE-GUIDE.md)** - Detailed technical guide
|
|
327
360
|
- **[content/guides/style-guide.md](content/guides/style-guide.md)** - Style specifications
|
|
328
361
|
|
|
329
362
|
## Tech Stack
|
|
@@ -336,6 +369,7 @@ pnpm run preview examples/invoice.mdd
|
|
|
336
369
|
## Contributing
|
|
337
370
|
|
|
338
371
|
This is an opinionated formatter with specific style decisions. Contributions should:
|
|
372
|
+
|
|
339
373
|
- Maintain existing formatting rules
|
|
340
374
|
- Add value for developer documentation
|
|
341
375
|
- Not break existing lint rules
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@entro314labs/markdownfix",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.7",
|
|
4
4
|
"description": "Opinionated markdown formatter and linter for MD, MDD and MDX files using Remark/Unified ecosystem",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"dependencies": {
|
|
50
50
|
"@adobe/remark-gridtables": "^3.0.15",
|
|
51
51
|
"@code-dot-org/remark-plugins": "^2.0.0",
|
|
52
|
-
"@entro314labs/mdd": "^0.0.
|
|
52
|
+
"@entro314labs/mdd": "^0.0.7",
|
|
53
53
|
"@theguild/remark-mermaid": "^0.3.0",
|
|
54
54
|
"fumadocs-docgen": "^3.0.2",
|
|
55
55
|
"glob": "^11.0.3",
|