5e08f9b6c6
This makes it possible for users of cheddar as a library to supply their own shortlinks. In practice it is unlikely anyone will do this, but the change also allows us to (relatively) easily add additional shortlinks to the set used by TVL. Note that Cheddar is primarily intended for use by TVL and the default rendering function interfaces have not changed, and will default to using TVL shortlinks. A new public function `format_markdown_with_shortlinks` has been added with which users can use an alternative set of shortlinks. This function should not be used in TVL depot code. Change-Id: I4ddab28cbcf45d07c51323b7b730b96e62922816 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3083 Tested-by: BuildkiteCI Reviewed-by: lukegb <lukegb@tvl.fyi> |
||
---|---|---|
.. | ||
src | ||
.gitignore | ||
.skip-subtree | ||
build.rs | ||
Cargo.lock | ||
Cargo.toml | ||
default.nix | ||
README.md |
cheddar
Cheddar is a tiny Rust tool that uses syntect to render source code to syntax-highlighted HTML.
It's invocation is compatible with cgit
filters, i.e. data is read from
stdin
and the filename is taken from argv
:
cat README.md | cheddar README.md > README.html
In fact, if you are looking at this file on git.tazj.in chances are that it was rendered by cheddar.
The name was chosen because I was eyeing a pack of cheddar-flavoured crisps while thinking about name selection.