@velvetmonkey/flywheel-memory 2.5.8 → 2.5.9

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 (2) hide show
  1. package/dist/index.js +15 -4
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -5283,6 +5283,9 @@ function findSection(content, sectionName) {
5283
5283
  contentStartLine
5284
5284
  };
5285
5285
  }
5286
+ function isCodeFenceLine(line) {
5287
+ return line.trim().startsWith("```");
5288
+ }
5286
5289
  function isPreformattedList(content) {
5287
5290
  const trimmed = content.trim();
5288
5291
  if (!trimmed) return false;
@@ -5350,9 +5353,11 @@ function formatContent(content, format) {
5350
5353
  }
5351
5354
  const sanitized = sanitizeForList(trimmed);
5352
5355
  const lines = sanitized.split("\n");
5356
+ let inCodeBlock = false;
5353
5357
  return lines.map((line, i) => {
5358
+ if (isCodeFenceLine(line)) inCodeBlock = !inCodeBlock;
5354
5359
  if (i === 0) return `- ${line}`;
5355
- if (line === "") return " ";
5360
+ if (line === "") return inCodeBlock ? " " : " <!-- -->";
5356
5361
  return ` ${line}`;
5357
5362
  }).join("\n");
5358
5363
  }
@@ -5361,9 +5366,11 @@ function formatContent(content, format) {
5361
5366
  return trimmed;
5362
5367
  }
5363
5368
  const lines = trimmed.split("\n");
5369
+ let inCodeBlock = false;
5364
5370
  return lines.map((line, i) => {
5371
+ if (isCodeFenceLine(line)) inCodeBlock = !inCodeBlock;
5365
5372
  if (i === 0) return `- [ ] ${line}`;
5366
- if (line === "") return " ";
5373
+ if (line === "") return inCodeBlock ? " " : " <!-- -->";
5367
5374
  return ` ${line}`;
5368
5375
  }).join("\n");
5369
5376
  }
@@ -5372,9 +5379,11 @@ function formatContent(content, format) {
5372
5379
  return trimmed;
5373
5380
  }
5374
5381
  const lines = trimmed.split("\n");
5382
+ let inCodeBlock = false;
5375
5383
  return lines.map((line, i) => {
5384
+ if (isCodeFenceLine(line)) inCodeBlock = !inCodeBlock;
5376
5385
  if (i === 0) return `1. ${line}`;
5377
- if (line === "") return " ";
5386
+ if (line === "") return inCodeBlock ? " " : " <!-- -->";
5378
5387
  return ` ${line}`;
5379
5388
  }).join("\n");
5380
5389
  }
@@ -5389,9 +5398,11 @@ function formatContent(content, format) {
5389
5398
  const prefix = `- **${hours}:${minutes}** `;
5390
5399
  const lines = sanitized.split("\n");
5391
5400
  const indent = " ";
5401
+ let inCodeBlock = false;
5392
5402
  return lines.map((line, i) => {
5403
+ if (isCodeFenceLine(line)) inCodeBlock = !inCodeBlock;
5393
5404
  if (i === 0) return `${prefix}${line}`;
5394
- if (line === "") return indent;
5405
+ if (line === "") return inCodeBlock ? indent : `${indent}<!-- -->`;
5395
5406
  return `${indent}${line}`;
5396
5407
  }).join("\n");
5397
5408
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@velvetmonkey/flywheel-memory",
3
- "version": "2.5.8",
4
- "description": "MCP tools that search, write, and auto-link your Obsidian vault and learn from your edits.",
3
+ "version": "2.5.9",
4
+ "description": "MCP tools that search, write, and auto-link your Obsidian vault \u2014 and learn from your edits.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "bin": {
@@ -55,7 +55,7 @@
55
55
  "dependencies": {
56
56
  "@huggingface/transformers": "^3.8.1",
57
57
  "@modelcontextprotocol/sdk": "^1.25.1",
58
- "@velvetmonkey/vault-core": "^2.5.8",
58
+ "@velvetmonkey/vault-core": "^2.5.9",
59
59
  "better-sqlite3": "^12.0.0",
60
60
  "chokidar": "^4.0.0",
61
61
  "gray-matter": "^4.0.3",