diff --git a/Changelog.md b/Changelog.md index e34a201..651b5d6 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,5 +1,10 @@ # Changelog +[0.2.2] + +- Fixed some formatting issues when converting Markdown to Text Mesh Pro for + Stationpedia + [0.2.1] - Added support for `loadSlot` and `setSlot` diff --git a/ModData/About/About.xml b/ModData/About/About.xml index 8c0bca7..9ed2509 100644 --- a/ModData/About/About.xml +++ b/ModData/About/About.xml @@ -2,7 +2,7 @@ Slang JoeDiertay - 0.2.1 + 0.2.2 [h1]Slang: High-Level Programming for Stationeers[/h1] diff --git a/csharp_mod/TmpFormatter.cs b/csharp_mod/TmpFormatter.cs index aab5802..5dd8611 100644 --- a/csharp_mod/TmpFormatter.cs +++ b/csharp_mod/TmpFormatter.cs @@ -26,12 +26,18 @@ public static class TextMeshProFormatter RegexOptions.Singleline ); - // 3. Handle Headers (## Header) - // Convert ## Header to large bold text text = Regex.Replace( text, - @"^##(\s+)?(.+)$", - "$1", + @"^\s*##\s+(.+)$", + "$1", + RegexOptions.Multiline + ); + + // 3. Handle # Headers SECOND (General) + text = Regex.Replace( + text, + @"^\s*#\s+(.+)$", + "$1", RegexOptions.Multiline ); diff --git a/csharp_mod/stationeersSlang.csproj b/csharp_mod/stationeersSlang.csproj index 91024c0..554a462 100644 --- a/csharp_mod/stationeersSlang.csproj +++ b/csharp_mod/stationeersSlang.csproj @@ -5,7 +5,7 @@ enable StationeersSlang Slang Compiler Bridge - 0.2.1 + 0.2.2 true latest diff --git a/rust_compiler/Cargo.lock b/rust_compiler/Cargo.lock index 2c1e541..3ffa5f4 100644 --- a/rust_compiler/Cargo.lock +++ b/rust_compiler/Cargo.lock @@ -909,7 +909,7 @@ checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e" [[package]] name = "slang" -version = "0.2.1" +version = "0.2.2" dependencies = [ "anyhow", "clap", diff --git a/rust_compiler/Cargo.toml b/rust_compiler/Cargo.toml index 6cd02a7..7611197 100644 --- a/rust_compiler/Cargo.toml +++ b/rust_compiler/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "slang" -version = "0.2.1" +version = "0.2.2" edition = "2021" [workspace]