Forge
csharpdeeb25a2
1using CascadeIDE.Contracts;
2using CascadeIDE.Models;
3
4namespace CascadeIDE.Features.Markdown.Application;
5
6[ComputingUnit("paths-markdown")]
7public static class ExpandedMarkdownDefaultExportPath
8{
9 public static string Resolve(string sourcePath)
10 {
11 try
12 {
13 var full = CanonicalFilePath.Normalize(sourcePath);
14 var dir = Path.GetDirectoryName(full) ?? Directory.GetCurrentDirectory();
15 var name = Path.GetFileNameWithoutExtension(full);
16 if (string.IsNullOrWhiteSpace(name))
17 name = "export";
18 return Path.Combine(dir, $"{name}.expanded.md");
19 }
20 catch
21 {
22 return "export.expanded.md";
23 }
24 }
25}
26
View only · write via MCP/CIDE