bokuweb / docx-rs

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

Add Support for Parsing Lists #654

Closed mridul262 closed 10 months ago

mridul262 commented 11 months ago

What does this change?

Made the numbering structs public, to be able to parse lists in docx files using the docx-rs api, without generating to json.

References

Screenshots

If applicable, add screenshots to help explain your changes.

What can I check for bug fixes?

Please briefly describe how you can confirm the resolution of the bug.

mridul262 commented 11 months ago

@bokuweb thanks for this library! I've been using this library to parse word documents in rust and while trying to parse lists I noticed that these structs were set to private, so the only way to parse lists and determine whether they are bullets or numbered lists, as well as the type of list is to parse the json. Since it'd be much easier and efficient to parse directly in Rust, have opened the PR