html-to-markdown-node 2.4.2 → 2.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -51,10 +51,10 @@ bun add html-to-markdown-node
51
51
 
52
52
  ## Usage
53
53
 
54
- ### Node.js (CommonJS)
54
+ ### Basic Conversion
55
55
 
56
56
  ```javascript
57
- const { convert } = require('html-to-markdown-node');
57
+ import { convert } from 'html-to-markdown-node';
58
58
 
59
59
  const html = '<h1>Hello World</h1><p>This is <strong>fast</strong>!</p>';
60
60
  const markdown = convert(html);
@@ -64,32 +64,43 @@ console.log(markdown);
64
64
  // This is **fast**!
65
65
  ```
66
66
 
67
- ### Node.js (ESM)
67
+ ### With Options
68
68
 
69
- ```javascript
69
+ ```typescript
70
70
  import { convert } from 'html-to-markdown-node';
71
71
 
72
- const markdown = convert('<h1>Hello</h1>', {
72
+ const markdown = convert(html, {
73
73
  headingStyle: 'Atx',
74
74
  codeBlockStyle: 'Backticks',
75
+ listIndentWidth: 2,
76
+ bullets: '-',
75
77
  wrap: true,
76
78
  wrapWidth: 80
77
79
  });
78
80
  ```
79
81
 
80
- ### Bun
82
+ ### Preserve Complex HTML (NEW in v2.5)
81
83
 
82
84
  ```typescript
83
85
  import { convert } from 'html-to-markdown-node';
84
86
 
85
- const html = await Bun.file('input.html').text();
87
+ const html = `
88
+ <h1>Report</h1>
89
+ <table>
90
+ <tr><th>Name</th><th>Value</th></tr>
91
+ <tr><td>Foo</td><td>Bar</td></tr>
92
+ </table>
93
+ `;
94
+
86
95
  const markdown = convert(html, {
87
- headingStyle: 'Atx',
88
- listIndentWidth: 2,
89
- bullets: '-'
96
+ preserveTags: ['table'] // Keep tables as HTML
90
97
  });
91
-
92
- await Bun.write('output.md', markdown);
98
+ // # Report
99
+ //
100
+ // <table>
101
+ // <tr><th>Name</th><th>Value</th></tr>
102
+ // <tr><td>Foo</td><td>Bar</td></tr>
103
+ // </table>
93
104
  ```
94
105
 
95
106
  ## TypeScript
@@ -176,12 +187,46 @@ See [ConversionOptions](https://github.com/Goldziher/html-to-markdown/tree/main/
176
187
  - Code block styles (indented, backticks, tildes)
177
188
  - List formatting (indent width, bullet characters)
178
189
  - Text escaping and formatting
190
+ - Tag preservation (`preserveTags`) and stripping (`stripTags`)
179
191
  - Preprocessing for web scraping
180
192
  - hOCR table extraction
181
193
  - And more...
182
194
 
183
195
  ## Examples
184
196
 
197
+ ### Preserving HTML Tags
198
+
199
+ Keep specific HTML tags in their original form instead of converting to Markdown:
200
+
201
+ ```typescript
202
+ import { convert } from '@html-to-markdown/node';
203
+
204
+ const html = `
205
+ <p>Before table</p>
206
+ <table class="data">
207
+ <tr><th>Name</th><th>Value</th></tr>
208
+ <tr><td>Item 1</td><td>100</td></tr>
209
+ </table>
210
+ <p>After table</p>
211
+ `;
212
+
213
+ const markdown = convert(html, {
214
+ preserveTags: ['table']
215
+ });
216
+
217
+ // Result includes the table as HTML:
218
+ // "Before table\n\n<table class=\"data\">...</table>\n\nAfter table\n"
219
+ ```
220
+
221
+ Combine with `stripTags` for fine-grained control:
222
+
223
+ ```typescript
224
+ const markdown = convert(html, {
225
+ preserveTags: ['table', 'form'], // Keep these as HTML
226
+ stripTags: ['script', 'style'] // Remove these entirely
227
+ });
228
+ ```
229
+
185
230
  ### Web Scraping
186
231
 
187
232
  ```javascript
package/index.d.ts CHANGED
@@ -117,6 +117,8 @@ export interface JsConversionOptions {
117
117
  debug?: boolean
118
118
  /** List of HTML tags to strip */
119
119
  stripTags?: Array<string>
120
+ /** List of HTML tags to preserve as-is in the output */
121
+ preserveTags?: Array<string>
120
122
  }
121
123
 
122
124
  /** Heading style options */
package/index.js CHANGED
@@ -80,8 +80,8 @@ function requireNative() {
80
80
  try {
81
81
  const binding = require('html-to-markdown-node-android-arm64')
82
82
  const bindingPackageVersion = require('html-to-markdown-node-android-arm64/package.json').version
83
- if (bindingPackageVersion !== '2.4.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
84
- throw new Error(`Native binding package version mismatch, expected 2.4.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
83
+ if (bindingPackageVersion !== '2.5.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
84
+ throw new Error(`Native binding package version mismatch, expected 2.5.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
85
85
  }
86
86
  return binding
87
87
  } catch (e) {
@@ -96,8 +96,8 @@ function requireNative() {
96
96
  try {
97
97
  const binding = require('html-to-markdown-node-android-arm-eabi')
98
98
  const bindingPackageVersion = require('html-to-markdown-node-android-arm-eabi/package.json').version
99
- if (bindingPackageVersion !== '2.4.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
100
- throw new Error(`Native binding package version mismatch, expected 2.4.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
99
+ if (bindingPackageVersion !== '2.5.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
100
+ throw new Error(`Native binding package version mismatch, expected 2.5.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
101
101
  }
102
102
  return binding
103
103
  } catch (e) {
@@ -117,8 +117,8 @@ function requireNative() {
117
117
  try {
118
118
  const binding = require('html-to-markdown-node-win32-x64-gnu')
119
119
  const bindingPackageVersion = require('html-to-markdown-node-win32-x64-gnu/package.json').version
120
- if (bindingPackageVersion !== '2.4.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
121
- throw new Error(`Native binding package version mismatch, expected 2.4.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
120
+ if (bindingPackageVersion !== '2.5.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
121
+ throw new Error(`Native binding package version mismatch, expected 2.5.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
122
122
  }
123
123
  return binding
124
124
  } catch (e) {
@@ -133,8 +133,8 @@ function requireNative() {
133
133
  try {
134
134
  const binding = require('html-to-markdown-node-win32-x64-msvc')
135
135
  const bindingPackageVersion = require('html-to-markdown-node-win32-x64-msvc/package.json').version
136
- if (bindingPackageVersion !== '2.4.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
137
- throw new Error(`Native binding package version mismatch, expected 2.4.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
136
+ if (bindingPackageVersion !== '2.5.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
137
+ throw new Error(`Native binding package version mismatch, expected 2.5.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
138
138
  }
139
139
  return binding
140
140
  } catch (e) {
@@ -150,8 +150,8 @@ function requireNative() {
150
150
  try {
151
151
  const binding = require('html-to-markdown-node-win32-ia32-msvc')
152
152
  const bindingPackageVersion = require('html-to-markdown-node-win32-ia32-msvc/package.json').version
153
- if (bindingPackageVersion !== '2.4.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
154
- throw new Error(`Native binding package version mismatch, expected 2.4.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
153
+ if (bindingPackageVersion !== '2.5.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
154
+ throw new Error(`Native binding package version mismatch, expected 2.5.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
155
155
  }
156
156
  return binding
157
157
  } catch (e) {
@@ -166,8 +166,8 @@ function requireNative() {
166
166
  try {
167
167
  const binding = require('html-to-markdown-node-win32-arm64-msvc')
168
168
  const bindingPackageVersion = require('html-to-markdown-node-win32-arm64-msvc/package.json').version
169
- if (bindingPackageVersion !== '2.4.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
170
- throw new Error(`Native binding package version mismatch, expected 2.4.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
169
+ if (bindingPackageVersion !== '2.5.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
170
+ throw new Error(`Native binding package version mismatch, expected 2.5.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
171
171
  }
172
172
  return binding
173
173
  } catch (e) {
@@ -185,8 +185,8 @@ function requireNative() {
185
185
  try {
186
186
  const binding = require('html-to-markdown-node-darwin-universal')
187
187
  const bindingPackageVersion = require('html-to-markdown-node-darwin-universal/package.json').version
188
- if (bindingPackageVersion !== '2.4.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
189
- throw new Error(`Native binding package version mismatch, expected 2.4.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
188
+ if (bindingPackageVersion !== '2.5.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
189
+ throw new Error(`Native binding package version mismatch, expected 2.5.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
190
190
  }
191
191
  return binding
192
192
  } catch (e) {
@@ -201,8 +201,8 @@ function requireNative() {
201
201
  try {
202
202
  const binding = require('html-to-markdown-node-darwin-x64')
203
203
  const bindingPackageVersion = require('html-to-markdown-node-darwin-x64/package.json').version
204
- if (bindingPackageVersion !== '2.4.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
205
- throw new Error(`Native binding package version mismatch, expected 2.4.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
204
+ if (bindingPackageVersion !== '2.5.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
205
+ throw new Error(`Native binding package version mismatch, expected 2.5.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
206
206
  }
207
207
  return binding
208
208
  } catch (e) {
@@ -217,8 +217,8 @@ function requireNative() {
217
217
  try {
218
218
  const binding = require('html-to-markdown-node-darwin-arm64')
219
219
  const bindingPackageVersion = require('html-to-markdown-node-darwin-arm64/package.json').version
220
- if (bindingPackageVersion !== '2.4.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
221
- throw new Error(`Native binding package version mismatch, expected 2.4.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
220
+ if (bindingPackageVersion !== '2.5.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
221
+ throw new Error(`Native binding package version mismatch, expected 2.5.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
222
222
  }
223
223
  return binding
224
224
  } catch (e) {
@@ -237,8 +237,8 @@ function requireNative() {
237
237
  try {
238
238
  const binding = require('html-to-markdown-node-freebsd-x64')
239
239
  const bindingPackageVersion = require('html-to-markdown-node-freebsd-x64/package.json').version
240
- if (bindingPackageVersion !== '2.4.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
241
- throw new Error(`Native binding package version mismatch, expected 2.4.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
240
+ if (bindingPackageVersion !== '2.5.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
241
+ throw new Error(`Native binding package version mismatch, expected 2.5.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
242
242
  }
243
243
  return binding
244
244
  } catch (e) {
@@ -253,8 +253,8 @@ function requireNative() {
253
253
  try {
254
254
  const binding = require('html-to-markdown-node-freebsd-arm64')
255
255
  const bindingPackageVersion = require('html-to-markdown-node-freebsd-arm64/package.json').version
256
- if (bindingPackageVersion !== '2.4.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
257
- throw new Error(`Native binding package version mismatch, expected 2.4.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
256
+ if (bindingPackageVersion !== '2.5.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
257
+ throw new Error(`Native binding package version mismatch, expected 2.5.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
258
258
  }
259
259
  return binding
260
260
  } catch (e) {
@@ -274,8 +274,8 @@ function requireNative() {
274
274
  try {
275
275
  const binding = require('html-to-markdown-node-linux-x64-musl')
276
276
  const bindingPackageVersion = require('html-to-markdown-node-linux-x64-musl/package.json').version
277
- if (bindingPackageVersion !== '2.4.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
278
- throw new Error(`Native binding package version mismatch, expected 2.4.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
277
+ if (bindingPackageVersion !== '2.5.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
278
+ throw new Error(`Native binding package version mismatch, expected 2.5.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
279
279
  }
280
280
  return binding
281
281
  } catch (e) {
@@ -290,8 +290,8 @@ function requireNative() {
290
290
  try {
291
291
  const binding = require('html-to-markdown-node-linux-x64-gnu')
292
292
  const bindingPackageVersion = require('html-to-markdown-node-linux-x64-gnu/package.json').version
293
- if (bindingPackageVersion !== '2.4.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
294
- throw new Error(`Native binding package version mismatch, expected 2.4.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
293
+ if (bindingPackageVersion !== '2.5.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
294
+ throw new Error(`Native binding package version mismatch, expected 2.5.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
295
295
  }
296
296
  return binding
297
297
  } catch (e) {
@@ -308,8 +308,8 @@ function requireNative() {
308
308
  try {
309
309
  const binding = require('html-to-markdown-node-linux-arm64-musl')
310
310
  const bindingPackageVersion = require('html-to-markdown-node-linux-arm64-musl/package.json').version
311
- if (bindingPackageVersion !== '2.4.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
312
- throw new Error(`Native binding package version mismatch, expected 2.4.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
311
+ if (bindingPackageVersion !== '2.5.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
312
+ throw new Error(`Native binding package version mismatch, expected 2.5.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
313
313
  }
314
314
  return binding
315
315
  } catch (e) {
@@ -324,8 +324,8 @@ function requireNative() {
324
324
  try {
325
325
  const binding = require('html-to-markdown-node-linux-arm64-gnu')
326
326
  const bindingPackageVersion = require('html-to-markdown-node-linux-arm64-gnu/package.json').version
327
- if (bindingPackageVersion !== '2.4.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
328
- throw new Error(`Native binding package version mismatch, expected 2.4.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
327
+ if (bindingPackageVersion !== '2.5.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
328
+ throw new Error(`Native binding package version mismatch, expected 2.5.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
329
329
  }
330
330
  return binding
331
331
  } catch (e) {
@@ -342,8 +342,8 @@ function requireNative() {
342
342
  try {
343
343
  const binding = require('html-to-markdown-node-linux-arm-musleabihf')
344
344
  const bindingPackageVersion = require('html-to-markdown-node-linux-arm-musleabihf/package.json').version
345
- if (bindingPackageVersion !== '2.4.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
346
- throw new Error(`Native binding package version mismatch, expected 2.4.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
345
+ if (bindingPackageVersion !== '2.5.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
346
+ throw new Error(`Native binding package version mismatch, expected 2.5.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
347
347
  }
348
348
  return binding
349
349
  } catch (e) {
@@ -358,8 +358,8 @@ function requireNative() {
358
358
  try {
359
359
  const binding = require('html-to-markdown-node-linux-arm-gnueabihf')
360
360
  const bindingPackageVersion = require('html-to-markdown-node-linux-arm-gnueabihf/package.json').version
361
- if (bindingPackageVersion !== '2.4.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
362
- throw new Error(`Native binding package version mismatch, expected 2.4.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
361
+ if (bindingPackageVersion !== '2.5.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
362
+ throw new Error(`Native binding package version mismatch, expected 2.5.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
363
363
  }
364
364
  return binding
365
365
  } catch (e) {
@@ -376,8 +376,8 @@ function requireNative() {
376
376
  try {
377
377
  const binding = require('html-to-markdown-node-linux-loong64-musl')
378
378
  const bindingPackageVersion = require('html-to-markdown-node-linux-loong64-musl/package.json').version
379
- if (bindingPackageVersion !== '2.4.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
380
- throw new Error(`Native binding package version mismatch, expected 2.4.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
379
+ if (bindingPackageVersion !== '2.5.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
380
+ throw new Error(`Native binding package version mismatch, expected 2.5.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
381
381
  }
382
382
  return binding
383
383
  } catch (e) {
@@ -392,8 +392,8 @@ function requireNative() {
392
392
  try {
393
393
  const binding = require('html-to-markdown-node-linux-loong64-gnu')
394
394
  const bindingPackageVersion = require('html-to-markdown-node-linux-loong64-gnu/package.json').version
395
- if (bindingPackageVersion !== '2.4.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
396
- throw new Error(`Native binding package version mismatch, expected 2.4.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
395
+ if (bindingPackageVersion !== '2.5.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
396
+ throw new Error(`Native binding package version mismatch, expected 2.5.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
397
397
  }
398
398
  return binding
399
399
  } catch (e) {
@@ -410,8 +410,8 @@ function requireNative() {
410
410
  try {
411
411
  const binding = require('html-to-markdown-node-linux-riscv64-musl')
412
412
  const bindingPackageVersion = require('html-to-markdown-node-linux-riscv64-musl/package.json').version
413
- if (bindingPackageVersion !== '2.4.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
414
- throw new Error(`Native binding package version mismatch, expected 2.4.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
413
+ if (bindingPackageVersion !== '2.5.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
414
+ throw new Error(`Native binding package version mismatch, expected 2.5.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
415
415
  }
416
416
  return binding
417
417
  } catch (e) {
@@ -426,8 +426,8 @@ function requireNative() {
426
426
  try {
427
427
  const binding = require('html-to-markdown-node-linux-riscv64-gnu')
428
428
  const bindingPackageVersion = require('html-to-markdown-node-linux-riscv64-gnu/package.json').version
429
- if (bindingPackageVersion !== '2.4.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
430
- throw new Error(`Native binding package version mismatch, expected 2.4.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
429
+ if (bindingPackageVersion !== '2.5.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
430
+ throw new Error(`Native binding package version mismatch, expected 2.5.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
431
431
  }
432
432
  return binding
433
433
  } catch (e) {
@@ -443,8 +443,8 @@ function requireNative() {
443
443
  try {
444
444
  const binding = require('html-to-markdown-node-linux-ppc64-gnu')
445
445
  const bindingPackageVersion = require('html-to-markdown-node-linux-ppc64-gnu/package.json').version
446
- if (bindingPackageVersion !== '2.4.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
447
- throw new Error(`Native binding package version mismatch, expected 2.4.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
446
+ if (bindingPackageVersion !== '2.5.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
447
+ throw new Error(`Native binding package version mismatch, expected 2.5.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
448
448
  }
449
449
  return binding
450
450
  } catch (e) {
@@ -459,8 +459,8 @@ function requireNative() {
459
459
  try {
460
460
  const binding = require('html-to-markdown-node-linux-s390x-gnu')
461
461
  const bindingPackageVersion = require('html-to-markdown-node-linux-s390x-gnu/package.json').version
462
- if (bindingPackageVersion !== '2.4.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
463
- throw new Error(`Native binding package version mismatch, expected 2.4.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
462
+ if (bindingPackageVersion !== '2.5.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
463
+ throw new Error(`Native binding package version mismatch, expected 2.5.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
464
464
  }
465
465
  return binding
466
466
  } catch (e) {
@@ -479,8 +479,8 @@ function requireNative() {
479
479
  try {
480
480
  const binding = require('html-to-markdown-node-openharmony-arm64')
481
481
  const bindingPackageVersion = require('html-to-markdown-node-openharmony-arm64/package.json').version
482
- if (bindingPackageVersion !== '2.4.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
483
- throw new Error(`Native binding package version mismatch, expected 2.4.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
482
+ if (bindingPackageVersion !== '2.5.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
483
+ throw new Error(`Native binding package version mismatch, expected 2.5.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
484
484
  }
485
485
  return binding
486
486
  } catch (e) {
@@ -495,8 +495,8 @@ function requireNative() {
495
495
  try {
496
496
  const binding = require('html-to-markdown-node-openharmony-x64')
497
497
  const bindingPackageVersion = require('html-to-markdown-node-openharmony-x64/package.json').version
498
- if (bindingPackageVersion !== '2.4.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
499
- throw new Error(`Native binding package version mismatch, expected 2.4.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
498
+ if (bindingPackageVersion !== '2.5.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
499
+ throw new Error(`Native binding package version mismatch, expected 2.5.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
500
500
  }
501
501
  return binding
502
502
  } catch (e) {
@@ -511,8 +511,8 @@ function requireNative() {
511
511
  try {
512
512
  const binding = require('html-to-markdown-node-openharmony-arm')
513
513
  const bindingPackageVersion = require('html-to-markdown-node-openharmony-arm/package.json').version
514
- if (bindingPackageVersion !== '2.4.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
515
- throw new Error(`Native binding package version mismatch, expected 2.4.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
514
+ if (bindingPackageVersion !== '2.5.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
515
+ throw new Error(`Native binding package version mismatch, expected 2.5.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
516
516
  }
517
517
  return binding
518
518
  } catch (e) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "html-to-markdown-node",
3
- "version": "2.4.2",
3
+ "version": "2.5.0",
4
4
  "description": "High-performance HTML to Markdown converter - Node.js native bindings",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",