Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
[ci skip ]
  • Loading branch information
edgurgel authored Sep 20, 2021
1 parent e80c4d5 commit b8c8f66
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ end

## Custom tags

To implement new tag you need to create new module that implement the `Tag` behaviour:
To implement a new tag you need to create a new module that implements the `Tag` behaviour:

```elixir
defmodule MyCustomTag do
Expand All @@ -48,18 +48,18 @@ defmodule MyCustomTag do
end
```

- `spec` define how to parse your tag
- `render` define how to render your tag
- `spec` defines how to parse your tag;
- `render` defines how to render your tag.

Then add the tag to your parser
Now we need to add the tag to the parser

```
defmodule MyParser do
use Solid.Parser.Base, custom_tags: [MyCustomTag]
end
```

Then pass the custom parser as option
And finally pass the custom parser as an option:

```elixir
"{% my_tag %}"
Expand Down

0 comments on commit b8c8f66

Please sign in to comment.