Skip to content

Commit a9b0f8a

Browse files
committed
FIX: if a template marker was present in the content it got replaced as well
1 parent 6df738f commit a9b0f8a

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/SimpleNavigationElement.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@ public override void GenerateOutput(Config activeConfig, NavigatedPath activePat
103103
sb.Replace("{{Name}}", activeConfig.Name);
104104
sb.Replace("{{Footer}}", activeConfig.Footer);
105105
sb.Replace("{{TopicTitle}}", this.Name);
106-
sb.Replace("{{Content}}", content);
107106
var relativePathToRoot = Utils.MakeRelativePath(Path.GetDirectoryName(destinationFile), activeConfig.Destination).Replace(@"\", @"/");
108107
sb.Replace("{{Path}}", relativePathToRoot);
109108
sb.Replace("{{Breadcrumbs}}", activePath.CreateBreadCrumbsHTML(relativePathToRoot));
@@ -112,6 +111,9 @@ public override void GenerateOutput(Config activeConfig, NavigatedPath activePat
112111
{
113112
sb.Replace("{{ExtraScript}}", this.ExtraScriptProducerFunc(this));
114113
}
114+
115+
// the last action has to be replacing the content marker, so markers in the content which we have in the template as well aren't replaced
116+
sb.Replace("{{Content}}", content);
115117
Utils.CreateFoldersIfRequired(destinationFile);
116118
File.WriteAllText(destinationFile, sb.ToString());
117119
if(!this.IsIndexElement)

0 commit comments

Comments
 (0)