bokuweb / docx-rs

:memo: A .docx file writer with Rust/WebAssembly.
https://bokuweb.github.io/docx-rs/
MIT License
323 stars 56 forks source link

ToC with hyperlinks #731

Closed git-noise closed 2 weeks ago

git-noise commented 2 weeks ago

Describe the bug

It seems that ToC with hyperlinks do not actually show any hyperlinks

Reproduced step

Steps to reproduce the behavior:

  1. Run the ToC with hyperlink example:
    cargo run --example toc_with_hyperlink
  2. Open/inspect the document: it does not seem to contain any hyperlinks

Expected behavior

We would expect some hyperlink being built.

Actual behavior

The document does not seem to contain any hyperlink within the ToC.

git-noise commented 2 weeks ago

Actually, I found the reason, the example would need to be used in conjunction with something like .add_item() or .auto() to be populated with links.