Browse Source

FIX: if a template marker was present in the content it got replaced as well

tags/0.8.0
Frans Bouma 9 years ago
parent
commit
a9b0f8ae9a
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      src/SimpleNavigationElement.cs

+ 3
- 1
src/SimpleNavigationElement.cs View File

@@ -103,7 +103,6 @@ namespace Docnet
sb.Replace("{{Name}}", activeConfig.Name);
sb.Replace("{{Footer}}", activeConfig.Footer);
sb.Replace("{{TopicTitle}}", this.Name);
sb.Replace("{{Content}}", content);
var relativePathToRoot = Utils.MakeRelativePath(Path.GetDirectoryName(destinationFile), activeConfig.Destination).Replace(@"\", @"/");
sb.Replace("{{Path}}", relativePathToRoot);
sb.Replace("{{Breadcrumbs}}", activePath.CreateBreadCrumbsHTML(relativePathToRoot));
@@ -112,6 +111,9 @@ namespace Docnet
{
sb.Replace("{{ExtraScript}}", this.ExtraScriptProducerFunc(this));
}

// 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
sb.Replace("{{Content}}", content);
Utils.CreateFoldersIfRequired(destinationFile);
File.WriteAllText(destinationFile, sb.ToString());
if(!this.IsIndexElement)


Loading…
Cancel
Save