use hexColorValue in borders and underlines
This commit is contained in:
@ -43,7 +43,7 @@ describe("SymbolRun", () => {
|
||||
italics: true,
|
||||
bold: true,
|
||||
underline: {
|
||||
color: "red",
|
||||
color: "ff0000",
|
||||
type: UnderlineType.DOUBLE,
|
||||
},
|
||||
emphasisMark: {
|
||||
@ -63,7 +63,7 @@ describe("SymbolRun", () => {
|
||||
{ "w:bCs": { _attr: { "w:val": true } } },
|
||||
{ "w:i": { _attr: { "w:val": true } } },
|
||||
{ "w:iCs": { _attr: { "w:val": true } } },
|
||||
{ "w:u": { _attr: { "w:val": "double", "w:color": "red" } } },
|
||||
{ "w:u": { _attr: { "w:val": "double", "w:color": "ff0000" } } },
|
||||
{ "w:em": { _attr: { "w:val": "dot" } } },
|
||||
{ "w:color": { _attr: { "w:val": "00FF00" } } },
|
||||
{ "w:sz": { _attr: { "w:val": 40 } } },
|
||||
|
@ -1,3 +1,4 @@
|
||||
import { hexColorValue } from "file/values";
|
||||
import { Attributes, XmlComponent } from "file/xml-components";
|
||||
|
||||
export enum UnderlineType {
|
||||
@ -26,7 +27,7 @@ export abstract class BaseUnderline extends XmlComponent {
|
||||
this.root.push(
|
||||
new Attributes({
|
||||
val: underlineType,
|
||||
color: color,
|
||||
color: color === undefined ? color : hexColorValue(color),
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user