Skip to content
This repository was archived by the owner on Feb 28, 2022. It is now read-only.

Commit fe93925

Browse files
committed
fix bug: not add empty index.md
1 parent 69f8c59 commit fe93925

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Microsoft.Content.Build.Code2Yaml.Steps/GenerateToc.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,11 @@ orderby toc.Name.ToLower()
5050
new YamlSerializer().Serialize(writer, tocYaml);
5151
}
5252

53-
string tocMDFile = Path.Combine(outputPath, Constants.TocMDFileName);
54-
using (var writer = new StreamWriter(tocMDFile))
53+
bool generateTocMDFile = config.GenerateTocMDFile;
54+
if (generateTocMDFile)
5555
{
56-
bool generateTocMDFile = config.GenerateTocMDFile;
57-
if (generateTocMDFile)
56+
string tocMDFile = Path.Combine(outputPath, Constants.TocMDFileName);
57+
using (var writer = new StreamWriter(tocMDFile))
5858
{
5959
foreach (var item in tocYaml)
6060
{

0 commit comments

Comments
 (0)