summaryrefslogtreecommitdiffstats
path: root/docs/scripts
diff options
context:
space:
mode:
authorIca <82805019+burak-efe@users.noreply.github.com>2024-12-02 22:44:00 +0300
committerGitHub <noreply@github.com>2024-12-02 11:44:00 -0800
commit0586e5ab478f7cfb1763d019eb014f2578106240 (patch)
treea415152bd4ae3cf7c44d109ba7fb6e16c956a4c6 /docs/scripts
parentcced76cf9c11de350012c215eff4c7500145be3c (diff)
[Docs] Fix dead links when subsection title have underscore (#5662)
* [Docs] Fix dead links when subsection title have underscore a minor change on build toc script: add underscore to link instead of replacing with "-" then I re-run the script also I tested on local server * Update toc.html --------- Co-authored-by: Ellie Hermaszewska <ellieh@nvidia.com> Co-authored-by: Yong He <yonghe@outlook.com>
Diffstat (limited to 'docs/scripts')
-rw-r--r--docs/scripts/Program.cs5
1 files changed, 3 insertions, 2 deletions
diff --git a/docs/scripts/Program.cs b/docs/scripts/Program.cs
index b256af1b2..8a87f153d 100644
--- a/docs/scripts/Program.cs
+++ b/docs/scripts/Program.cs
@@ -11,12 +11,13 @@ namespace toc
{
StringBuilder sb = new StringBuilder();
title = title.Trim().ToLower();
+
foreach (var ch in title)
{
if (ch >= 'a' && ch <= 'z' || ch >= '0' && ch <= '9'
- || ch == '-')
+ || ch == '-'|| ch =='_')
sb.Append(ch);
- else if (ch==' ' || ch =='_')
+ else if (ch == ' ' )
sb.Append('-');
}
return sb.ToString();