diff --git a/MarkdownDocNet/DocParser.cs b/MarkdownDocNet/DocParser.cs index a9e0521..5286023 100644 --- a/MarkdownDocNet/DocParser.cs +++ b/MarkdownDocNet/DocParser.cs @@ -630,11 +630,20 @@ public string ParseDocText(XNode node, string contextMemberName) var element = (XElement)node; if (element.Name == "see") { - var descriptor = element.Attribute("cref").Value; + var crefAttribute = element.Attribute("cref"); + var hrefAttribute = element.Attribute("href"); + + var value = crefAttribute == null ? element.Attribute("href").Value : element.Attribute("cref").Value; + var isValueDescriptor = crefAttribute != null; + string linkName = null; if (!String.IsNullOrEmpty(element.Value)) linkName = element.Value; - return LinkFromDescriptor(descriptor, contextMemberName, linkName); + + if (!isValueDescriptor && String.IsNullOrEmpty(linkName)) + linkName = value; + + return isValueDescriptor ? LinkFromDescriptor(value, contextMemberName, linkName) : Link(value, linkName); } else if (element.Name == "code") { @@ -680,6 +689,11 @@ public string LinkFromDescriptor(string descriptor, string contextMemberName, st return " [" + linkName + "](#" + link + ") "; } + public string Link(string link, string linkName = null) + { + return " [" + linkName + "](" + link + ") "; + } + public string FullNameFromDescriptor(string descriptor) { var descriptorElements = descriptor.Split(':');