From b4f224eceafb84cb47f38fb698d8c30eb4f4f644 Mon Sep 17 00:00:00 2001 From: Harutaka Kawamura Date: Wed, 2 Aug 2023 16:42:25 +0900 Subject: [PATCH] Fix links in docs (#6265) ## Summary Before: Screen Shot 2023-08-02 at 15 57 10 After: Screen Shot 2023-08-02 at 15 58 03 ## Test Plan Manual inspection --- crates/ruff_dev/src/generate_docs.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/ruff_dev/src/generate_docs.rs b/crates/ruff_dev/src/generate_docs.rs index 93caebddcd..14e18a0a72 100644 --- a/crates/ruff_dev/src/generate_docs.rs +++ b/crates/ruff_dev/src/generate_docs.rs @@ -81,7 +81,7 @@ fn process_documentation(documentation: &str, out: &mut String) { // a non-CommonMark-compliant Markdown parser, which doesn't support code // tags in link definitions // (see https://github.com/Python-Markdown/markdown/issues/280). - let documentation = Regex::new(r"\[`(.*?)`]($|[^\[])").unwrap().replace_all( + let documentation = Regex::new(r"\[`([^`]*?)`]($|[^\[])").unwrap().replace_all( documentation, |caps: &Captures| { format!(