about summary refs log tree commit diff
path: root/tools/cheddar/src/lib.rs (follow)
AgeCommit message (Collapse)AuthorFilesLines
2023-09-08 r/6564 feat(tools/cheddar): allow disabling tagfilter extensionVincent Ambo1-4/+11
Makes it possible to do things like embedding YouTube videos in blog posts rendered through Cheddar. Change-Id: I6aed943c7bec0167b9f009d36dd067c52c6d3083 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9275 Tested-by: BuildkiteCI Reviewed-by: Mark Shevchenko <markshevchenko@gmail.com>
2023-01-07 r/5622 chore(tools/cheddar): bump to syntect 5.0Vincent Ambo1-6/+14
Upgrade to syntect 5.0 and load the new kind of syntax set serialisation with the new helper function for that purpose. Includes other minor API fixes as well, note that the things that are now calling `expect` previously failed internally at those points and we're reasonably confident they don't fail in production. This has been waiting for a long time ... Change-Id: I8af4fef995ff64bfbe24e1f13917fa50ecb6e4ad Reviewed-on: https://cl.tvl.fyi/c/depot/+/7787 Reviewed-by: sterni <sternenseemann@systemli.org> Tested-by: BuildkiteCI
2022-02-08 r/3791 style(rust): Format all Rust code with rustfmtVincent Ambo1-4/+2
Change-Id: Iab7e00cc26a4f9727d3ab98691ef379921a33052 Reviewed-on: https://cl.tvl.fyi/c/depot/+/5240 Tested-by: BuildkiteCI Reviewed-by: kanepyork <rikingcoding@gmail.com> Reviewed-by: Profpatsch <mail@profpatsch.de> Reviewed-by: grfn <grfn@gws.fyi> Reviewed-by: tazjin <tazjin@tvl.su>
2021-12-18 r/3293 feat(tools/cheddar): shortlink depot revisionssterni1-0/+4
r/3000 will now be shortlinked to show the commit in cgit. Going via atward probably doesn't make sense at this point, since the depot refs are not available in sourcegraph at all (for reasons I can't repeat). Switching to atward might be interesting when/if we introduce support for shortlinking // paths. Fixes: b/163 Change-Id: I57c1a7d02d881e4f8b3ee1f71755dd7930925dc4 Reviewed-on: https://cl.tvl.fyi/c/depot/+/4402 Tested-by: BuildkiteCI Autosubmit: sterni <sternenseemann@systemli.org> Reviewed-by: tazjin <mail@tazj.in>
2021-09-10 r/2835 refactor(cheddar): Support multiple shortlinks & custom link setsVincent Ambo1-10/+42
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>
2021-05-04 r/2565 feat(cheddar): Implement highlighting of CL and bug shortlinksVincent Ambo1-1/+15
Implements highlighting of shortlinks like cl/123, or b/123. Highlighting works by replacing the input Markdown using a simple regular expression replacement. We also considered parsing and replacing these links in the Markdown AST, but it would have been significantly more complex (due to arena allocation) for little upside and no obvious performance benefit. Change-Id: I53f03fb17491046d89d0b7f605929571c11ee9a8 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3082 Tested-by: BuildkiteCI Reviewed-by: eta <eta@theta.eu.org>
2021-05-03 r/2556 refactor(cheddar): Split out a library with rendering logicVincent Ambo1-0/+291
Splits `main.rs` into `lib.rs` and `bin/cheddar.rs`, which enables reuse of cheddar's rendering logic in other Rust applications. Change-Id: Ifd1a44a8d1620c595550a0a497a25b0563e917ca Reviewed-on: https://cl.tvl.fyi/c/depot/+/3060 Tested-by: BuildkiteCI Reviewed-by: flokli <flokli@flokli.de>