Skip to content

Commit

Permalink
trim inspect_or_interpolate/1 strings
Browse files Browse the repository at this point in the history
  • Loading branch information
the-mikedavis committed Mar 18, 2021
1 parent 4dac9d1 commit 403d56e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ The format is based on [Keep a
Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 0.6.2 - 2021-03-17

### Fixed

- Trimmed strings in the `inspect_or_interpolate/1` helper
- this prevents formatting failures when a template does not expect a
newline and a manifest declares a value with triple-quotes

## 0.6.1 - 2021-03-08

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion lib/harness/renderer/helpers.ex
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ defmodule Harness.Renderer.Helpers do
If the item is a binary, it is interpolated. Else, it is inspected with
`Kernel.inspect/2` and then interpolated.
"""
def inspect_or_interpolate(item) when is_binary(item), do: item
def inspect_or_interpolate(item) when is_binary(item), do: String.trim(item)
def inspect_or_interpolate(item), do: Kernel.inspect(item, limit: :infinity)
end

0 comments on commit 403d56e

Please sign in to comment.