{"repo":"littletof/charmd","free":true,"listed":false,"github":"https://github.com/littletof/charmd","clone":"git clone https://github.com/littletof/charmd.git","description":"A simple, extendable markdown renderer for your terminal.","language":"JavaScript","stars":65,"topics":["ast","deno","deno-cli","terminal","markdown","markdown-viewer","cli","terminal-markdown"],"license":null,"category":"cli-tools","readme_excerpt":"🎩 charMD A simple, extendable markdown renderer for your terminal. charMD enables you to render a markdown text into a string, which printed in the terminal provides a well formatted output, instead of plain text. Try it out To see the general capabilities of this module run: To see, how a specific markdown gets rendered run: Usage Simply import the module and call the renderMarkdown method with your markdown text. Alternatevily you can import from JSR 🧩 Extensions The module provides a way to extend it functionality with additional extensions, which can be provided in it's options param. An extension can implement any of the Extension interface's methods, which are: - init : Called before AST generation, if a string is returned, it will override the input markdown for later extension's init fn and processing steps. - postAST : Called with the generated AST's root node, before any transformations - transformNode : Called with each node to do modifications on the node and it's children in the AST . - postTransform : Called with root, after all the transformations ran for all nodes. - generateNode : Called with each node. It should return the string representation of the rendered node,if the extension handles that specific node, or void, if its not handled by the extension. - postGenerate : Called after the string representation is created. A simple extension, that renders link with green and blue instead of the built-in cyan would look something like this: Direct use - cli.t","default_branch":null,"files":null,"tree":[],"storefront":"/r/littletof","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/littletof/charmd/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}