Skip to content

Commit 9940bbf

Browse files
committed
images and raw documentation files still went into src
1 parent ed1938e commit 9940bbf

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/CodeGeneration/DocGenerator/Documentation/Files/ImageDocumentationFile.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ protected override FileInfo CreateDocumentationLocation()
2626
{
2727
var testFullPath = this.FileLocation.FullName;
2828

29-
var testInDocumenationFolder = Regex.Replace(testFullPath, @"(^.+\\Tests\\|\" + this.Extension + "$)", "")
29+
var p = "\\" + Path.DirectorySeparatorChar.ToString();
30+
var testInDocumenationFolder = Regex.Replace(testFullPath, $@"(^.+{p}Tests{p}|\" + this.Extension + "$)", "")
3031
.PascalToHyphen() + this.Extension;
3132

3233
var documentationTargetPath = Path.GetFullPath(Path.Combine(Program.OutputDirPath, testInDocumenationFolder));

src/CodeGeneration/DocGenerator/Documentation/Files/RawDocumentationFile.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ public override Task SaveToDocumentationFolderAsync()
3232
protected override FileInfo CreateDocumentationLocation()
3333
{
3434
var testFullPath = this.FileLocation.FullName;
35-
var testInDocumenationFolder = Regex.Replace(testFullPath, @"(^.+\\Tests\\|\" + this.Extension + "$)", "").PascalToHyphen() + this.Extension;
35+
var p = "\\" + Path.DirectorySeparatorChar.ToString();
36+
var testInDocumenationFolder = Regex.Replace(testFullPath, $@"(^.+{p}Tests{p}|\" + this.Extension + "$)", "").PascalToHyphen() + this.Extension;
3637

3738
var documenationTargetPath = Path.GetFullPath(Path.Combine(Program.OutputDirPath, testInDocumenationFolder));
3839
var fileInfo = new FileInfo(documenationTargetPath);

0 commit comments

Comments
 (0)