@helping-ai-workflow/md2doc 1.1.0 → 1.1.1

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/lib/md2doc.js +2 -4
  2. package/package.json +1 -1
package/lib/md2doc.js CHANGED
@@ -315,13 +315,11 @@ ${itemsHtml}
315
315
  const r = spawnSync('dot', ['-Tsvg'], { input: code, encoding: 'utf8', timeout: 10000 });
316
316
  if (r.status === 0) {
317
317
  // Strip XML declaration / DOCTYPE; keep only the <svg> element.
318
- // Remove fixed width/height attrs so CSS max-width:100% + height:auto
319
- // can scale the diagram to content width; viewBox preserves aspect ratio.
318
+ // Keep intrinsic width/height so small diagrams render at their natural
319
+ // size; max-width:100% in CSS still shrinks oversized ones to container.
320
320
  const svg = r.stdout
321
321
  .replace(/<\?xml[^>]*\?>/g, '')
322
322
  .replace(/<!DOCTYPE[^>]*>/g, '')
323
- .replace(/(<svg\b[^>]*?)\s+width="[^"]*"/i, '$1')
324
- .replace(/(<svg\b[^>]*?)\s+height="[^"]*"/i, '$1')
325
323
  .trim();
326
324
  return `\n<div class="graphviz">${svg}</div>\n`;
327
325
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@helping-ai-workflow/md2doc",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "Markdown → HTML / PDF renderer with WaveDrom, Mermaid, and Graphviz support",
5
5
  "keywords": [
6
6
  "markdown",