Skip to content

Commit

Permalink
Add a scrolling container around block math elements (#15)
Browse files Browse the repository at this point in the history
* Add a scrolling container around block math elements

* Fix the selector
  • Loading branch information
pepelsbey authored Sep 25, 2024
1 parent 38de5e2 commit 1874d87
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions crates/rari-doc/src/html/rewriter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,11 @@ pub fn post_process_html<T: PageLike>(
el.after("</figure>", ContentType::Html);
Ok(())
}),
element!("math[display=block]", |el| {
el.before("<figure class=\"table-container\">", ContentType::Html);
el.after("</figure>", ContentType::Html);
Ok(())
}),
element!("*[data-rewriter=em]", |el| {
el.prepend("<em>", ContentType::Html);
el.append("</em>", ContentType::Html);
Expand Down

0 comments on commit 1874d87

Please sign in to comment.