@entro314labs/markdownfix 0.0.13 → 0.0.14

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.
Files changed (3) hide show
  1. package/.remarkrc.js +2 -1
  2. package/cli.js +12 -3
  3. package/package.json +1 -1
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, // Always use fences for code blocks
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: true,
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: `Formatted ${result.processedCount}/${result.totalFiles} files`
212
+ details: `Wrote ${result.processedCount}/${result.totalFiles} files`
211
213
  });
212
214
  if (result.hasErrors) overallSuccess = false;
213
- if (!quiet) console.log(` ✓ Remark formatting completed\n`);
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.13",
3
+ "version": "0.0.14",
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": {