There was an error while loading. Please reload this page.
1 parent 8a2dde6 commit fc00ae3Copy full SHA for fc00ae3
example/html-to-text.js
@@ -15,6 +15,12 @@ console.log();
15
console.log('From file:');
16
const filePath = new URL('test.html', import.meta.url);
17
/** @type { Options } */
18
-const options = { tables: ['#invoice', '.address'] };
+const options = {
19
+ selectors: [
20
+ { selector: 'table', format: 'block' },
21
+ { selector: 'table#invoice', format: 'dataTable' },
22
+ { selector: 'table.address', format: 'dataTable' },
23
+ ]
24
+};
25
const text2 = htmlToText(readFileSync(filePath, 'utf8'), options);
26
console.log(text2);
0 commit comments