@entro314labs/markdownfix 0.0.13 → 0.0.15
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 -1
- package/cli.js +12 -3
- package/package.json +8 -8
package/.remarkrc.js
CHANGED
|
@@ -32,7 +32,7 @@ export default {
|
|
|
32
32
|
emphasis: '_', // Use _emphasis_ over *emphasis*
|
|
33
33
|
strong: '*', // Use **strong** over __strong__
|
|
34
34
|
fence: '`', // Use ``` for code fences
|
|
35
|
-
fences: true, //
|
|
35
|
+
fences: true, // Use fences for code blocks (disabled for MDX in cli.js)
|
|
36
36
|
incrementListMarker: true, // Increment ordered list markers
|
|
37
37
|
listItemIndent: 'one', // Use one space for list indentation
|
|
38
38
|
quote: '"', // Use double quotes in titles
|
|
@@ -41,6 +41,7 @@ export default {
|
|
|
41
41
|
ruleSpaces: false, // No spaces in horizontal rules
|
|
42
42
|
setext: false, // Use # instead of === underlines
|
|
43
43
|
tightDefinitions: true, // No blank lines between definitions
|
|
44
|
+
resourceLink: false, // Don't escape link URLs unnecessarily
|
|
44
45
|
},
|
|
45
46
|
|
|
46
47
|
plugins: [
|
package/cli.js
CHANGED
|
@@ -139,10 +139,12 @@ async function processFiles(files, options = {}) {
|
|
|
139
139
|
|
|
140
140
|
// Add stringify for formatting (unless lint-only)
|
|
141
141
|
if (!lintOnly) {
|
|
142
|
+
// For MDX files, disable fences to prevent JSX from being wrapped in code blocks
|
|
143
|
+
const isMdx = filePath.endsWith('.mdx') || filePath.endsWith('.mdd');
|
|
142
144
|
processor = processor.use(remarkStringify, {
|
|
143
145
|
bullet: '-',
|
|
144
146
|
emphasis: '_',
|
|
145
|
-
fences:
|
|
147
|
+
fences: !isMdx, // Disable fences for MDX to preserve JSX
|
|
146
148
|
listItemIndent: 'one',
|
|
147
149
|
rule: '-',
|
|
148
150
|
strong: '*',
|
|
@@ -207,10 +209,17 @@ async function runNuclearMode(files, options = {}) {
|
|
|
207
209
|
steps.push({
|
|
208
210
|
name: 'Remark Format',
|
|
209
211
|
success: !result.hasErrors,
|
|
210
|
-
details: `
|
|
212
|
+
details: `Wrote ${result.processedCount}/${result.totalFiles} files`
|
|
211
213
|
});
|
|
212
214
|
if (result.hasErrors) overallSuccess = false;
|
|
213
|
-
if (!quiet)
|
|
215
|
+
if (!quiet) {
|
|
216
|
+
console.log(` ✓ Remark formatting completed (${result.processedCount} files written)`);
|
|
217
|
+
if (result.hasErrors) {
|
|
218
|
+
console.log(` ⚠️ Some files had lint warnings (but were still formatted)\n`);
|
|
219
|
+
} else {
|
|
220
|
+
console.log();
|
|
221
|
+
}
|
|
222
|
+
}
|
|
214
223
|
} catch (error) {
|
|
215
224
|
steps.push({ name: 'Remark Format', success: false, details: error.message });
|
|
216
225
|
overallSuccess = false;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@entro314labs/markdownfix",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.15",
|
|
4
4
|
"description": "Opinionated markdown formatter and linter for MD, MDX, MDC, and MDD files using Remark/Unified ecosystem",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -49,23 +49,23 @@
|
|
|
49
49
|
"remark-cli": "^12.0.1"
|
|
50
50
|
},
|
|
51
51
|
"engines": {
|
|
52
|
-
"node": ">=22.
|
|
52
|
+
"node": ">=22.x"
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
55
|
"@adobe/remark-gridtables": "^3.0.15",
|
|
56
|
-
"@code-dot-org/remark-plugins": "^2.0.
|
|
57
|
-
"@entro314labs/remark-mdd": "^0.0.
|
|
56
|
+
"@code-dot-org/remark-plugins": "^2.0.1",
|
|
57
|
+
"@entro314labs/remark-mdd": "^0.0.15",
|
|
58
58
|
"@theguild/remark-mermaid": "^0.3.0",
|
|
59
|
-
"eslint": "^9.
|
|
59
|
+
"eslint": "^9.39.1",
|
|
60
60
|
"eslint-plugin-mdx": "^3.6.2",
|
|
61
61
|
"eslint-plugin-react": "^7.37.5",
|
|
62
|
-
"fumadocs-docgen": "^3.0.
|
|
62
|
+
"fumadocs-docgen": "^3.0.4",
|
|
63
63
|
"glob": "^11.0.3",
|
|
64
64
|
"js-yaml": "^4.1.0",
|
|
65
65
|
"rehype-remark": "^10.0.1",
|
|
66
66
|
"remark": "^15.0.1",
|
|
67
67
|
"remark-directive": "^4.0.0",
|
|
68
|
-
"remark-docx": "^0.
|
|
68
|
+
"remark-docx": "^0.2.0",
|
|
69
69
|
"remark-emoji": "^5.0.2",
|
|
70
70
|
"remark-frontmatter": "^5.0.0",
|
|
71
71
|
"remark-gfm": "^4.0.1",
|
|
@@ -107,7 +107,7 @@
|
|
|
107
107
|
"remark-lint-table-pipe-alignment": "^4.1.1",
|
|
108
108
|
"remark-lint-table-pipes": "^5.0.1",
|
|
109
109
|
"remark-lint-unordered-list-marker-style": "^4.0.1",
|
|
110
|
-
"remark-mdc": "^3.
|
|
110
|
+
"remark-mdc": "^3.8.1",
|
|
111
111
|
"remark-mdx": "^3.1.1",
|
|
112
112
|
"remark-mdx-frontmatter": "^5.2.0",
|
|
113
113
|
"remark-preset-lint-consistent": "^6.0.1",
|