Skip to content

Commit

Permalink
Improve 'raw' constructors
Browse files Browse the repository at this point in the history
  • Loading branch information
davesmith00000 committed Dec 18, 2023
1 parent 5dcb885 commit bc45b0c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tyrian/shared/src/main/scala/tyrian/Html.scala
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,12 @@ object Html extends HtmlTags with HtmlAttributes:
def tag[M](name: String)(attributes: List[Attr[M]])(children: List[Elem[M]]): Html[M] =
Tag(name, attributes, children)

def raw[M](name: String)(attributes: Attr[M]*)(html: String): Html[M] =
def raw[M](name: String)(html: String): Html[M] =
RawTag(name, Nil, html)
def raw[M](name: String, attributes: Attr[M]*)(html: String): Html[M] =
RawTag(name, attributes.toList, html)
@targetName("raw-list")
def raw[M](name: String)(attributes: List[Attr[M]])(html: String): Html[M] =
def raw[M](name: String, attributes: List[Attr[M]])(html: String): Html[M] =
RawTag(name, attributes, html)

// Custom tag syntax
Expand Down

0 comments on commit bc45b0c

Please sign in to comment.