Skip to content

Commit

Permalink
Fix CometTails Table (#89)
Browse files Browse the repository at this point in the history
  • Loading branch information
DeltaDizzy authored Aug 7, 2024
1 parent 0ec27fb commit 8f671a5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Components/MarkdownPageRenderer.razor
Original file line number Diff line number Diff line change
Expand Up @@ -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(' ', '-')}}}";
}
1 change: 1 addition & 0 deletions wwwroot/content/syntax/Expansion/CometTails.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.|
Expand Down

0 comments on commit 8f671a5

Please sign in to comment.