Skip to content

Commit

Permalink
feat(issues): add data-href to broken links
Browse files Browse the repository at this point in the history
  • Loading branch information
fiji-flo committed Nov 15, 2024
1 parent 26a7a13 commit 02833be
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions crates/rari-doc/src/html/rewriter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,9 @@ pub fn post_process_html<T: PageLike>(
"page-not-created"
),
)?;
if let Some(href) = el.get_attribute("href") {
el.set_attribute("data-href", &href)?;
}
el.remove_attribute("href");
el.set_attribute("title", l10n_json_data("Common", "summary", page.locale())?)?;
true
Expand Down

0 comments on commit 02833be

Please sign in to comment.