@sullux/markdown-html 1.0.1 → 1.0.2

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.
@@ -3,7 +3,7 @@ const { renderBlock } = require('./render-block')
3
3
 
4
4
  const markdownToHtml = (markdown, options = {}) => {
5
5
  if (!markdown) return ''
6
- const ast = parse(markdown)
6
+ const ast = typeof markdown === 'string' ? parse(markdown) : markdown
7
7
  const ctx = { ...options, usedSlugs: new Set() }
8
8
  return ast.blocks.map((block) => renderBlock(block, ctx)).join('')
9
9
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sullux/markdown-html",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "A high-performance, bidirectional Markdown <-> HTML compiler supporting GFM, GitBook hints, syntax highlighting, and custom image dimensions.",
5
5
  "main": "./index.js",
6
6
  "author": "Charles Sullivan <charles@sullux.com>",
@@ -31,6 +31,6 @@
31
31
  "registry": "https://registry.npmjs.org/"
32
32
  },
33
33
  "dependencies": {
34
- "@sullux/markdown-compiler": "^1.0.0"
34
+ "@sullux/markdown-compiler": "^1.0.2"
35
35
  }
36
36
  }