parent
296ca1135a
commit
73488ef2d6
|
@ -1,8 +1,8 @@
|
||||||
use serde::ser::{SerializeStruct, Serializer};
|
use serde::ser::{SerializeStruct, Serializer};
|
||||||
use serde::Serialize;
|
use serde::Serialize;
|
||||||
|
|
||||||
use crate::documents::*;
|
|
||||||
use crate::xml_builder::*;
|
use crate::xml_builder::*;
|
||||||
|
use crate::{documents::*, escape};
|
||||||
|
|
||||||
#[derive(Serialize, Debug, Clone, PartialEq)]
|
#[derive(Serialize, Debug, Clone, PartialEq)]
|
||||||
pub struct Delete {
|
pub struct Delete {
|
||||||
|
@ -84,7 +84,7 @@ impl Delete {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn author(mut self, author: impl Into<String>) -> Delete {
|
pub fn author(mut self, author: impl Into<String>) -> Delete {
|
||||||
self.author = author.into();
|
self.author = escape::escape(&author.into());
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ use serde::Serialize;
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|
||||||
use crate::documents::{BuildXML, HistoryId, Run};
|
use crate::documents::{BuildXML, HistoryId, Run};
|
||||||
use crate::xml_builder::*;
|
use crate::{escape, xml_builder::*};
|
||||||
|
|
||||||
#[derive(Debug, Clone, PartialEq)]
|
#[derive(Debug, Clone, PartialEq)]
|
||||||
pub enum InsertChild {
|
pub enum InsertChild {
|
||||||
|
@ -127,7 +127,7 @@ impl Insert {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn author(mut self, author: impl Into<String>) -> Insert {
|
pub fn author(mut self, author: impl Into<String>) -> Insert {
|
||||||
self.author = author.into();
|
self.author = escape::escape(&author.into());
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "docx-wasm",
|
"name": "docx-wasm",
|
||||||
"version": "0.0.278-rc19",
|
"version": "0.0.278-rc20",
|
||||||
"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