Skip to content

Commit 619dcd0

Browse files
committed
chore: fix lint errors
Signed-off-by: jbrinkman <[email protected]>
1 parent 4f2bb5f commit 619dcd0

File tree

1 file changed

+15
-13
lines changed

1 file changed

+15
-13
lines changed

src/DotNetApiDiff/Reporting/HtmlFormatterScriban.cs

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,21 @@ public string Format(ComparisonResult result)
6464
return _mainTemplate.Render(context);
6565
}
6666

67+
private static string HtmlEscape(string? input)
68+
{
69+
if (string.IsNullOrEmpty(input))
70+
{
71+
return input ?? string.Empty;
72+
}
73+
74+
return input
75+
.Replace("&", "&amp;")
76+
.Replace("<", "&lt;")
77+
.Replace(">", "&gt;")
78+
.Replace("\"", "&quot;")
79+
.Replace("'", "&#39;");
80+
}
81+
6782
private object PrepareConfigData(ComparisonConfiguration config)
6883
{
6984
var namespaceMappings = config?.Mappings?.NamespaceMappings ?? new Dictionary<string, List<string>>();
@@ -238,19 +253,6 @@ private object[] GroupChanges(List<ApiDifference> changes)
238253
}).ToArray();
239254
}
240255

241-
private static string HtmlEscape(string? input)
242-
{
243-
if (string.IsNullOrEmpty(input))
244-
return input ?? string.Empty;
245-
246-
return input
247-
.Replace("&", "&amp;")
248-
.Replace("<", "&lt;")
249-
.Replace(">", "&gt;")
250-
.Replace("\"", "&quot;")
251-
.Replace("'", "&#39;");
252-
}
253-
254256
private object[] PrepareBreakingChangesData(IEnumerable<ApiDifference> breakingChanges)
255257
{
256258
return breakingChanges.OrderBy(d => d.Severity)

0 commit comments

Comments
 (0)