@xberg-io/html-to-markdown-wasm 3.10.4 → 3.10.5

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
@@ -101,11 +101,28 @@ pnpm add @xberg-io/html-to-markdown-wasm
101
101
 
102
102
  Basic conversion:
103
103
 
104
- <!-- snippet not found: getting-started/basic_usage.md -->
104
+ ```javascript
105
+ import { convert } from "@xberg-io/html-to-markdown-wasm";
106
+
107
+ const html = "<h1>Hello</h1><p>This is <strong>fast</strong>!</p>";
108
+ const result = convert(html);
109
+ const markdown = result.content;
110
+ console.log(markdown);
111
+ ```
105
112
 
106
113
  With conversion options:
107
114
 
108
- <!-- snippet not found: getting-started/with_options.md -->
115
+ ```javascript
116
+ import { convert, WasmConversionOptions, WasmHeadingStyle } from "@xberg-io/html-to-markdown-wasm";
117
+
118
+ const options = WasmConversionOptions.default();
119
+ options.headingStyle = WasmHeadingStyle.Atx;
120
+ options.skipImages = true;
121
+
122
+ const result = convert('<h1>Hello</h1><img src="pic.jpg">', options);
123
+ const markdown = result.content;
124
+ console.log(markdown);
125
+ ```
109
126
 
110
127
  ## Architecture
111
128
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xberg-io/html-to-markdown-wasm",
3
- "version": "3.10.4",
3
+ "version": "3.10.5",
4
4
  "private": false,
5
5
  "description": "High-performance HTML to Markdown converter",
6
6
  "license": "MIT",
@@ -101,11 +101,28 @@ pnpm add @xberg-io/html-to-markdown-wasm
101
101
 
102
102
  Basic conversion:
103
103
 
104
- <!-- snippet not found: getting-started/basic_usage.md -->
104
+ ```javascript
105
+ import { convert } from "@xberg-io/html-to-markdown-wasm";
106
+
107
+ const html = "<h1>Hello</h1><p>This is <strong>fast</strong>!</p>";
108
+ const result = convert(html);
109
+ const markdown = result.content;
110
+ console.log(markdown);
111
+ ```
105
112
 
106
113
  With conversion options:
107
114
 
108
- <!-- snippet not found: getting-started/with_options.md -->
115
+ ```javascript
116
+ import { convert, WasmConversionOptions, WasmHeadingStyle } from "@xberg-io/html-to-markdown-wasm";
117
+
118
+ const options = WasmConversionOptions.default();
119
+ options.headingStyle = WasmHeadingStyle.Atx;
120
+ options.skipImages = true;
121
+
122
+ const result = convert('<h1>Hello</h1><img src="pic.jpg">', options);
123
+ const markdown = result.content;
124
+ console.log(markdown);
125
+ ```
109
126
 
110
127
  ## Architecture
111
128
 
@@ -2,7 +2,7 @@
2
2
  "name": "html-to-markdown-wasm",
3
3
  "type": "module",
4
4
  "description": "High-performance HTML to Markdown converter",
5
- "version": "3.10.4",
5
+ "version": "3.10.5",
6
6
  "license": "MIT",
7
7
  "repository": {
8
8
  "type": "git",
@@ -101,11 +101,28 @@ pnpm add @xberg-io/html-to-markdown-wasm
101
101
 
102
102
  Basic conversion:
103
103
 
104
- <!-- snippet not found: getting-started/basic_usage.md -->
104
+ ```javascript
105
+ import { convert } from "@xberg-io/html-to-markdown-wasm";
106
+
107
+ const html = "<h1>Hello</h1><p>This is <strong>fast</strong>!</p>";
108
+ const result = convert(html);
109
+ const markdown = result.content;
110
+ console.log(markdown);
111
+ ```
105
112
 
106
113
  With conversion options:
107
114
 
108
- <!-- snippet not found: getting-started/with_options.md -->
115
+ ```javascript
116
+ import { convert, WasmConversionOptions, WasmHeadingStyle } from "@xberg-io/html-to-markdown-wasm";
117
+
118
+ const options = WasmConversionOptions.default();
119
+ options.headingStyle = WasmHeadingStyle.Atx;
120
+ options.skipImages = true;
121
+
122
+ const result = convert('<h1>Hello</h1><img src="pic.jpg">', options);
123
+ const markdown = result.content;
124
+ console.log(markdown);
125
+ ```
109
126
 
110
127
  ## Architecture
111
128
 
@@ -101,11 +101,28 @@ pnpm add @xberg-io/html-to-markdown-wasm
101
101
 
102
102
  Basic conversion:
103
103
 
104
- <!-- snippet not found: getting-started/basic_usage.md -->
104
+ ```javascript
105
+ import { convert } from "@xberg-io/html-to-markdown-wasm";
106
+
107
+ const html = "<h1>Hello</h1><p>This is <strong>fast</strong>!</p>";
108
+ const result = convert(html);
109
+ const markdown = result.content;
110
+ console.log(markdown);
111
+ ```
105
112
 
106
113
  With conversion options:
107
114
 
108
- <!-- snippet not found: getting-started/with_options.md -->
115
+ ```javascript
116
+ import { convert, WasmConversionOptions, WasmHeadingStyle } from "@xberg-io/html-to-markdown-wasm";
117
+
118
+ const options = WasmConversionOptions.default();
119
+ options.headingStyle = WasmHeadingStyle.Atx;
120
+ options.skipImages = true;
121
+
122
+ const result = convert('<h1>Hello</h1><img src="pic.jpg">', options);
123
+ const markdown = result.content;
124
+ console.log(markdown);
125
+ ```
109
126
 
110
127
  ## Architecture
111
128
 
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "html-to-markdown-wasm",
3
3
  "description": "High-performance HTML to Markdown converter",
4
- "version": "3.10.4",
4
+ "version": "3.10.5",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",
package/pkg/web/README.md CHANGED
@@ -101,11 +101,28 @@ pnpm add @xberg-io/html-to-markdown-wasm
101
101
 
102
102
  Basic conversion:
103
103
 
104
- <!-- snippet not found: getting-started/basic_usage.md -->
104
+ ```javascript
105
+ import { convert } from "@xberg-io/html-to-markdown-wasm";
106
+
107
+ const html = "<h1>Hello</h1><p>This is <strong>fast</strong>!</p>";
108
+ const result = convert(html);
109
+ const markdown = result.content;
110
+ console.log(markdown);
111
+ ```
105
112
 
106
113
  With conversion options:
107
114
 
108
- <!-- snippet not found: getting-started/with_options.md -->
115
+ ```javascript
116
+ import { convert, WasmConversionOptions, WasmHeadingStyle } from "@xberg-io/html-to-markdown-wasm";
117
+
118
+ const options = WasmConversionOptions.default();
119
+ options.headingStyle = WasmHeadingStyle.Atx;
120
+ options.skipImages = true;
121
+
122
+ const result = convert('<h1>Hello</h1><img src="pic.jpg">', options);
123
+ const markdown = result.content;
124
+ console.log(markdown);
125
+ ```
109
126
 
110
127
  ## Architecture
111
128
 
@@ -2,7 +2,7 @@
2
2
  "name": "html-to-markdown-wasm",
3
3
  "type": "module",
4
4
  "description": "High-performance HTML to Markdown converter",
5
- "version": "3.10.4",
5
+ "version": "3.10.5",
6
6
  "license": "MIT",
7
7
  "repository": {
8
8
  "type": "git",