Skip to content

Commit

Permalink
Add '<code>' tag around key words, references and c-blocks.
Browse files Browse the repository at this point in the history
  • Loading branch information
KSGRelewise committed Aug 12, 2024
1 parent 7205ba7 commit 7d967e5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Generator/XMLDocsFetcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public static async Task<XmlDocumentation> Get(string package, string version)
var document = await context.OpenAsync(req => req.Content(content.Replace("/>", "></SEE>")));
foreach (var seeReference in document.QuerySelectorAll("see"))
{
seeReference.OuterHtml = seeReference.GetAttribute("cref")?.Split(".").Last() ?? seeReference.GetAttribute("langword")?.Split(".").Last() ?? string.Empty;
seeReference.OuterHtml = $"<code>{seeReference.GetAttribute("cref")?.Split(".").Last() ?? seeReference.GetAttribute("langword")?.Split(".").Last() ?? string.Empty}</code>";
}

foreach (var member in document.GetElementsByTagName("doc")[0].Children[1].Children)
Expand All @@ -49,7 +49,7 @@ public static async Task<XmlDocumentation> Get(string package, string version)
}
foreach (var cWrapper in child.Children.Where(c => c.TagName == "C"))
{
cWrapper.OuterHtml = cWrapper.InnerHtml.Trim();
cWrapper.OuterHtml = $"<code>{cWrapper.InnerHtml.Trim()}</code>";
}
foreach (var exampleWrapper in child.Children.Where(c => c.TagName == "EXAMPLE"))
{
Expand Down

0 comments on commit 7d967e5

Please sign in to comment.