diff --git a/modules/docs/src/Volo.Docs.Web/Markdown/MarkdownDocumentToHtmlConverter.cs b/modules/docs/src/Volo.Docs.Web/Markdown/MarkdownDocumentToHtmlConverter.cs index 7851d99a99..0b6e18e5a8 100644 --- a/modules/docs/src/Volo.Docs.Web/Markdown/MarkdownDocumentToHtmlConverter.cs +++ b/modules/docs/src/Volo.Docs.Web/Markdown/MarkdownDocumentToHtmlConverter.cs @@ -15,7 +15,7 @@ namespace Volo.Docs.Markdown public const string Type = "md"; private const string MdLinkFormat = "[{0}](/documents/{1}/{2}{3}/{4})"; - private const string MarkdownLinkRegExp = @"\[([^)]+)\]\(([^)]+." + Type + @")\)"; + private const string MarkdownLinkRegExp = @"\[(.*)\]\((.*\.md)\)"; private const string AnchorLinkRegExp = @"]+href=\""(.*?)\""[^>]*>(.*)?"; public virtual string Convert(ProjectDto project, DocumentWithDetailsDto document, string version) @@ -36,12 +36,12 @@ namespace Volo.Docs.Markdown } protected virtual string NormalizeLinks( - string content, - string projectShortName, + string content, + string projectShortName, string version, string documentLocalDirectory) { - var normalized = Regex.Replace(content, MarkdownLinkRegExp, delegate(Match match) + var normalized = Regex.Replace(content, MarkdownLinkRegExp, delegate (Match match) { var link = match.Groups[2].Value; if (UrlHelper.IsExternalLink(link))