|
|
|
@ -74,6 +74,15 @@ namespace Volo.Docs.Markdown |
|
|
|
return Regex.Replace(content, MarkdownLinkRegExp, delegate (Match match) |
|
|
|
{ |
|
|
|
var link = match.Groups[3].Value; |
|
|
|
|
|
|
|
var hashPart = ""; |
|
|
|
if (link.Contains("#")) |
|
|
|
{ |
|
|
|
var linkSplitted = link.Split("#"); |
|
|
|
link = linkSplitted[0]; |
|
|
|
hashPart = linkSplitted[1]; |
|
|
|
} |
|
|
|
|
|
|
|
if (UrlHelper.IsExternalLink(link)) |
|
|
|
{ |
|
|
|
return match.Value; |
|
|
|
@ -100,6 +109,11 @@ namespace Volo.Docs.Markdown |
|
|
|
documentLocalDirectoryNormalized = "/" + documentLocalDirectoryNormalized; |
|
|
|
} |
|
|
|
|
|
|
|
if (!string.IsNullOrEmpty(hashPart)) |
|
|
|
{ |
|
|
|
documentName += $"#{hashPart}"; |
|
|
|
} |
|
|
|
|
|
|
|
return string.Format( |
|
|
|
MdLinkFormat, |
|
|
|
displayText, |
|
|
|
|