Liquex.Parser.Tag (liquex v0.9.0) View Source

Helper methods for parsing tags

Link to this section Summary

Link to this section Functions

Link to this function

close_tag(combinator \\ empty())

View Source

Specs

close_tag(NimbleParsec.t()) :: NimbleParsec.t()

Parse close tags

Examples

* "%}"
* "-%} "
Link to this function

expression_tag(combinator \\ empty(), tag_name)

View Source

Specs

expression_tag(NimbleParsec.t(), String.t()) :: NimbleParsec.t()

Parse tag with no expression

Examples

* "{% if a == 5 %}"
* "{% elsif b >= 10 and a < 4 %}"
Link to this function

open_tag(combinator \\ empty())

View Source

Specs

open_tag(NimbleParsec.t()) :: NimbleParsec.t()

Parse open tags

Examples

* "{%"
* "{%-"
Link to this function

tag_directive(combinator \\ empty(), name)

View Source

Specs

tag_directive(NimbleParsec.t(), String.t()) :: NimbleParsec.t()

Parse basic tag with no arguments

Examples

* "{% break %}"
* "{% endfor %}"