Browse Source

Fixes #87: ConvertLocalLinks doesn't work

tags/v0.16.5
Frans Bouma 5 years ago
parent
commit
e92b09e9b3
2 changed files with 4 additions and 8 deletions
  1. +2
    -6
      src/MarkdownDeep/LinkDefinition.cs
  2. +2
    -2
      src/MarkdownDeepTests/testfiles/docnetmode/Snippet(DocNetMode).txt

+ 2
- 6
src/MarkdownDeep/LinkDefinition.cs View File

@@ -74,13 +74,9 @@ namespace MarkdownDeep
{ {
url = linkProcessor(url); url = linkProcessor(url);
} }
else
if (Uri.TryCreate(url, UriKind.Relative, out var uri))
{ {
Uri uri;
if (Uri.TryCreate(url, UriKind.Relative, out uri))
{
url = String.Concat(url.Substring(0, index), ".htm", url.Substring(index + ".md".Length));
}
url = String.Concat(url.Substring(0, index), ".htm", url.Substring(index + ".md".Length));
} }
} }
} }


+ 2
- 2
src/MarkdownDeepTests/testfiles/docnetmode/Snippet(DocNetMode).txt View File

@@ -2,8 +2,8 @@


This is some text with a snippet. This is some text with a snippet.


@snippet cs [c:\temp\AutoHeaderIDTests.cs] SetUp
@snippet cs [.\AutoHeaderIDTests.cs] SetUp


@snippet cs [c:\temp\AutoHeaderIDTests.cs] =WithPunctuation
@snippet cs [.\AutoHeaderIDTests.cs] =WithPunctuation
post post

Loading…
Cancel
Save