Skip to content

Commit

Permalink
Fix normalize topic
Browse files Browse the repository at this point in the history
  • Loading branch information
jaybutera committed Jul 31, 2023
1 parent a1f00fd commit b58216d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,11 @@ fn main() -> tide::Result<()> {
}

fn normalize_topic(topic: &str) -> String {
topic.to_lowercase().replace(" ", "-").replace(".", "_").trim().to_string()
topic.to_lowercase()
.replace(" ", "-")
.replace("%20", "-")
.replace(".", "_")
.trim().to_string()
}

async fn main_async() -> tide::Result<()> {
Expand Down

0 comments on commit b58216d

Please sign in to comment.