Reimplement as a tokenizer with GFM parity

This commit is contained in:
gsb
2026-04-30 07:09:19 +00:00
parent 005db2f431
commit d41716c8b2
28 changed files with 4798 additions and 1398 deletions
+6 -6
View File
@@ -12,8 +12,8 @@ export function getWindow(): any {
(global as any).HTMLElement = _window.HTMLElement;
(global as any).Node = _window.Node;
(global as any).NodeFilter = _window.NodeFilter;
(global as any).TextEncoder = _window.TextEncoder || require('util').TextEncoder;
(global as any).TextDecoder = _window.TextDecoder || require('util').TextDecoder;
(global as any).TextEncoder = _window.TextEncoder || require('util').TextEncoder;
(global as any).TextDecoder = _window.TextDecoder || require('util').TextDecoder;
const { TextEncoder, TextDecoder } = require('util');
_window.TextEncoder = TextEncoder;
@@ -28,10 +28,10 @@ export function getWindow(): any {
}
export function ribbit(): any {
const w = getWindow();
const r = w.ribbit;
r.window = w;
return r;
const browserWindow = getWindow();
const lib = browserWindow.ribbit;
lib.window = browserWindow;
return lib;
}
export function resetDOM(content = 'test'): void {