From 85bafb3eefa929a6d31edfb940d4407f67ad48b1 Mon Sep 17 00:00:00 2001 From: AdaEniac Date: Sat, 23 Jul 2022 15:03:04 +0800 Subject: [PATCH 1/2] Update hyperlink.ts ExternalHyperlink extends XmlComponent --- src/file/paragraph/links/hyperlink.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/file/paragraph/links/hyperlink.ts b/src/file/paragraph/links/hyperlink.ts index 23f7b10219..d6fe5e73b0 100644 --- a/src/file/paragraph/links/hyperlink.ts +++ b/src/file/paragraph/links/hyperlink.ts @@ -38,6 +38,9 @@ export class InternalHyperlink extends ConcreteHyperlink { } } -export class ExternalHyperlink { - constructor(public readonly options: { readonly children: ParagraphChild[]; readonly link: string }) {} +export class ExternalHyperlink extends XmlComponent { + constructor(public readonly options: { readonly children: ParagraphChild[]; readonly link: string }) + { + super("w:externalHyperlink"); + } } From ba4dc2ed540e6c7617fa47004f9dcb1ff045eea7 Mon Sep 17 00:00:00 2001 From: Dolan Miu Date: Thu, 25 Aug 2022 01:40:14 +0100 Subject: [PATCH 2/2] Fix formatting --- src/file/paragraph/links/hyperlink.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/file/paragraph/links/hyperlink.ts b/src/file/paragraph/links/hyperlink.ts index d6fe5e73b0..a3e6697bd6 100644 --- a/src/file/paragraph/links/hyperlink.ts +++ b/src/file/paragraph/links/hyperlink.ts @@ -39,8 +39,7 @@ export class InternalHyperlink extends ConcreteHyperlink { } export class ExternalHyperlink extends XmlComponent { - constructor(public readonly options: { readonly children: ParagraphChild[]; readonly link: string }) - { + constructor(public readonly options: { readonly children: ParagraphChild[]; readonly link: string }) { super("w:externalHyperlink"); } }