Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
edgurgel committed Nov 2, 2022
1 parent 163030b commit 79cc086
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ The package can be installed with:

```elixir
def deps do
[{:solid, "~> 0.13"}]
[{:solid, "~> 0.14"}]
end
```

Expand Down Expand Up @@ -110,11 +110,12 @@ opts = [custom_filters: MyCustomFilters, host: "http://example.com"]

## Strict rendering

`Solid.render/3` doesn't raise or return errors unless `strict_variables: true` is passed as option.
`Solid.render/3` doesn't raise or return errors unless `strict_variables: true` or `strict_filters: true` are passed as options.

If there are any missing variables `Solid.render/3` returns `{:error, errors, result}` where errors is the list of collected errors and `result` is the rendered template.
If there are any missing variables/filters `Solid.render/3` returns `{:error, errors, result}` where errors is the list of collected errors and `result` is the rendered template.

`Solid.render!/3` raises if `strict_variables: true` is passed and there are missing variables.
`Solid.render!/3` raises if `strict_filters: true` is passed and there are missing filters.

## Contributing

Expand Down

0 comments on commit 79cc086

Please sign in to comment.