StripHeredoc

Build StatusInline docsReleaseHex Version

StripHeredoc is very small library for Elixir projects that needs to strips indentation in heredocs. This is a direct Elixir port from Rails!

The complete documentation for StripHeredoc is located here.

Adding StripHeredoc To Your Project

To use StripHeredoc with your projects, edit your mix.exs file and add it as a dependency:

defp deps do
[{:strip_heredoc, "~> 0.7.0"}]
end

Examples

To use StripHeredoc, add

import StripHeredoc

to the top of the module so you can use strip_heredoc/1 function.

Example:

iex(2)> str = strip_heredoc """
...(2)> foo
...(2)> bar
...(2)> baz
...(2)> """
"foo\n bar\n baz\n"

License

This software is licensed under the MIT license.