Sha256: ad40b017843a1cae2809286ab80d0d89b4e01a5aaaa847153728a056001b0774

Contents?: true

Size: 706 Bytes

Versions: 2

Compression:

Stored size: 706 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
:example:
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"
:end:
```

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
markdown-expander-0.3.0 README.md.docu
markdown-expander-0.2.0 README.md.docu