-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix issue with image for md export
- Loading branch information
Showing
6 changed files
with
69 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
src/alxnbl.OneNoteMdExporter.IntTests/MarkdownExportTests.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
using alxnbl.OneNoteMdExporter.IntTests.Helpers; | ||
using NUnit.Framework; | ||
using System.IO; | ||
using System.Text.RegularExpressions; | ||
|
||
namespace alxnbl.OneNoteMdExporter.IntTests | ||
{ | ||
public class MarkdownExportTests | ||
{ | ||
[SetUp] | ||
public void Setup() | ||
{ | ||
} | ||
|
||
[Test] | ||
public void Image_SimpleImage() | ||
{ | ||
var res = TestHelper.RunExporter("1", "TestBloc", "Image", "Simple image"); | ||
|
||
|
||
// http://regexstorm.net/tester | ||
string regexImgAttributes = "!\\[.*\\]\\((?<path>\\.\\./_resources/).*\\.png\\)"; | ||
|
||
MatchCollection matchs = Regex.Matches(res.exportResult, regexImgAttributes, RegexOptions.IgnoreCase); | ||
|
||
Assert.AreEqual("../_resources/", matchs[0].Groups["path"].Value); | ||
|
||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters