Reimplement as a tokenizer with GFM parity
This commit is contained in:
+6
-6
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user