Skip to content

Commit b205ac2

Browse files
committed
Fix for slashes (hopefully)
1 parent 8d0e543 commit b205ac2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Elastic.Markdown/Myst/Directives/Diagram/DiagramBlock.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,10 @@ private string GenerateLocalPath(ParserContext context)
112112
}
113113

114114
var filename = $"{markdownFileName}-diagram-{DiagramType}-{ContentHash}.svg";
115-
return Path.Combine("images", "generated-graphs", filename);
115+
var localPath = Path.Combine("images", "generated-graphs", filename);
116+
117+
// Normalize path separators to forward slashes for web compatibility
118+
return localPath.Replace(Path.DirectorySeparatorChar, '/');
116119
}
117120

118121
private async Task TryCacheDiagramAsync(ParserContext context)

0 commit comments

Comments
 (0)