Skip to content

Commit 48142fb

Browse files
authored
0.0.90 (#118)
* update * fix: table comment * 0.2.5 * 0.0.90
1 parent 7db426a commit 48142fb

File tree

4 files changed

+22
-4
lines changed

4 files changed

+22
-4
lines changed

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docx-core/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "docx-rs"
3-
version = "0.2.3"
3+
version = "0.2.5"
44
authors = ["bokuweb <bokuweb12@gmail.com>"]
55
repository = "https://github.com/bokuweb/docx-rs"
66
edition = "2018"

docx-core/src/documents/mod.rs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,25 @@ impl Docx {
273273
TableCellContent::Paragraph(paragraph) => {
274274
for child in &paragraph.children {
275275
if let ParagraphChild::CommentStart(c) = child {
276+
let comment = c.comment();
277+
let para_id = comment.paragraph.id.clone();
276278
comments.push(c.comment());
279+
let comment_extended =
280+
CommentExtended::new(para_id);
281+
if let Some(parent_comment_id) =
282+
comment.parent_comment_id
283+
{
284+
let parent_para_id = comment_map
285+
.get(&parent_comment_id)
286+
.unwrap()
287+
.clone();
288+
comments_extended.push(
289+
comment_extended
290+
.parent_paragraph_id(parent_para_id),
291+
);
292+
} else {
293+
comments_extended.push(comment_extended);
294+
}
277295
}
278296
}
279297
}

docx-wasm/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "docx-wasm",
3-
"version": "0.0.87",
3+
"version": "0.0.90",
44
"main": "dist/node/index.js",
55
"browser": "dist/web/index.js",
66
"author": "bokuweb <bokuweb12@gmail.com>",

0 commit comments

Comments
 (0)