fix
This commit is contained in:
parent
00f8fdc9e1
commit
c6f15577bb
|
@ -91,15 +91,9 @@ fn main() -> Result<(), maj::server::Error> {
|
|||
thread::spawn(move || http::run(h.clone(), port));
|
||||
}
|
||||
|
||||
task::block_on(maj::server::serve(
|
||||
h.clone(),
|
||||
config,
|
||||
opts.host,
|
||||
opts.port,
|
||||
))?;
|
||||
task::block_on(maj::server::serve(h.clone(), config, opts.host, opts.port))?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
// And finally, include the generated code for templates and static files.
|
||||
include!(concat!(env!("OUT_DIR"), "/templates.rs"));
|
||||
|
|
|
@ -62,8 +62,8 @@ pub fn render(nodes: Vec<Node>, out: &mut impl Write) -> io::Result<()> {
|
|||
match node {
|
||||
Text(body) => write!(out, "{}\n", body)?,
|
||||
Link { to, name } => match name {
|
||||
Some(name) => write!(out, "{} {}\n", to, name)?,
|
||||
None => write!(out, "{}\n", to)?,
|
||||
Some(name) => write!(out, "=> {} {}\n", to, name)?,
|
||||
None => write!(out, "=> {}\n", to)?,
|
||||
},
|
||||
Preformatted(body) => write!(out, "```\n{}\n```\n", body)?,
|
||||
Heading { level, body } => write!(out, "{} {}\n", "#".repeat(level as usize), body)?,
|
||||
|
|
Loading…
Reference in New Issue