Skip to content

Commit

Permalink
Improve examples a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
kodeFant committed Nov 1, 2024
1 parent 035ee28 commit e7522e3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions Guide/hsx.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -291,9 +291,9 @@ It will still check for a valid HTML structure, but it will accept any tag and a

```haskell
[uncheckedHsx|
<my-custom-element custom-attribute="value">
<anytagname custom-attribute="value">
Content
</my-custom-element>
</anytagname>
|]
```

Expand Down Expand Up @@ -323,7 +323,7 @@ myHsx :: QuasiQuoter
myHsx = customHsx
(HsxSettings
{ checkMarkup = True
, additionalTagNames = Set.fromList ["book", "title", "name"]
, additionalTagNames = Set.fromList ["book", "heading", "name"]
, additionalAttributeNames = Set.fromList ["_", "custom-attribute"]
}
)
Expand All @@ -350,8 +350,8 @@ import Application.Helper.CustomHsx (myHsx) -- Add this line

```haskell
[myHsx|
<book>
<title custom-attribute="value">My Book</title>
<book _="on click log 'Hello'">
<heading custom-attribute="value">My Book</heading>
<name>Author Name</name>
</book>
|]
Expand Down
10 changes: 5 additions & 5 deletions ihp-hsx/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -287,9 +287,9 @@ It will still check for a valid HTML structure, but it will accept any tag and a

```haskell
[uncheckedHsx|
<my-custom-element custom-attribute="value">
<anytagname custom-attribute="value">
Content
</my-custom-element>
</anytagname>
|]
```

Expand Down Expand Up @@ -319,7 +319,7 @@ myHsx :: QuasiQuoter
myHsx = customHsx
(HsxSettings
{ checkMarkup = True
, additionalTagNames = Set.fromList ["book", "title", "name"]
, additionalTagNames = Set.fromList ["book", "heading", "name"]
, additionalAttributeNames = Set.fromList ["_", "custom-attribute"]
}
)
Expand All @@ -346,8 +346,8 @@ import Application.Helper.CustomHsx (myHsx) -- Add this line

```haskell
[myHsx|
<book>
<title custom-attribute="value">My Book</title>
<book _="on click log 'Hello'">
<heading custom-attribute="value">My Book</heading>
<name>Author Name</name>
</book>
|]
Expand Down

0 comments on commit e7522e3

Please sign in to comment.