From 0d6a790569d63985e04b44b295f8a330b6cf6c36 Mon Sep 17 00:00:00 2001 From: Alper Ebicoglu Date: Tue, 11 Dec 2018 16:39:52 +0300 Subject: [PATCH] fixes #602 --- .../Markdown/MarkdownDocumentToHtmlConverter.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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))