README.md in redcarpet-render-seeing_is_believing-0.1.0 vs README.md in redcarpet-render-seeing_is_believing-0.2.0

- old
+ new

@@ -1,10 +1,12 @@ # Redcarpet::Render::SeeingIsBelieving +[![Build Status](https://travis-ci.org/odlp/redcarpet-render-seeing_is_believing.svg?branch=master)](https://travis-ci.org/odlp/redcarpet-render-seeing_is_believing) + Powerup the Ruby examples in your markdown. Combines the excellent [Redcarpet][redcarpet] (a markdown parser) with [Seeing Is Believing][sib], -which evaluates each line of code. +which shows the evaluated result from each line of code. If your markdown includes a fenced code block with `ruby+` specified as the language: <pre><code>```ruby+ @@ -21,15 +23,15 @@ ```ruby require "redcarpet-render-seeing_is_believing" require "redcarpet" class MyCustomHtmlRenderer < Redcarpet::Render::HTML + prepend Redcarpet::Render::SeeingIsBelieving + def block_code(code, language) "<pre><code>#{code}</code></pre>" end - - prepend Redcarpet::Render::SeeingIsBelieving end Redcarpet::Markdown.new(MyCustomHtmlRenderer, fenced_code_blocks: true). render("some markdown!") ``` @@ -54,9 +56,17 @@ ``` [redcarpet]: https://github.com/vmg/redcarpet [sib]: https://github.com/JoshCheek/seeing_is_believing +## Options + +You can pass additional options after the `ruby+` language hint: + +- `ruby+e`: Hints exceptions are expected, and should be displayed. Exceptions + are hidden by default. + ## TODO -- Ignore exceptions / failed evaluations by default - Allow comments to be scoped to specific lines +- Wrap comments to the following line when the overall length is greater than + 80 chars