Skip to content

Custom tags #20

@samnung

Description

@samnung

Allow defining custom tags. It would allow creating something what mixin allows but usable in the middle of the text.

Example of a definition of custom tag:

tag bold_text(klass: nil)
    strong.sans(class: klass)
        - default_block.call

And usage:

p Lorem ipsum <bold_text class="abc">dolor sit amet</bold_text>

Which will produce:

<p>Lorem ipsum <strong class="sans abc">dolor sit amet</strong></p>

This can be done as optional feature and using nokogiri library.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions