Closed mohit-singh-pepper closed 2 months ago
Its due to this https://github.com/fgnass/domino/issues/146
Is there a workaround, anyone know of ?
Not familiar with webpack, so the workaround in general terms:
For reference, discussion about separating turndown and the DOM implementation: #265 .
@mohit-singh-pepper did you found a solution ?
For anyone still running into this problem, the following worked for me (based on the commit from @julienc91 above):
npm i jsdom
npm i --save-dev @types/jsdom
import { JSDOM } from "jsdom";
import TurndownService from "turndown";
const turndownService = new TurndownService();
const result = turndownService.turndown(
JSDOM.fragment(your_html_content)
);
I think this issue should be solved with the latest Turndown release 7.2.0. Can you confirm @mohit-singh-pepper ?
This should be solved with the introduction of custom domino fork in the latest release #461.
Getting following error while trying to run turndown. I am using esbuild to get the bundle for same.