Sha256: c9b8c8b57a32f24fbf88a602e926111553e0f8db3a304cc68d1faf219569c2f2
Contents?: true
Size: 690 Bytes
Versions: 2
Compression:
Stored size: 690 Bytes
Contents
# markdown-expander Adds some new syntax to markdown ## Installation Add this line to your application's Gemfile: ```ruby gem 'markdown-expander' ``` And then execute: $ bundle Or install it yourself as: $ gem install markdown-expander ## Expressions ```ruby require "markdown-expander" MarkdownExpander::Expander.new( "# Title: {{thing.title}}" ).render( thing: {title: "Hello"} ) #=> "# Title: Hello" ``` ## Loops ```ruby require "markdown-expander" template = <<-TEMPLATE {{thing in stuff}} # {{thing.title}} {{end}} TEMPLATE MarkdownExpander::Expander.new(template).render( stuff: [ {title: "First!"}, {title: "Second!"} ] ) #=> "# First!\n# Second!\n" ```
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
markdown-expander-0.3.0 | README.md |
markdown-expander-0.2.0 | README.md |