Ensure we do not append the altLink to any images as it blows up if we do
This commit is contained in:
@@ -4,7 +4,8 @@
|
||||
Layout = null;
|
||||
|
||||
var path = HttpContext.Current.Items[MarkdownLogic.MarkdownPathKey].ToString();
|
||||
var ml = new MarkdownLogic(path) { PrefixLinks = false, AppendAltLessonLink = false };
|
||||
var ml = new MarkdownLogic(path) { PrefixLinks = false, AppendAltLessonLink = true };
|
||||
|
||||
var markdown = ml.DoTransformation();
|
||||
}
|
||||
|
||||
|
||||
@@ -82,7 +82,8 @@ namespace OurUmbraco.Documentation.Busineslogic
|
||||
else
|
||||
mdUrlTag.TrimEnd('/');
|
||||
|
||||
if (AppendAltLessonLink)
|
||||
//Need to ensure we dont append the image links as they 404 if we add altTemplate
|
||||
if (AppendAltLessonLink && rawUrl.StartsWith("images/") == false)
|
||||
{
|
||||
return mdUrlTag.Replace(rawUrl, $"{rawUrl.EnsureNoDotsInUrl()}?altTemplate=Lesson");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user