{"repo":"bitjourney/mato","free":true,"listed":false,"github":"https://github.com/bitjourney/mato","clone":"git clone https://github.com/bitjourney/mato.git","description":"A pipeline-based markdown toolkit with CommonMark(er)","language":"Ruby","stars":23,"topics":["ruby","markdown","commonmark"],"license":"MIT","category":"productivity","readme_excerpt":"Mato Mato , standing for Ma rkdown To oolkit, is an extensible, pipeline-based markdown processing toolkit, inspired by HTML::Pipeline. This gem is built on commonmarker, a CommonMark implementation, which can parse markdown documents. Usage Filters There are three kinds of filters to mutate input texts in Mato: Text Filters Markdown Filters HTML Filters Text Filters A text filter is a callable instance that takes a String and returns a mutated arg. For example: Markdown Filters A markdown filter is a callable instance that takes a Commonmarker::Node and mutate it in the method. The return value is ignored. For example: HTML Filters An HTML filter is a callable object that takes a Nokogiri::HTML4::DocumentFragment and mutate it in the method. The return value is ignored. Timeout There is timeout option to kill filters in a specified time in seconds: If you set on error callback, you can omit on timeout callback. Errors in Filters There is on error callback to rescue errors in filters: Installation Add this line to your application's Gemfile: And then execute: $ bundle Or install it yourself as: $ gem install mato Motivation The original idea comes from qiita-markdown, a markdown processing tool like mato, based on html-pipeline. html-pipeline is a great tool that invents the idea of \"pipeline\", to filter HTML node (or Nokogiri::XML::Node ) in each filter. This is safe, fast, and easy to enhance. However, html-pipeline is not suitable for cache, esp. context-aware caching. (TB","default_branch":null,"files":null,"tree":[],"storefront":"/r/bitjourney","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/bitjourney/mato/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."}