Sha256: 2520eaf6ce9e1c0fc15e30af4650055ecaf1b0d515108763eefc5c2dcb58957f

Contents?: true

Size: 1.2 KB

Versions: 2

Compression:

Stored size: 1.2 KB

Contents

# InlineFn

There are two methods to change regular markdown footnotes to inline mmd/pandoc-style footnotes.

## Pandoc

```ruby
#!/usr/bin/env ruby
# frozen_string_literal: false

require 'inline_fn'

str = %(Lorem ipsum dolor sit amet[^1], consectetur adipisicing elit[^2], sed...
  [^1]: Text of fn 1
  [^2]: Text of fn 2)

puts str.inline_fn_pandoc
# Lorem ipsum dolor sit amet^[Text of fn 1], consectetur adipisicing elit^[Text of fn 2], sed...
```

## MMD

```ruby
#!/usr/bin/env ruby
# frozen_string_literal: false

require 'inline_fn'

str = %(Lorem ipsum dolor sit amet[^1], consectetur adipisicing elit[^2], sed...
  [^1]: Text of fn 1
  [^2]: Text of fn 2)

puts str.inline_fn_mmd
# Lorem ipsum dolor sit amet[^Text of fn 1], consectetur adipisicing elit[^Text of fn 2], sed...
```

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'inline_fn'
```

And then execute:

    $ bundle install

Or install it yourself as:

    $ gem install inline_fn

## Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/bcdavasconcelos/inline_fn

## License

The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
inline_fn-0.1.4 README.md
inline_fn-0.1.3 README.md