diff options
author | Martin Fischer <martin@push-f.com> | 2022-10-28 10:56:38 +0200 |
---|---|---|
committer | Martin Fischer <martin@push-f.com> | 2022-10-28 12:25:57 +0200 |
commit | 20555bba82f9420998ce0d4b42f29d9398d5036b (patch) | |
tree | 729c7b7407ac80c5c52f50aab26869a497dee834 /src/get_routes.rs | |
parent | 0b699948d33c6b209439e2eb77c60c220130dc6b (diff) |
drop support for Lua shebangs
Now that we have Lua templating, which is more flexible,
it doesn't make sense to keep Lua shebangs around.
Diffstat (limited to 'src/get_routes.rs')
-rw-r--r-- | src/get_routes.rs | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/src/get_routes.rs b/src/get_routes.rs index 951c7b6..10d3476 100644 --- a/src/get_routes.rs +++ b/src/get_routes.rs @@ -11,7 +11,6 @@ use hyper::http::request::Parts; use serde::Deserialize; use sputnik::html_escape; use sputnik::request::SputnikParts; -use std::fmt::Write; use std::str::from_utf8; use crate::action_links; @@ -81,33 +80,6 @@ fn view_blob<C: Controller>( match from_utf8(blob.content()) { Ok(text) => { - #[cfg(feature = "lua")] - if let Some(script) = super::lua::parse_shebang(text) { - match script.run(&ctx) { - Ok(output) => { - write!( - page.body, - "<div>rendered with <a href='{}'>{}</a></div>", - html_escape( - controller.build_url_path(&ctx.branch, &script.module_path()) - ), - html_escape(script.lua_module_name) - ); - page.body.push_str(&output); - } - Err(err) => { - write!( - page.body, - "<div class=error><a href='{}'>{}</a>: {err}</div>", - html_escape( - controller.build_url_path(&ctx.branch, &script.module_path()) - ), - html_escape(script.lua_module_name) - ); - } - }; - return Ok(page.into()); - } if let Some(renderer) = get_renderer(&ctx.path) { renderer(text, &mut page, RenderMode::View, &ctx); } else { |