Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uncheckedHsx + customHsx #2010

Merged
merged 29 commits into from
Nov 2, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
e05de32
add new module
kodeFant Oct 26, 2024
595f778
Fix uncheckedHSX quasiquoter
kodeFant Oct 26, 2024
0644e5b
Make sure closing tags are checked
kodeFant Oct 26, 2024
4a3553a
Fix it so it works
kodeFant Oct 26, 2024
6f6480a
remove UncheckedHSX and attept to restore QQ and Parser modules
kodeFant Oct 31, 2024
ef158e4
reset some unecessary whitespace stuff
kodeFant Oct 31, 2024
ba5bc56
remove unecessary whitespace
kodeFant Oct 31, 2024
d5b95f5
unchecked HSX working, with tests on the parser
kodeFant Oct 31, 2024
f54430b
Add customHsx + tests
kodeFant Oct 31, 2024
e85bb98
fix comment
kodeFant Oct 31, 2024
23bfdf7
fix comment
kodeFant Oct 31, 2024
b0ebf79
Update ihp-hsx/IHP/HSX/Parser.hs
kodeFant Oct 31, 2024
7e45f8a
Update ihp-hsx/IHP/HSX/QQ.hs
kodeFant Oct 31, 2024
ed49673
remove newtypes and use 'HsxSettings' directly
kodeFant Oct 31, 2024
3a7bd62
Fix Github resolve bug
kodeFant Oct 31, 2024
6eb7c17
Aesthethic nitpick
kodeFant Oct 31, 2024
83c3d2f
use customHsx to call hsx and uncheckedHsx
kodeFant Nov 1, 2024
0ad0581
Move CustomHsxCases to Test.HSX namespace
kodeFant Nov 1, 2024
a64d6ef
Fix import
kodeFant Nov 1, 2024
2ff2692
Fix module comment
kodeFant Nov 1, 2024
0185bea
For now, move CustomHsxCases back so the tests are working again
kodeFant Nov 1, 2024
0864979
Add documentation
kodeFant Nov 1, 2024
1de5cb8
Minor doc fix
kodeFant Nov 1, 2024
610ae2f
Formulate solution to QuasiQuoter shortcomings
kodeFant Nov 1, 2024
502aa2d
typo fix
kodeFant Nov 1, 2024
baafd7c
Add use-case example
kodeFant Nov 1, 2024
035ee28
Simplify langauge
kodeFant Nov 1, 2024
e7522e3
Improve examples a bit
kodeFant Nov 1, 2024
5c14759
Add spread example
kodeFant Nov 2, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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">
kodeFant marked this conversation as resolved.
Show resolved Hide resolved
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