* update

* fix: table comment

* 0.2.5

* 0.0.90
main
bokuweb 2020-08-14 02:11:20 +09:00 committed by GitHub
parent 7db426a132
commit 48142fbced
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 22 additions and 4 deletions

4
Cargo.lock generated
View File

@ -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)",
]

View File

@ -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"

View File

@ -273,7 +273,25 @@ impl Docx {
TableCellContent::Paragraph(paragraph) => {
for child in &paragraph.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);
}
}
}
}

View File

@ -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>",