anytomd 1.3.0 → 1.3.1

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
@@ -16,11 +16,11 @@ A pure Rust tool and library that converts various document formats into Markdow
16
16
 
17
17
  | Format | Extensions | Notes |
18
18
  |--------|-----------|-------|
19
- | DOCX | `.docx` | Headings, tables, lists, bold/italic, hyperlinks, images, text boxes |
20
- | PPTX | `.pptx` | Slides, tables, speaker notes, images, group shapes |
21
- | XLSX | `.xlsx` | Multi-sheet, date/time handling, images |
22
- | XLS | `.xls` | Legacy Excel (via calamine) |
23
- | HTML | `.html`, `.htm` | Full DOM: headings, tables, lists, links, blockquotes, code blocks |
19
+ | DOCX | `.docx` | Headings, tables (incl. merged/layout tables), lists, bold/italic, hyperlinks, images, text boxes |
20
+ | PPTX | `.pptx` | Slides, tables (incl. merged cells), speaker notes, images, group shapes |
21
+ | XLSX | `.xlsx` | Multi-sheet, date/time handling, images, single-pass table rendering |
22
+ | XLS | `.xls` | Legacy Excel (via calamine), single-pass table rendering |
23
+ | HTML | `.html`, `.htm` | Full DOM: headings, tables (incl. `colspan`/`rowspan`), lists, links, blockquotes, code blocks |
24
24
  | CSV | `.csv` | Converted to Markdown tables |
25
25
  | Jupyter Notebook | `.ipynb` | Markdown cells preserved, code cells in fenced blocks with language detection |
26
26
  | JSON | `.json` | Pretty-printed in fenced code blocks |
@@ -33,6 +33,8 @@ A pure Rust tool and library that converts various document formats into Markdow
33
33
 
34
34
  Format is auto-detected from magic bytes and file extension. ZIP-based formats (DOCX/PPTX/XLSX) are distinguished by inspecting internal archive structure.
35
35
 
36
+ Large XLSX/XLS sheets render Markdown and plain text together in one row pass. Workbook parsing still uses memory proportional to the worksheet, but conversion does not build a second full cell matrix before producing output.
37
+
36
38
  ## Conversion Examples
37
39
 
38
40
  ### CSV
@@ -117,6 +119,30 @@ Data Overview
117
119
  > Note: Test multilingual rendering.
118
120
  ```
119
121
 
122
+ ### Tables and merged cells
123
+
124
+ Every table — plain, merged, or used for page layout — becomes a single
125
+ pipe-delimited Markdown table of the table's true column count. Merged cells
126
+ (`gridSpan`/`vMerge` in DOCX, `colspan`/`rowspan` in HTML) are handled so no
127
+ content is lost:
128
+
129
+ - a horizontally spanned cell puts its text in the first column it covers and
130
+ leaves the spanned-over columns empty (empty-fill);
131
+ - a vertically merged (continuation) cell is left blank;
132
+ - a full-width row (a single cell spanning every column) is kept as a normal
133
+ grid row, empty-filled to the table width — it is **not** turned into a heading
134
+ or a `**Label:** value` line.
135
+
136
+ This is deliberately uniform: keeping a merged/layout table as one table (rather
137
+ than splitting it into headings and field lines) gives downstream consumers,
138
+ especially LLMs, a consistent structure. The one exception is a table that
139
+ contains a **nested table** — a nested table cannot live inside a single Markdown
140
+ cell, so such a table is linearized and each cell's text and nested table are
141
+ emitted as standalone blocks.
142
+
143
+ PPTX tables are likewise rendered as Markdown tables; merged cells keep the
144
+ correct column count and the spanning cell's text is not duplicated.
145
+
120
146
  ## Installation
121
147
 
122
148
  ### Rust (Cargo)
package/anytomd_bg.js CHANGED
@@ -216,7 +216,7 @@ export function __wbg_new_typed_893dbec5fe999814(arg0, arg1) {
216
216
  const a = state0.a;
217
217
  state0.a = 0;
218
218
  try {
219
- return wasm_bindgen__convert__closures_____invoke__h7494129768ec66af(a, state0.b, arg0, arg1);
219
+ return wasm_bindgen_33c3f992c135746b___convert__closures_____invoke___js_sys_74fce3adb247d89d___Function_fn_wasm_bindgen_33c3f992c135746b___JsValue_____wasm_bindgen_33c3f992c135746b___sys__Undefined___js_sys_74fce3adb247d89d___Function_fn_wasm_bindgen_33c3f992c135746b___JsValue_____wasm_bindgen_33c3f992c135746b___sys__Undefined______(a, state0.b, arg0, arg1);
220
220
  } finally {
221
221
  state0.a = a;
222
222
  }
@@ -335,13 +335,13 @@ export function __wbg_value_414b42ce7b3eca22(arg0) {
335
335
  return ret;
336
336
  }
337
337
  export function __wbindgen_cast_0000000000000001(arg0, arg1) {
338
- // Cast intrinsic for `Closure(Closure { dtor_idx: 186, function: Function { arguments: [], shim_idx: 187, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
339
- const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h850abdac2a8bb899, wasm_bindgen__convert__closures_____invoke__hb3e5b98b70c862a0);
338
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 203, function: Function { arguments: [], shim_idx: 204, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
339
+ const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen_33c3f992c135746b___closure__destroy___dyn_core_9b3796e30d99ddb7___ops__function__FnMut_____Output_______, wasm_bindgen_33c3f992c135746b___convert__closures_____invoke______);
340
340
  return ret;
341
341
  }
342
342
  export function __wbindgen_cast_0000000000000002(arg0, arg1) {
343
- // Cast intrinsic for `Closure(Closure { dtor_idx: 210, function: Function { arguments: [Externref], shim_idx: 211, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
344
- const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h173270a6c0ad11e0, wasm_bindgen__convert__closures_____invoke__hbd82b7fcffec40e2);
343
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 224, function: Function { arguments: [Externref], shim_idx: 225, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
344
+ const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen_33c3f992c135746b___closure__destroy___dyn_core_9b3796e30d99ddb7___ops__function__FnMut__wasm_bindgen_33c3f992c135746b___JsValue____Output___core_9b3796e30d99ddb7___result__Result_____wasm_bindgen_33c3f992c135746b___JsError___, wasm_bindgen_33c3f992c135746b___convert__closures_____invoke___wasm_bindgen_33c3f992c135746b___JsValue__core_9b3796e30d99ddb7___result__Result_____wasm_bindgen_33c3f992c135746b___JsError__);
345
345
  return ret;
346
346
  }
347
347
  export function __wbindgen_cast_0000000000000003(arg0, arg1) {
@@ -358,19 +358,19 @@ export function __wbindgen_init_externref_table() {
358
358
  table.set(offset + 2, true);
359
359
  table.set(offset + 3, false);
360
360
  }
361
- function wasm_bindgen__convert__closures_____invoke__hb3e5b98b70c862a0(arg0, arg1) {
362
- wasm.wasm_bindgen__convert__closures_____invoke__hb3e5b98b70c862a0(arg0, arg1);
361
+ function wasm_bindgen_33c3f992c135746b___convert__closures_____invoke______(arg0, arg1) {
362
+ wasm.wasm_bindgen_33c3f992c135746b___convert__closures_____invoke______(arg0, arg1);
363
363
  }
364
364
 
365
- function wasm_bindgen__convert__closures_____invoke__hbd82b7fcffec40e2(arg0, arg1, arg2) {
366
- const ret = wasm.wasm_bindgen__convert__closures_____invoke__hbd82b7fcffec40e2(arg0, arg1, arg2);
365
+ function wasm_bindgen_33c3f992c135746b___convert__closures_____invoke___wasm_bindgen_33c3f992c135746b___JsValue__core_9b3796e30d99ddb7___result__Result_____wasm_bindgen_33c3f992c135746b___JsError__(arg0, arg1, arg2) {
366
+ const ret = wasm.wasm_bindgen_33c3f992c135746b___convert__closures_____invoke___wasm_bindgen_33c3f992c135746b___JsValue__core_9b3796e30d99ddb7___result__Result_____wasm_bindgen_33c3f992c135746b___JsError__(arg0, arg1, arg2);
367
367
  if (ret[1]) {
368
368
  throw takeFromExternrefTable0(ret[0]);
369
369
  }
370
370
  }
371
371
 
372
- function wasm_bindgen__convert__closures_____invoke__h7494129768ec66af(arg0, arg1, arg2, arg3) {
373
- wasm.wasm_bindgen__convert__closures_____invoke__h7494129768ec66af(arg0, arg1, arg2, arg3);
372
+ function wasm_bindgen_33c3f992c135746b___convert__closures_____invoke___js_sys_74fce3adb247d89d___Function_fn_wasm_bindgen_33c3f992c135746b___JsValue_____wasm_bindgen_33c3f992c135746b___sys__Undefined___js_sys_74fce3adb247d89d___Function_fn_wasm_bindgen_33c3f992c135746b___JsValue_____wasm_bindgen_33c3f992c135746b___sys__Undefined______(arg0, arg1, arg2, arg3) {
373
+ wasm.wasm_bindgen_33c3f992c135746b___convert__closures_____invoke___js_sys_74fce3adb247d89d___Function_fn_wasm_bindgen_33c3f992c135746b___JsValue_____wasm_bindgen_33c3f992c135746b___sys__Undefined___js_sys_74fce3adb247d89d___Function_fn_wasm_bindgen_33c3f992c135746b___JsValue_____wasm_bindgen_33c3f992c135746b___sys__Undefined______(arg0, arg1, arg2, arg3);
374
374
  }
375
375
 
376
376
 
package/anytomd_bg.wasm CHANGED
Binary file
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "anytomd",
3
3
  "type": "module",
4
4
  "description": "Pure Rust library that converts various document formats into Markdown",
5
- "version": "1.3.0",
5
+ "version": "1.3.1",
6
6
  "license": "Apache-2.0",
7
7
  "repository": {
8
8
  "type": "git",