2024-09-03 17:51:07 +08:00
|
|
|
diff --git a/pkg/standalone/content_tag.js b/pkg/standalone/content_tag.js
|
2024-10-03 18:45:11 +08:00
|
|
|
index 761f0fa84a1c545ac8908dd3c3b6d7e6c778791d..41a1112329742f8ee5351df4d56e068fceef4864 100644
|
2024-09-03 17:51:07 +08:00
|
|
|
--- a/pkg/standalone/content_tag.js
|
|
|
|
+++ b/pkg/standalone/content_tag.js
|
2023-12-14 19:00:36 +08:00
|
|
|
@@ -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(); };
|
2024-10-03 18:45:11 +08:00
|
|
|
diff --git a/pkg/standalone.js b/pkg/standalone.js
|
|
|
|
index cb50046539df05b41dcc842ffb98e354236f8d26..10eea2962ffd804905d85057bb25d5b30b4d2e11 100644
|
|
|
|
--- a/pkg/standalone.js
|
|
|
|
+++ b/pkg/standalone.js
|
|
|
|
@@ -1,5 +1,6 @@
|
|
|
|
-import init from "./standalone/content_tag.js";
|
|
|
|
+import { initSync } from "./standalone/content_tag.js";
|
|
|
|
+import module from "./standalone/content_tag_bg.wasm";
|
|
|
|
export { Preprocessor } from "./standalone/content_tag.js";
|
|
|
|
|
|
|
|
-await init();
|
|
|
|
+initSync(module);
|
|
|
|
|