From 8f671a5cc74a589aba8b07e363e32a75c55552bc Mon Sep 17 00:00:00 2001 From: DeltaDizzy Date: Tue, 6 Aug 2024 20:02:01 -0500 Subject: [PATCH] Fix CometTails Table (#89) --- Components/MarkdownPageRenderer.razor | 7 ++++--- wwwroot/content/syntax/Expansion/CometTails.md | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Components/MarkdownPageRenderer.razor b/Components/MarkdownPageRenderer.razor index 94ad8ec..5de4c8d 100644 --- a/Components/MarkdownPageRenderer.razor +++ b/Components/MarkdownPageRenderer.razor @@ -22,13 +22,14 @@ if (pageName is not "" && RouteList.Get(pageName) is not "") { markdown = idAdder.Replace(rawMarkdown, Evaluate); // todo: handle space after heading name + markdown = linkAdder.Replace(markdown, $"[\\#]({RouteList.Get(pageName)}$1) {{$1"); + //Console.WriteLine(markdown); markdown = curlCleaner.Replace(markdown, ""); htmlText = Markdown.ToHtml(markdown, pipeline); } else htmlText = Markdown.ToHtml(rawMarkdown, pipeline); } - private string Evaluate(Match match) { - return $"{match.Value.TrimEnd()} {{#{match.Groups[1].Value.Trim()}}}"; - } + private string Evaluate(Match match) => + $"{match.Value.TrimEnd()} {{#{match.Groups[1].Value.Trim().Replace(' ', '-')}}}"; } \ No newline at end of file diff --git a/wwwroot/content/syntax/Expansion/CometTails.md b/wwwroot/content/syntax/Expansion/CometTails.md index 9b0ac7e..ed4d5de 100644 --- a/wwwroot/content/syntax/Expansion/CometTails.md +++ b/wwwroot/content/syntax/Expansion/CometTails.md @@ -43,6 +43,7 @@ Body ``` |Property|Format|Description| +|--------|------|-----------| |type|CometTailType|The type of comet tail. The possible values are `Ion` and `Dust`.| |color|Color|The color of the tail. Default is white. NOTE: Alpha value does not matter.| |rimPower|Decimal|How close the tail rim stays to the edge of the body. The higher the number, the closer it is. Default is 1.41.|