forked from discourse/discourse
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcontent-tag+2.0.1.patch
27 lines (23 loc) · 1.22 KB
/
content-tag+2.0.1.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
diff --git a/node_modules/content-tag/pkg/standalone.js b/node_modules/content-tag/pkg/standalone.js
index 7be08fc..35777bf 100644
--- a/node_modules/content-tag/pkg/standalone.js
+++ b/node_modules/content-tag/pkg/standalone.js
@@ -1,7 +1,8 @@
-import init from "./standalone/content_tag.js";
+import { initSync } from "./standalone/content_tag.js";
+import module from "./standalone/content_tag_bg.wasm";
import { Preprocessor as WasmPreprocessor } from "./standalone/content_tag.js";
-await init();
+initSync(module);
const defaultOptions = {
inline_source_map: false,
diff --git a/node_modules/content-tag/pkg/standalone/content_tag.js b/node_modules/content-tag/pkg/standalone/content_tag.js
index aaefe00..bb20026 100644
--- a/node_modules/content-tag/pkg/standalone/content_tag.js
+++ b/node_modules/content-tag/pkg/standalone/content_tag.js
@@ -20,6 +20,7 @@ function takeObject(idx) {
return ret;
}
+const { TextDecoder, TextEncoder } = require('util');
const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };