Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[wip] Add Handlebars support and escaping @@ tags in markdown code #34

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/DocNet/Docnet.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Handlebars, Version=1.0.0.0, Culture=neutral, PublicKeyToken=22225d0bf33cd661, processorArchitecture=MSIL">
<HintPath>..\..\packages\Handlebars.Net.1.6.4\lib\Handlebars.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Newtonsoft.Json, Version=8.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\..\packages\Newtonsoft.Json.8.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
Expand Down Expand Up @@ -80,4 +84,4 @@
<Target Name="AfterBuild">
</Target>
-->
</Project>
</Project>
4 changes: 2 additions & 2 deletions src/DocNet/SimpleNavigationElement.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public override void GenerateOutput(Config activeConfig, NavigatedPath activePat
{
this.MarkdownFromFile = File.ReadAllText(sourceFile);
// Check if the content contains @@include tag
content = Utils.IncludeProcessor(this.MarkdownFromFile, Utils.MakeAbsolutePath(activeConfig.Source, activeConfig.IncludeFolder));
content = Utils.PartialProcessor(this.MarkdownFromFile, Utils.MakeAbsolutePath(activeConfig.Source, activeConfig.IncludeFolder));
content = Utils.ConvertMarkdownToHtml(content, Path.GetDirectoryName(destinationFile), activeConfig.Destination, _relativeH2LinksOnPage);
}
else
Expand Down Expand Up @@ -212,7 +212,7 @@ public override string TargetURL
_targetURLForHTML = (this.Value ?? string.Empty);
if(_targetURLForHTML.ToLowerInvariant().EndsWith(".md"))
{
_targetURLForHTML = _targetURLForHTML.Substring(0, _targetURLForHTML.Length-3) + ".htm";
_targetURLForHTML = _targetURLForHTML.Substring(0, _targetURLForHTML.Length-3) + ".html";
}
_targetURLForHTML = _targetURLForHTML.Replace("\\", "/");
}
Expand Down
Loading