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