Skip to content

Commit 62785b6

Browse files
authored
Merge pull request #27 from contentstack/fix/DX-3131
Fix: Used the title and target attributes in the a tag
2 parents dc12615 + 342722b commit 62785b6

File tree

7 files changed

+51
-26
lines changed

7 files changed

+51
-26
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
### Version: 1.0.6
2+
#### Date: June-09-2025
3+
- Used 'title' and 'target' in a tags
14

25
### Version: 1.0.5
36
#### Date: Oct-10-2024

Contentstack.Utils.Tests/Constants/JsonToHtmlConstants.cs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,13 @@ public static class JsonToHtmlResultConstants
1616
public const string kTableHtml = "<table><thead><tr><th><p>Header 1</p></th><th><p>Header 2</p></th></tr></thead><tbody><tr><td><p>Body row 1 data 1</p></td><td><p>Body row 1 data 2</p></td></tr><tr><td><p>Body row 2 data 1</p></td><td><p>Body row 2 data 2</p></td></tr></tbody></table>";
1717
public const string kBlockquoteHtml = "<blockquote>Praesent eu ex sed nibh venenatis pretium.</blockquote>";
1818
public const string kCodeHtml = "<code>Code template.</code>";
19-
public const string kLinkInPHtml = "<p style=\"text-align:left;\"><strong><em><u><sub></sub></u></em></strong><a href=\"LINK.com\">LINK</a></p>";
20-
public const string kLinkInPMailToHtml = "<p style=\"text-align:left;\"><strong><em><u><sub></sub></u></em></strong><a href=\"mailto:support@contentstack.com\">LINK</a></p>";
19+
public const string kLinkInPHtml = "<p style=\"text-align:left;\"><strong><em><u><sub></sub></u></em></strong><a href=\"LINK.com\" target=\"_self\" title=\"\" >LINK</a></p>";
20+
public const string kLinkInPMailToHtml = "<p style=\"text-align:left;\"><strong><em><u><sub></sub></u></em></strong><a href=\"mailto:support@contentstack.com\" target=\"_self\" title=\"\" >LINK</a></p>";
2121
public const string kLinkInPMailToTARGEtHtml = "<p style=\"text-align:left;\"><strong><em><u><sub></sub></u></em></strong><a href=\"mailto:support@contentstack.com\" target=\"_self\">LINK</a></p>";
2222
public const string kEmbedHtml = "<iframe src=\"https://www.youtube.com/watch?v=AOP0yARiW8U\"></iframe>";
23-
public const string stringClassIdResult = "<p><span id=\"i3\">This</span> is a <span class=\"c1\" id=\"i1\">text</span> to be <span class=\"c2\">ignored</span></p>" ;
23+
public const string stringClassIdResult = "<p><span id=\"i3\">This</span> is a <span class=\"c1\" id=\"i1\">text</span> to be <span class=\"c2\">ignored</span></p>";
24+
public const string kJSONRTEResult = "<p><strong>demoText</strong><u> is</u><em> demoText</em></p><p><em><sub>This</sub></em><em> </em><em><sup>is</sup></em><em> </em><em><strike>same </strike></em></p><p><strike><span>demoText2</span></strike></p><p><strike><span>demoText3</span></strike>demoText4</p><p>demoText3<a href=\"https://www.google.com/\" target=\"_blank\" title=\"demoText5\" >demoText2</a></p>";
25+
2426
}
2527

2628
public static class JsonToHtmlConstants
@@ -48,15 +50,15 @@ public static class JsonToHtmlConstants
4850
public const string kEntryReferenceLinkJson = "{ \"uid\":\"06e34a7 5e4 e549d\", \"_version\":1, \"attrs\":{ }, \"children\":[{\"uid\":\"7626ea98e0e95d602210\",\"type\":\"reference\",\"attrs\":{\"target\":\"_self\",\"href\":\"/copy-of-entry-final-02\",\"display-type\":\"link\",\"entry-uid\":\"UID_08\",\"content-type-uid\":\"embeddedrte\",\"locale\":\"en-us\",\"type\":\"entry\",\"class-name\":\"embedded-entry\"},\"children\":[{\"text\":\"/copy-of-entry-final-02\"}]}],\"type\":\"doc\"}";
4951
public const string kEntryReferenceInlineJson = "{ \"uid\":\"06e34a7 5e4 e549d\", \"_version\":1, \"attrs\":{ }, \"children\":[{\"uid\":\"506 4878f3f46 s21f0cbc aff\",\"type\":\"reference\",\"attrs\":{\"display-type\":\"inline\",\"entry-uid\":\"UID_09\",\"content-type-uid\":\"embeddedrte\",\"locale\":\"en-us\",\"type\":\"entry\",\"class-name\":\"embedded-entry\"},\"children\":[{\"text\":\"\"}]}],\"type\":\"doc\"}";
5052
public const string kHRJson = "{ \"uid\":\"06e34a7 5e4 e549d\", \"_version\":1, \"attrs\":{ }, \"children\":[{\"uid\":\"f5a7b57 40a8a5c3 576828276b\",\"type\":\"hr\",\"children\":[{\"text\":\"\"}],\"attrs\":{ }}],\"type\":\"doc\"}";
51-
public const string classId = "{ \"uid\":\"06e34a7 5e4 e549d\", \"_version\":1, \"attrs\":{ }, \"children\":[{\"uid\":\"f5a7b57 40a8a5c3 576828276b\",\"type\":\"doc\",\"children\":[{\"text\":\"Thorisbest\",\"classname\": \"c2\",\"id\": \"i2\"}],\"attrs\":{ }}],\"type\":\"text\"}";
53+
public const string classId = "{ \"uid\":\"06e34a7 5e4 e549d\", \"_version\":1, \"attrs\":{ }, \"children\":[{\"uid\":\"f5a7b57 40a8a5c3 576828276b\",\"type\":\"doc\",\"children\":[{\"text\":\"demoTextisdemoText\",\"classname\": \"c2\",\"id\": \"i2\"}],\"attrs\":{ }}],\"type\":\"text\"}";
5254
public const string stringClassId = "{ \"type\": \"doc\", \"attrs\": {}, \"uid\": \"8622288a91dc4c76985d776d2540b395\", \"children\": [ { \"type\": \"p\", \"uid\": \"396ee25abd0f4296a45eac63809450ef\", \"attrs\": {}, \"children\": [ { \"text\": \"This\", \"classname\": \"\", \"id\": \"i3\" }, { \"text\": \" is a \" }, { \"text\": \"text\", \"classname\": \"c1\", \"id\": \"i1\" }, { \"text\": \" to be \" }, { \"text\": \"ignored\", \"classname\": \"c2\", \"id\": \"\" } ] } ], \"_version\": 4 }";
5355
public const string KAssetNode = "\"embedded_itemsConnection\": { \"edges\": [{ \"node\": { \"system\": { \"content_type_uid\": \"sys_assets\", \"uid\": \"UID_12\" }, \"created_at\": \"2020-08-19T09:13:32.785Z\", \"updated_at\": \"2020-08-19T09:13:32.785Z\", \"created_by\": \"Created_at\", \"updated_by\": \"Created_at\", \"content_type\": \"application/pdf\", \"file_size\": \"13264\", \"filename\": \"dummy.pdf\", \"url\":\"/v3/assetsUID_12/dummy.pdf\", \"_version\": 1, \"title\": \"dummy.pdf\" } } ]}";
5456
public const string KEntryBlocNode = "\"embedded_itemsConnection\": { \"edges\": [{ \"node\": { \"title\": \"Update this title\", \"url\": \"\", \"locale\": \"en-us\", \"system\": { \"uid\": \"UID_07\", \"content_type_uid\": \"content_block\" }, \"_version\": 5, \"_in_progress\": false, \"multi_line\": \"\", \"rich_text_editor\": \"\" } } ]}";
5557
public const string KEntryLinkNode = "\"embedded_itemsConnection\": { \"edges\": [{ \"node\": { \"title\": \"Entry with embedded entry\", \"rich_text_editor\": [ \"\" ], \"locale\": \"en-us\", \"system\": { \"uid\": \"UID_08\", \"content_type_uid\": \"embeddedrte\" }, \"_in_progress\": false } } ]}";
5658
public const string KEntryInlineNode = "\"embedded_itemsConnection\": { \"edges\": [{ \"node\": { \"title\": \"updated title\", \"rich_text_editor\": [ \"\" ], \"locale\": \"en-us\", \"system\": { \"uid\": \"UID_09\", \"content_type_uid\": \"embeddedrte\", }, \"_in_progress\": false } } ]}";
5759
public static string KGQLModel(string node, string embedConnection = null)
5860
{
59-
return $"{{\"multiplerte\":{{\"json\":[{node}]{(embedConnection != null ? ","+embedConnection : "")} }}, \"singlerte\":{{\"json\":{node}{(embedConnection != null ? "," + embedConnection : "")}}} }}";
61+
return $"{{\"multiplerte\":{{\"json\":[{node}]{(embedConnection != null ? "," + embedConnection : "")} }}, \"singlerte\":{{\"json\":{node}{(embedConnection != null ? "," + embedConnection : "")}}} }}";
6062
}
6163

6264
public const string kAssetMeta = "{\"uid\":\"asset_uid\",\"created_by\":\"create_by\",\"updated_by\":\"update_by\",\"content_type\":\"image/jpeg\",\"file_size\":\"62181\",\"tags\":[],\"filename\":\"crop_area.jpeg\",\"url\":\"http://image.contenstack.com/crop_area.jpeg\",\"is_dir\":false,\"parent_uid\":null,\"path\":[],\"_version\":1,\"title\":\"crop_area.jpeg\",\"dimension\":{\"height\":712,\"width\":864},\"_metadata\":{\"extensions\":{\"extension_uid\":{\"local_metadata\":{\"local_data\":\"main\",\"presets\":[{\"uid\":\"preset_01\",\"name\":\"Local Preset\",\"options\":{\"transform\":{\"height\":500,\"width\":500,\"flip-mode\":\"horiz\",\"rotate\":40},\"focal-point\":{\"x\":-0.668935003427432,\"y\":-0.9220385351936531},\"quality\":\"100\",\"image-type\":\"jpeg\"}},{\"uid\":\"preset_02\",\"name\":\"WithCrop\",\"options\":{\"quality\":\"100\",\"transform\":{\"height\":\"569.6\",\"width\":\"569.6\",\"flip-mode\":\"both\"},\"image-type\":\"jpeg\",\"crop\":{\"height\":\"569.6\",\"width\":\"569.6\",\"x\":\"147.2\",\"y\":\"71.2\"}}},{\"uid\":\"preset_03\",\"name\":\"Filter\",\"options\":{\"quality\":\"100\",\"transform\":{\"height\":712,\"width\":864},\"image-type\":\"jpeg\",\"effects\":{\"brightness\":52,\"contrast\":15,\"saturate\":-30,\"blur\":16,\"sharpen\":{\"amount\":9,\"radius\":669,\"threshold\":207}}}}]},\"global_metadata\":{\"presets\":[{\"uid\":\"preset_04\",\"name\":\"Global Preset\",\"options\":{\"quality\":\"100\",\"transform\":{\"height\":\"712\",\"width\":\"864\",\"flip-mode\":\"verti\"},\"image-type\":\"jpeg\"}}]}}}}}";
@@ -65,6 +67,7 @@ public static string KGQLModel(string node, string embedConnection = null)
6567
public const string kAssetPresets = "{\"uid\":\"asset_uid\",\"created_by\":\"create_by\",\"updated_by\":\"update_by\",\"content_type\":\"image/jpeg\",\"file_size\":\"62181\",\"tags\":[],\"filename\":\"crop_area.jpeg\",\"url\":\"http://image.contenstack.com/crop_area.jpeg\",\"is_dir\":false,\"parent_uid\":null,\"path\":[],\"_version\":1,\"title\":\"crop_area.jpeg\",\"dimension\":{\"height\":712,\"width\":864},\"_metadata\":{\"extensions\":{\"extension_uid\":{\"local_metadata\":{\"local_data\":\"main\",\"presets\":[{\"uid\":\"preset_01\",\"name\":\"Local Preset\",\"options\":{}},{\"uid\":\"preset_02\",\"name\":\"WithCrop\",\"options\":{\"quality\":\"100\",\"transform\":{},\"image-type\":\"jpeg\",\"crop\":{}}},{\"uid\":\"preset_03\",\"name\":\"Filter\",\"options\":{\"quality\":\"100\",\"transform\":{\"height\":712,\"width\":864},\"image-type\":\"jpeg\",\"effects\":{}}}]},\"global_metadata\":{\"presets\":[{\"uid\":\"preset_04\",\"name\":\"Global Preset\",\"options\":{\"quality\":\"100\",\"transform\":{\"height\":\"712\",\"width\":\"864\",\"flip-mode\":\"verti\"},\"image-type\":\"jpeg\"}}]}}}}}";
6668
public const string kAsset = "{\"uid\":\"asset_uid\",\"created_by\":\"create_by\",\"updated_by\":\"update_by\",\"content_type\":\"image/jpeg\",\"file_size\":\"62181\",\"tags\":[],\"filename\":\"crop_area.jpeg\",\"url\":\"http://image.contenstack.com/crop_area.jpeg\",\"is_dir\":false,\"parent_uid\":null,\"path\":[],\"_version\":1,\"title\":\"crop_area.jpeg\",\"dimension\":{\"height\":712,\"width\":864},\"_metadata\":{}}";
6769
public const string kAssetMetaURLQuery = "{\"uid\":\"asset_uid\",\"created_by\":\"create_by\",\"updated_by\":\"update_by\",\"content_type\":\"image/jpeg\",\"file_size\":\"62181\",\"tags\":[],\"filename\":\"crop_area.jpeg\",\"url\":\"http://image.contenstack.com/crop_area.jpeg?render=full&noval\",\"is_dir\":false,\"parent_uid\":null,\"path\":[],\"_version\":1,\"title\":\"crop_area.jpeg\",\"dimension\":{\"height\":712,\"width\":864},\"_metadata\":{\"extensions\":{\"extension_uid\":{\"local_metadata\":{\"local_data\":\"main\",\"presets\":[{\"uid\":\"preset_01\",\"name\":\"Local Preset\",\"options\":{\"transform\":{\"height\":500,\"width\":500,\"flip-mode\":\"horiz\",\"rotate\":40},\"focal-point\":{\"x\":-0.668935003427432,\"y\":-0.9220385351936531},\"quality\":\"100\",\"image-type\":\"jpeg\"}},{\"uid\":\"preset_02\",\"name\":\"WithCrop\",\"options\":{\"quality\":\"100\",\"transform\":{\"height\":\"569.6\",\"width\":\"569.6\",\"flip-mode\":\"both\"},\"image-type\":\"jpeg\",\"crop\":{\"height\":\"569.6\",\"width\":\"569.6\",\"x\":\"147.2\",\"y\":\"71.2\"}}},{\"uid\":\"preset_03\",\"name\":\"Filter\",\"options\":{\"quality\":\"100\",\"transform\":{\"height\":712,\"width\":864},\"image-type\":\"jpeg\",\"effects\":{\"brightness\":52,\"contrast\":15,\"saturate\":-30,\"blur\":16,\"sharpen\":{\"amount\":9,\"radius\":669,\"threshold\":207}}}}]},\"global_metadata\":{\"presets\":[{\"uid\":\"preset_04\",\"name\":\"Global Preset\",\"options\":{\"quality\":\"100\",\"transform\":{\"height\":\"712\",\"width\":\"864\",\"flip-mode\":\"verti\"},\"image-type\":\"jpeg\"}}]}}}}}";
70+
public const string kJSONRTE = "{ \"uid\":\"uid\",\"_version\":1,\"locale\":\"en-us\",\"children\":[{\"type\":\"p\",\"children\":[{\"text\":\"demoText\",\"bold\":true},{\"text\":\" is\",\"underline\":true},{\"text\":\" demoText\",\"italic\":true}]},{\"type\":\"p\",\"children\":[{\"text\":\"This\",\"italic\":true,\"subscript\":true},{\"text\":\" \",\"italic\":true},{\"text\":\"is\",\"italic\":true,\"superscript\":true},{\"text\":\" \",\"italic\":true},{\"text\":\"same \",\"italic\":true,\"strikethrough\":true}]},{\"type\":\"p\",\"children\":[{\"text\":\"demoText2\",\"strikethrough\":true,\"inlineCode\":true}]},{\"type\":\"p\",\"children\":[{\"text\":\"demoText3\",\"strikethrough\":true,\"inlineCode\":true},{\"text\":\"demoText4\"}]},{\"type\":\"p\",\"children\":[{\"text\":\"demoText3\"},{\"type\":\"a\",\"attrs\":{\"url\":\"https://www.google.com/\",\"target\":\"_blank\",\"title\":\"demoText5\"},\"children\":[{\"text\":\"demoText2\"}]}]}],\"type\":\"doc\"}";
6871

6972
}
7073
}

Contentstack.Utils.Tests/DefaultRenderTest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using Contentstack.Utils.Models;
1+
using Contentstack.Utils.Models;
22
using Xunit;
33
using Contentstack.Utils.Tests.Mocks;
44
using Contentstack.Utils.Enums;
@@ -178,7 +178,7 @@ public void testLinkhDocument()
178178

179179
string result = defaultRender.RenderNode("a", nodeLink, (nodes) => { return text; });
180180

181-
Assert.Equal($"<a href=\"{nodeLink.attrs["url"]}\">{text}</a>", result);
181+
Assert.Equal($"<a href=\"{nodeLink.attrs["url"]}\" target=\"{nodeLink.attrs["target"]}\" title=\"{nodeLink.attrs["title"]}\" >Text To set Link</a>", result);
182182
}
183183

184184
[Fact]

Contentstack.Utils.Tests/JsonToHtmlTest.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -489,5 +489,13 @@ public void TestForClassandId()
489489

490490
Assert.Equal(new List<string>() { JsonToHtmlResultConstants.stringClassIdResult }, result);
491491
}
492+
493+
[Fact]
494+
public void Should_Render_All_Marks_And_Target_Attribute()
495+
{
496+
Node node = NodeParser.parse(JsonToHtmlConstants.kJSONRTE);
497+
var result = Utils.JsonToHtml(node, defaultRender);
498+
Assert.Equal(JsonToHtmlResultConstants.kJSONRTEResult, result);
499+
}
492500
}
493501
}

Contentstack.Utils.sln

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Global
2121
{EB2B5E23-E45F-4C6C-BF98-FE3971DE4250}.Release|Any CPU.Build.0 = Release|Any CPU
2222
EndGlobalSection
2323
GlobalSection(MonoDevelopProperties) = preSolution
24-
version = 1.0.5
24+
version = 1.0.6
2525
Policies = $0
2626
$0.DotNetNamingPolicy = $1
2727
$1.DirectoryNamespaceAssociation = PrefixedHierarchical

Contentstack.Utils/Models/Options.cs

Lines changed: 28 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
using System;
1+
using System;
22
using System.Collections.Generic;
3-
using Contentstack.Utils.Enums;
3+
using Contentstack.Utils.Enums;
44
using Contentstack.Utils.Interfaces;
55
using Newtonsoft.Json.Linq;
66

@@ -23,47 +23,47 @@ public virtual string RenderOption(IEmbeddedObject embeddedObject, Metadata meta
2323
switch (metadata.StyleType)
2424
{
2525
case Enums.StyleType.Block:
26-
string renderString = "<div><p>" + embeddedObject.Uid + "</p>";
26+
string renderString = "<div><p>" + embeddedObject.Uid + "</p>";
2727
if (embeddedObject is IEmbeddedEntry)
2828
{
29-
renderString += "<p>Content type: <span>" + ((IEmbeddedEntry)embeddedObject).Title + "</span></p>";
29+
renderString += "<p>Content type: <span>" + ((IEmbeddedEntry)embeddedObject).Title + "</span></p>";
3030
}
3131
else
3232
{
33-
renderString += "<p>Content type: <span>" + embeddedObject.ContentTypeUid + "</span></p>";
33+
renderString += "<p>Content type: <span>" + embeddedObject.ContentTypeUid + "</span></p>";
3434
}
3535
renderString = renderString + "</div>";
3636
return renderString;
3737

3838
case Enums.StyleType.Inline:
3939
if (embeddedObject is IEmbeddedEntry)
4040
{
41-
return "<span>" + ((IEmbeddedEntry)embeddedObject).Title + "</span>";
41+
return "<span>" + ((IEmbeddedEntry)embeddedObject).Title + "</span>";
4242
}
43-
return "<span>" + embeddedObject.Uid + "</span>";
43+
return "<span>" + embeddedObject.Uid + "</span>";
4444

4545
case Enums.StyleType.Link:
4646
if (embeddedObject is IEmbeddedEntry)
4747
{
48-
return "<a href=\"" + embeddedObject.Uid + "\">" + (metadata.Text ?? ((IEmbeddedEntry)embeddedObject).Title) + "</a>";
48+
return "<a href=\"" + embeddedObject.Uid + "\">" + (metadata.Text ?? ((IEmbeddedEntry)embeddedObject).Title) + "</a>";
4949
}
50-
return "<a href=\"" + embeddedObject.Uid + "\">" + (metadata.Text ?? embeddedObject.Uid) + "</a>";
50+
return "<a href=\"" + embeddedObject.Uid + "\">" + (metadata.Text ?? embeddedObject.Uid) + "</a>";
5151

5252
case Enums.StyleType.Display:
5353
if (embeddedObject is IEmbeddedAsset)
5454
{
55-
return "<img src=\"" + ((IEmbeddedAsset)embeddedObject).Url + "\" alt=\"" + ((IEmbeddedAsset)embeddedObject).Title + "\" />";
55+
return "<img src=\"" + ((IEmbeddedAsset)embeddedObject).Url + "\" alt=\"" + ((IEmbeddedAsset)embeddedObject).Title + "\" />";
5656
}
57-
return "<img src=\"" + embeddedObject.Uid + "\" alt=\"" + embeddedObject.Uid + "\" />";
57+
return "<img src=\"" + embeddedObject.Uid + "\" alt=\"" + embeddedObject.Uid + "\" />";
5858

5959
case Enums.StyleType.Download:
6060
if (embeddedObject is IEmbeddedAsset)
6161
{
62-
return "<a href=\"" + ((IEmbeddedAsset)embeddedObject).Url + "\">" + (metadata.Text ?? ((IEmbeddedAsset)embeddedObject).Title) + "</a>";
62+
return "<a href=\"" + ((IEmbeddedAsset)embeddedObject).Url + "\">" + (metadata.Text ?? ((IEmbeddedAsset)embeddedObject).Title) + "</a>";
6363
}
64-
return "<a href=\"" + embeddedObject.Uid + "\">" + (metadata.Text ?? embeddedObject.Uid) + "</a>";
64+
return "<a href=\"" + embeddedObject.Uid + "\">" + (metadata.Text ?? embeddedObject.Uid) + "</a>";
6565
}
66-
return "";
66+
return "";
6767
}
6868

6969
public virtual string RenderMark(MarkType markType, string text, string className = "", string id = "")
@@ -97,8 +97,10 @@ public virtual string RenderNode(string nodeType, Node node, NodeChildrenCallBac
9797
{
9898
string href = "";
9999
string styleAttrs = "";
100+
string target = "";
101+
string title = "";
100102

101-
if (node.attrs.ContainsKey("style"))
103+
if (node.attrs?.ContainsKey("style") == true)
102104
{
103105
var styleVal = node.attrs["style"];
104106
if (styleVal != null)
@@ -125,11 +127,20 @@ public virtual string RenderNode(string nodeType, Node node, NodeChildrenCallBac
125127
case "p":
126128
return $"<p{styleAttrs}>{callBack(node.children)}</p>";
127129
case "a":
128-
if (node.attrs.ContainsKey("url"))
130+
if (node.attrs?.ContainsKey("url")==true)
129131
{
130132
href = (string)node.attrs["url"];
131133
}
132-
return $"<a href=\"{href}\"{styleAttrs}>{callBack(node.children)}</a>";
134+
if (node.attrs?.ContainsKey("target") == true)
135+
{
136+
target = (string)node.attrs["target"];
137+
}
138+
if (node.attrs?.ContainsKey("title") == true)
139+
{
140+
title = (string)node.attrs["title"];
141+
}
142+
return $"<a href=\"{href}\" target=\"{target}\" title=\"{title}\" {styleAttrs}>{callBack(node.children)}</a>";
143+
133144
case "img":
134145
if (node.attrs.ContainsKey("url"))
135146
{

Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<Project>
22
<PropertyGroup>
3-
<Version>1.0.5</Version>
3+
<Version>1.0.6</Version>
44
</PropertyGroup>
55
</Project>

0 commit comments

Comments
 (0)