md4x 0.0.22 → 0.0.24

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.
package/build/md4x.wasm CHANGED
Binary file
package/lib/types.d.mts CHANGED
@@ -51,9 +51,10 @@ export interface HtmlOptions extends RenderOptions {
51
51
  full?: boolean;
52
52
 
53
53
  /**
54
- * Custom highlighter function for fenced code blocks. If provided, this will cause
54
+ * Custom highlighter function for fenced code blocks. If provided, code blocks
55
+ * are passed through this callback which can return custom HTML-highlighted output.
55
56
  */
56
- highlighter: CodeBlockHighlighter;
57
+ highlighter?: CodeBlockHighlighter;
57
58
  }
58
59
 
59
60
  export interface CodeBlock {
@@ -27,9 +27,17 @@ export function _getExports() {
27
27
  export const _imports = {
28
28
  wasi_snapshot_preview1: {
29
29
  fd_close: () => 0,
30
+ fd_filestat_get: () => 0,
31
+ fd_pwrite: () => 0,
32
+ fd_read: () => 0,
30
33
  fd_seek: () => 0,
31
34
  fd_write: () => 0,
32
35
  proc_exit: () => {},
36
+ random_get: (buf, len) => {
37
+ const bytes = new Uint8Array(_instance.exports.memory.buffer, buf, len);
38
+ crypto.getRandomValues(bytes);
39
+ return 0;
40
+ },
33
41
  },
34
42
  };
35
43
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "md4x",
3
- "version": "0.0.22",
3
+ "version": "0.0.24",
4
4
  "repository": "unjs/md4x",
5
5
  "license": "MIT",
6
6
  "type": "module",