Fix header footer rels order (#695)

* fix: header footer resls order

* fix
main
bokuweb 2024-03-29 16:03:13 +09:00 committed by GitHub
parent 666c950484
commit 4c64e9ba82
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 5 deletions

View File

@ -951,7 +951,7 @@ impl Docx {
header_images[0] = images; header_images[0] = images;
} }
if let Some(header) = &mut self.document.section_property.even_header.as_mut() { if let Some(header) = &mut self.document.section_property.first_header.as_mut() {
let mut images: Vec<ImageIdAndPath> = vec![]; let mut images: Vec<ImageIdAndPath> = vec![];
for child in header.children.iter_mut() { for child in header.children.iter_mut() {
match child { match child {
@ -997,7 +997,7 @@ impl Docx {
header_images[1] = images; header_images[1] = images;
} }
if let Some(header) = &mut self.document.section_property.first_header.as_mut() { if let Some(header) = &mut self.document.section_property.even_header.as_mut() {
let mut images: Vec<ImageIdAndPath> = vec![]; let mut images: Vec<ImageIdAndPath> = vec![];
for child in header.children.iter_mut() { for child in header.children.iter_mut() {
match child { match child {
@ -1096,7 +1096,7 @@ impl Docx {
footer_images[0] = images; footer_images[0] = images;
} }
if let Some(footer) = &mut self.document.section_property.even_footer.as_mut() { if let Some(footer) = &mut self.document.section_property.first_footer.as_mut() {
let mut images: Vec<ImageIdAndPath> = vec![]; let mut images: Vec<ImageIdAndPath> = vec![];
for child in footer.children.iter_mut() { for child in footer.children.iter_mut() {
match child { match child {
@ -1142,7 +1142,7 @@ impl Docx {
footer_images[1] = images; footer_images[1] = images;
} }
if let Some(footer) = &mut self.document.section_property.first_footer.as_mut() { if let Some(footer) = &mut self.document.section_property.even_footer.as_mut() {
let mut images: Vec<ImageIdAndPath> = vec![]; let mut images: Vec<ImageIdAndPath> = vec![];
for child in footer.children.iter_mut() { for child in footer.children.iter_mut() {
match child { match child {

View File

@ -1,6 +1,6 @@
{ {
"name": "docx-wasm", "name": "docx-wasm",
"version": "0.4.12-beta17", "version": "0.4.12-beta19",
"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>",