parent
7db426a132
commit
48142fbced
|
@ -171,7 +171,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
|
||||
[[package]]
|
||||
name = "docx-rs"
|
||||
version = "0.2.3"
|
||||
version = "0.2.5"
|
||||
dependencies = [
|
||||
"image 0.23.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"insta 0.16.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -188,7 +188,7 @@ dependencies = [
|
|||
name = "docx-wasm"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"docx-rs 0.2.3",
|
||||
"docx-rs 0.2.5",
|
||||
"wasm-bindgen 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"wasm-bindgen-test 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "docx-rs"
|
||||
version = "0.2.3"
|
||||
version = "0.2.5"
|
||||
authors = ["bokuweb <bokuweb12@gmail.com>"]
|
||||
repository = "https://github.com/bokuweb/docx-rs"
|
||||
edition = "2018"
|
||||
|
|
|
@ -273,7 +273,25 @@ impl Docx {
|
|||
TableCellContent::Paragraph(paragraph) => {
|
||||
for child in ¶graph.children {
|
||||
if let ParagraphChild::CommentStart(c) = child {
|
||||
let comment = c.comment();
|
||||
let para_id = comment.paragraph.id.clone();
|
||||
comments.push(c.comment());
|
||||
let comment_extended =
|
||||
CommentExtended::new(para_id);
|
||||
if let Some(parent_comment_id) =
|
||||
comment.parent_comment_id
|
||||
{
|
||||
let parent_para_id = comment_map
|
||||
.get(&parent_comment_id)
|
||||
.unwrap()
|
||||
.clone();
|
||||
comments_extended.push(
|
||||
comment_extended
|
||||
.parent_paragraph_id(parent_para_id),
|
||||
);
|
||||
} else {
|
||||
comments_extended.push(comment_extended);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "docx-wasm",
|
||||
"version": "0.0.87",
|
||||
"version": "0.0.90",
|
||||
"main": "dist/node/index.js",
|
||||
"browser": "dist/web/index.js",
|
||||
"author": "bokuweb <bokuweb12@gmail.com>",
|
||||
|
|
Loading…
Reference in New Issue