fix (#650)
parent
73488ef2d6
commit
0164501088
|
@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
|
|||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
|
||||
## docx-wasm@0.0.278-rc23 (21. Aug, 2023)
|
||||
|
||||
- escape author in del/ins.
|
||||
|
||||
## docx-wasm@0.0.278-rc19 (9. Aug, 2023)
|
||||
|
||||
- use i32 for line instead of u32.
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
use serde::Serialize;
|
||||
|
||||
use crate::documents::*;
|
||||
use crate::escape;
|
||||
use crate::xml_builder::*;
|
||||
|
||||
#[derive(Serialize, Debug, Clone, PartialEq)]
|
||||
|
@ -34,7 +35,7 @@ impl ParagraphPropertyChange {
|
|||
}
|
||||
|
||||
pub fn author(mut self, author: impl Into<String>) -> ParagraphPropertyChange {
|
||||
self.author = author.into();
|
||||
self.author = escape::escape(&author.into());
|
||||
self
|
||||
}
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
use serde::ser::{SerializeStruct, Serializer};
|
||||
use serde::Serialize;
|
||||
|
||||
use crate::documents::*;
|
||||
use crate::types::*;
|
||||
use crate::xml_builder::*;
|
||||
use crate::{documents::*, escape};
|
||||
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
pub enum TocContent {
|
||||
|
@ -97,7 +97,7 @@ impl TableOfContents {
|
|||
|
||||
pub fn delete(mut self, author: impl Into<String>, date: impl Into<String>) -> Self {
|
||||
self.delete = Some(TableOfContentsReviewData {
|
||||
author: author.into(),
|
||||
author: escape::escape(&author.into()),
|
||||
date: date.into(),
|
||||
});
|
||||
self
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "docx-wasm",
|
||||
"version": "0.0.278-rc20",
|
||||
"version": "0.0.278-rc23",
|
||||
"main": "dist/node/index.js",
|
||||
"browser": "dist/web/index.js",
|
||||
"author": "bokuweb <bokuweb12@gmail.com>",
|
||||
|
|
|
@ -19,12 +19,12 @@ impl Delete {
|
|||
#[wasm_bindgen]
|
||||
impl Delete {
|
||||
pub fn author(mut self, author: String) -> Delete {
|
||||
self.0.author = author;
|
||||
self.0 = self.0.author(author);
|
||||
self
|
||||
}
|
||||
|
||||
pub fn date(mut self, date: String) -> Delete {
|
||||
self.0.date = date;
|
||||
self.0 = self.0.date(date);
|
||||
self
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,12 +19,12 @@ impl Insert {
|
|||
#[wasm_bindgen]
|
||||
impl Insert {
|
||||
pub fn author(mut self, author: String) -> Insert {
|
||||
self.0.author = author;
|
||||
self.0 = self.0.author(author);
|
||||
self
|
||||
}
|
||||
|
||||
pub fn date(mut self, date: String) -> Insert {
|
||||
self.0.date = date;
|
||||
self.0 = self.0.date(date);
|
||||
self
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue