Skip to content

Commit

Permalink
fix internal link finding for database_query, atom_movable
Browse files Browse the repository at this point in the history
  • Loading branch information
hry-gh committed Nov 13, 2024
1 parent 5c96d7e commit a8ab8a8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/od_ref_bot/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ fn format_body(body: &str, data: &Data) -> String {
let mut replaced_body = body.to_string();

let link_finder_regex =
Regex::new(r##"\{\{ *?([a-zA-Z]*)\(((var|proc)="([a-zA-Z]*?)")? ?\).*?\}\}"##).unwrap();
Regex::new(r##"\{\{ *?([a-zA-Z_]*)\(((var|proc)="([a-zA-Z]*?)")? ?\).*?\}\}"##).unwrap();

for capture in link_finder_regex.captures_iter(body) {
let original = capture.get(0).unwrap().as_str();
Expand Down Expand Up @@ -310,7 +310,7 @@ fn format_body(body: &str, data: &Data) -> String {

new_body = tag_cleaner_regex.replace_all(&new_body, "").to_string();
new_body = new_body.replace("```dm", "```js");
new_body.replace("\n\n", "")
new_body.replace("\n\n\n", "\n")
}

/// Converts the internal Zola page structure into something we can link to.
Expand Down

0 comments on commit a8ab8a8

Please sign in to comment.