about summary refs log tree commit diff
path: root/tools/cheddar (follow)
AgeCommit message (Collapse)AuthorFilesLines
2020-01-19 r/426 feat(cheddar): Add toggle flag for about-filter behaviourVincent Ambo1-13/+38
Cheddar now needs to be passed the --about-filter flag to toggle the behaviour for rendering Markdown into HTML. By default Markdown will be highlighted like normal source code (i.e. cgit source-filtering is the default behaviour).
2019-12-22 r/291 fix(cheddar): Fix errors if filename does not have an extensionVincent Ambo1-9/+7
2019-12-21 r/288 feat(cheddar): Style pre-elements for better readabilityVincent Ambo1-4/+22
Uses GitHub-like styling for <pre> elements, i.e. slight padding and background colour highlighting.
2019-12-21 r/287 feat(cheddar): Render code blocks in Markdown via syntectVincent Ambo1-26/+82
Implements fully static (i.e. no JavaScript!) highlighting of code blocks when rendering Markdown. This works by walking through the Comrak AST and replacing any code blocks with pre-rendered HTML blocks. Syntaxes are chosen based on the "block info", which is the string users put after the block's opening fence. This can either be a (case-insensitive) name of a syntax, or alternatively a file extension associated with the desired syntax. The theme is set to one that imitates GitHub.
2019-12-21 r/286 docs(cheddar): Mention cgit filter compatibility in READMEVincent Ambo1-0/+11
2019-12-21 r/282 feat(cheddar): Render Markdown via ComrakVincent Ambo1-9/+24
Renders any ".md" file by pushing it through the Comrak rendering pipeline. This does not yet implement syntax highlighting of fenced blocks, but we're getting there.
2019-12-21 r/281 refactor(cheddar): Set up scaffolding for Markdown renderingVincent Ambo3-13/+224
Generalises the two bits of the program that will be required either way (extension parsing and syntax loading). A dependency on Comrak is introduced as I think GitHub-flavoured Markdown (with all its fancy extensions) is desirable!
2019-12-21 r/277 feat(cheddar): Use syntax highlighting assets from batVincent Ambo2-2/+20
This uses Nix to inject the path to the syntax highlighting assets that ship with the bat source code into the cheddar build at compile time, where the Rust compiler then inserts it into the binary via macros. bat has a lot of custom syntax highlighting definitions that they collected from all over the place (including for languages like Nix!) and this makes them accessible to cheddar. Also if you're reading this, can you just take a moment to appreciate how incredible it is that Nix just lets us do something like this?!
2019-12-21 r/276 feat(tools/cheddar): Check in new syntax highlighting toolVincent Ambo7-0/+772
The first step with this tool will be to use it as a source-filter for cgit. The second step is to use it as the Markdown renderer by depending on one of the Markdown libraries, with integration for rendering code snippets directly.