Skip to content

Commit f9e249b

Browse files
committed
fix MiniWordHyperLink wrong word
1 parent 10d53a5 commit f9e249b

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/MiniWord/MiniWord.Implment.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -204,10 +204,10 @@ private static void ReplaceText(OpenXmlElement xmlElement, WordprocessingDocumen
204204
}
205205
t.Remove();
206206
}
207-
else if (tag.Value is MiniWorHyperLink)
207+
else if (tag.Value is MiniWordHyperLink)
208208
{
209209
var mainPart = docx.MainDocumentPart;
210-
var linkInfo = (MiniWorHyperLink)tag.Value;
210+
var linkInfo = (MiniWordHyperLink)tag.Value;
211211
var hyperlink = GetHyperLink(mainPart, linkInfo);
212212
run.Append(hyperlink);
213213
t.Remove();
@@ -255,7 +255,7 @@ private static void ReplaceText(OpenXmlElement xmlElement, WordprocessingDocumen
255255
}
256256
}
257257

258-
private static Hyperlink GetHyperLink(MainDocumentPart mainPart, MiniWorHyperLink linkInfo)
258+
private static Hyperlink GetHyperLink(MainDocumentPart mainPart, MiniWordHyperLink linkInfo)
259259
{
260260
var hr = mainPart.AddHyperlinkRelationship(new Uri(linkInfo.Url), true);
261261
Hyperlink xmlHyperLink = new Hyperlink(new RunProperties(

tests/MiniWordTests/IssueTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@ public void TestIssue5()
511511
var templatePath = PathHelper.GetFile("TestBasicFill.docx");
512512
var value = new Dictionary<string, object>()
513513
{
514-
["Name"] = new MiniWorHyperLink(){
514+
["Name"] = new MiniWordHyperLink(){
515515
Url = "https://google.com",
516516
Text = "測試連結!!"
517517
},
@@ -540,7 +540,7 @@ public void TestIssue5_new()
540540
var templatePath = PathHelper.GetFile("TestBasicFill.docx");
541541
var value = new
542542
{
543-
Name =new MiniWorHyperLink(){
543+
Name =new MiniWordHyperLink(){
544544
Url = "https://google.com",
545545
Text = "測試連結!!"
546546
},

0 commit comments

Comments
 (0)