diff --git a/shell.nix b/shell.nix index 0e2b58b..e656825 100644 --- a/shell.nix +++ b/shell.nix @@ -4,11 +4,14 @@ pkgs.mkShell { buildInputs = with pkgs; [ cargo clippy - rustfmt - rust-analyzer - pagefind esbuild nodePackages.pnpm + pagefind python3 + rust-analyzer + rustc + rustfmt ]; + + RUST_SRC_PATH = "${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}"; } diff --git a/src/main.rs b/src/main.rs index 90c9fa4..05a3f40 100644 --- a/src/main.rs +++ b/src/main.rs @@ -106,7 +106,7 @@ impl Content for md::Slide { content: T, _: Outline, _: &'s Sack, - bib: Option>, + _bib: Option>, ) -> impl Renderable + 'html where 'f: 'html, diff --git a/src/text/md.rs b/src/text/md.rs index e73ce70..6e39801 100644 --- a/src/text/md.rs +++ b/src/text/md.rs @@ -33,7 +33,7 @@ static KATEX_B: Lazy = Lazy::new(|| .unwrap() ); -static LOCALE: Lazy> = Lazy::new(|| hayagriva::archive::locales()); +static LOCALE: Lazy> = Lazy::new(hayagriva::archive::locales); static STYLE: Lazy = Lazy::new(|| match ArchivedStyle::InstituteOfPhysicsNumeric.get() { @@ -203,6 +203,7 @@ fn set_heading_ids(events: &mut [Event]) -> Outline { Outline(out) } + fn make_math(event: Event) -> Event { match event { Event::InlineMath(math) => Event::InlineHtml(katex::render_with_opts(&math, &*KATEX_I).unwrap().into()), diff --git a/src/watch.rs b/src/watch.rs index cff837d..9de7103 100644 --- a/src/watch.rs +++ b/src/watch.rs @@ -82,7 +82,7 @@ pub fn watch() -> Result<()> { let thread_i = new_thread_ws_incoming(server, client.clone()); let (tx_reload, thread_o) = new_thread_ws_reload(client.clone()); - while let Ok(ev) = rx.recv().unwrap() { + while let Ok(_ev) = rx.recv().unwrap() { build_styles(); tx_reload.send(()).unwrap(); }