This registry holds cartridges that generate HTML from the given source Fart.
html.syntax.gh cartridge
a.k.a. html.syntax or html.syntax.default
Example in URL format: https://fart.deno.dev/html.syntax/EthanThatOneKid/fart/main/ex/pokemon/mod.html
This cartridge would just return the source Fart, but annotated with HTML tags that contain the appropriate CSS classes. The .gh at the end determines which CSS classes are used to represent the syntax highlighting. By default, the highlighter uses the GitHub highlighting pattern. An example is shown below from https://etok.codes/acmcsuf.com/blob/main/src/client.ts:
The core algorithm needed is the ability to "pretty print" (a.k.a. format; fmt for short) Fart code. This feature can use shared logic to accomplish the HTML highlighting idea.
What is this registry?
This registry holds cartridges that generate HTML from the given source Fart.
html.syntax.gh
cartridgeThis cartridge would just return the source Fart, but annotated with HTML tags that contain the appropriate CSS classes. The
.gh
at the end determines which CSS classes are used to represent the syntax highlighting. By default, the highlighter uses the GitHub highlighting pattern. An example is shown below from https://etok.codes/acmcsuf.com/blob/main/src/client.ts: