Remove invalid 'w:shdCs' element
This commit is contained in:
@ -200,15 +200,3 @@ export class Shading extends XmlComponent {
|
||||
}
|
||||
}
|
||||
|
||||
export class ShadowComplexScript extends XmlComponent {
|
||||
constructor(value: string, fill: string, color: string) {
|
||||
super("w:shdCs");
|
||||
this.root.push(
|
||||
new Attributes({
|
||||
val: value,
|
||||
fill: fill,
|
||||
color: color,
|
||||
}),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -16,7 +16,6 @@ import {
|
||||
ItalicsComplexScript,
|
||||
RightToLeft,
|
||||
Shading,
|
||||
ShadowComplexScript,
|
||||
Size,
|
||||
SizeComplexScript,
|
||||
SmallCaps,
|
||||
@ -63,7 +62,6 @@ export interface IRunStylePropertiesOptions {
|
||||
readonly fill: string;
|
||||
readonly color: string;
|
||||
};
|
||||
readonly shadingComplexScript?: boolean | IRunStylePropertiesOptions["shading"];
|
||||
readonly shadow?: IRunStylePropertiesOptions["shading"];
|
||||
readonly emboss?: boolean;
|
||||
readonly imprint?: boolean;
|
||||
@ -185,11 +183,6 @@ export class RunProperties extends IgnoreIfEmptyXmlComponent {
|
||||
if (shading) {
|
||||
this.push(new Shading(shading.type, shading.fill, shading.color));
|
||||
}
|
||||
const shdCs =
|
||||
options.shadingComplexScript === undefined || options.shadingComplexScript === true ? shading : options.shadingComplexScript;
|
||||
if (shdCs) {
|
||||
this.push(new ShadowComplexScript(shdCs.type, shdCs.fill, shdCs.color));
|
||||
}
|
||||
}
|
||||
|
||||
public push(item: XmlComponent): void {
|
||||
|
@ -245,15 +245,6 @@ describe("Run", () => {
|
||||
{
|
||||
"w:rPr": [
|
||||
{ "w:shd": { _attr: { "w:val": "pct10", "w:fill": "00FFFF", "w:color": "FF0000" } } },
|
||||
{
|
||||
"w:shdCs": {
|
||||
_attr: {
|
||||
"w:val": "pct10",
|
||||
"w:fill": "00FFFF",
|
||||
"w:color": "FF0000",
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
|
Reference in New Issue
Block a user