Skip to content

Commit 02833be

Browse files
committed
feat(issues): add data-href to broken links
1 parent 26a7a13 commit 02833be

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

crates/rari-doc/src/html/rewriter.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,9 @@ pub fn post_process_html<T: PageLike>(
228228
"page-not-created"
229229
),
230230
)?;
231+
if let Some(href) = el.get_attribute("href") {
232+
el.set_attribute("data-href", &href)?;
233+
}
231234
el.remove_attribute("href");
232235
el.set_attribute("title", l10n_json_data("Common", "summary", page.locale())?)?;
233236
true

0 commit comments

Comments
 (0)