Skip to content

Commit 392f2e1

Browse files
committed
fix: Look for link delimiters in markdown non-greedily w/regex
1 parent 2ccf366 commit 392f2e1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ async fn post_message(post: Item) -> Result<SlackResponse, Error> {
210210

211211
fn format_slack_post(org: String) -> String {
212212
lazy_static! {
213-
static ref RE: Regex = Regex::new(r"\[(.*)\]\((.*)\)").unwrap();
213+
static ref RE: Regex = Regex::new(r"\[(.*?)\]\((.*?)\)").unwrap();
214214
}
215215

216216
RE.replace_all(&org, "<$2|$1>").to_string()

0 commit comments

Comments
 (0)