Skip to content

Commit

Permalink
add CI and readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Marco Zocca committed Oct 8, 2023
1 parent 2d46c81 commit 7b14752
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
run: |
wget https://github.com/Kleidukos/get-tested/releases/download/v0.1.5.0/get-tested-0.1.5.0-linux-amd64 -O get-tested
chmod +x get-tested
./get-tested --ubuntu --macos $PROJECT_NAME.cabal >> $GITHUB_OUTPUT
./get-tested --ubuntu $PROJECT_NAME.cabal >> $GITHUB_OUTPUT
tests:
name: ${{ matrix.ghc }} on ${{ matrix.os }}
needs: generate-matrix
Expand All @@ -35,7 +35,7 @@ jobs:
uses: actions/checkout@v4
- name: Set up Haskell
id: setup-haskell
uses: haskell/actions/setup@v2
uses: haskell-actions/setup
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: 'latest'
Expand Down
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
# blaze-html-qq

[![CI](https://github.com/ocramz/blaze-html-qq/actions/workflows/ci.yml/badge.svg)](https://github.com/ocramz/blaze-html-qq/actions/workflows/ci.yml)

QuasiQuoter for `blaze-html`. Parse inline HTML snippets at compile time and produce `MarkdownM` values, e.g.

```haskell
{-# language QuasiQuotes #-}
import qualified Data.Text.Lazy as TL (Text)
import qualified Text.Blaze.Html.Renderer.Text as BT (renderHtml)

import Text.Blaze.HTML.QQ (blaze)

test :: TL.Text
test = BT.renderHtml [blaze|
<div>
<h1 class="widget" style="potato">
Hello!
</h1>
</div>
|]
```

```
> test
"<div><h1 class=\"widget\" style=\"potato\">Hello!</h1></div>"
```

0 comments on commit 7b14752

Please sign in to comment.