@entro314labs/markdownfix 0.0.20 → 0.0.21

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 +1 -0
  2. package/cli.js +6 -2
  3. package/package.json +1 -1
package/.remarkrc.js CHANGED
@@ -42,6 +42,7 @@ export default {
42
42
  setext: false, // Use # instead of === underlines
43
43
  tightDefinitions: true, // No blank lines between definitions
44
44
  resourceLink: false, // Don't escape link URLs unnecessarily
45
+ break: 'spaces', // Use two spaces for line breaks instead of backslashes
45
46
  },
46
47
 
47
48
  plugins: [
package/cli.js CHANGED
@@ -160,7 +160,11 @@ async function processFiles(files, options = {}) {
160
160
  listItemIndent: 'one',
161
161
  rule: '-',
162
162
  strong: '*',
163
- tightDefinitions: true
163
+ tightDefinitions: true,
164
+ handlers: {
165
+ // Custom handler to use two spaces for line breaks instead of backslashes
166
+ break: () => ' \n'
167
+ }
164
168
  });
165
169
  }
166
170
 
@@ -446,7 +450,7 @@ function isFileIgnored(filePath, ignorePatterns) {
446
450
  // Handle glob patterns
447
451
  if (pattern.includes('**')) {
448
452
  // **/*.config.js -> matches any .config.js file
449
- const regex = new RegExp(pattern.replace(/\*\*/g, '.*').replace(/\*/g, '[^/]*').replace(/\./g, '\\.'));
453
+ const regex = new RegExp(pattern.replace(/\./g, '\\.').replace(/\*\*/g, '__DOUBLESTAR__').replace(/\*/g, '[^/]*').replace(/__DOUBLESTAR__/g, '.*'));
450
454
  if (regex.test(filePath)) return true;
451
455
  } else if (pattern.includes('*')) {
452
456
  // *.js -> matches .js files in root
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@entro314labs/markdownfix",
3
- "version": "0.0.20",
3
+ "version": "0.0.21",
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": {