summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/scripts/Program.cs7
1 files changed, 4 insertions, 3 deletions
diff --git a/docs/scripts/Program.cs b/docs/scripts/Program.cs
index d543f399e..b256af1b2 100644
--- a/docs/scripts/Program.cs
+++ b/docs/scripts/Program.cs
@@ -1,7 +1,8 @@
using System;
+using System.Collections.Generic;
using System.IO;
+using System.Linq;
using System.Text;
-using System.Collections.Generic;
namespace toc
{
public class Builder
@@ -128,7 +129,7 @@ namespace toc
{
StringBuilder outputSB = new StringBuilder();
outputSB.AppendFormat("Building table of contents from {0}...\n", path);
- var files = System.IO.Directory.EnumerateFiles(path, "*.md");
+ var files = System.IO.Directory.EnumerateFiles(path, "*.md").OrderBy(f => System.IO.Path.GetFileName(f));
List<Node> nodes = new List<Node>();
foreach (var f in files)
{
@@ -230,4 +231,4 @@ namespace toc
return outputSB.ToString();
}
}
-} \ No newline at end of file
+}