Skip to content

Commit

Permalink
upd
Browse files Browse the repository at this point in the history
  • Loading branch information
Marco Zocca committed Oct 8, 2023
1 parent c96dc5f commit f78d17e
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 17 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![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.
QuasiQuoter for `blaze-html`. Parse inline HTML snippets at compile time and produce `MarkupM` values, e.g.

```haskell
{-# language QuasiQuotes #-}
Expand Down
6 changes: 3 additions & 3 deletions blaze-html-qq.cabal
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: blaze-html-qq
version: 0.1.0.0
-- synopsis:
-- description:
synopsis: QuasiQuoter for blaze-html @MarkupM@ values
description: QuasiQuoter for blaze-html @MarkupM@ values
homepage: https://github.com/ocramz/blaze-html-qq
license: BSD3
license-file: LICENSE
Expand All @@ -16,7 +16,7 @@ cabal-version: >=1.10
tested-with: GHC == 8.10.7
, GHC == 9.0.2
, GHC == 9.2.7
, GHC == 9.4.1
-- , GHC == 9.4.1
-- , GHC == 9.4.6
-- , GHC == 9.6.2

Expand Down
7 changes: 6 additions & 1 deletion src/Text/Blaze/Html/QQ.hs
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
{-# language OverloadedStrings #-}
{-# language QuasiQuotes #-}
module Text.Blaze.Html.QQ (blaze) where
module Text.Blaze.Html.QQ (
blaze
-- ** Utilities
, parseHTML
, drawHTML
) where
import Text.Blaze.Html.QQ.Internal -- (blaze, documentQQ)

import qualified Data.Text.Lazy as TL (Text)
Expand Down
13 changes: 1 addition & 12 deletions src/Text/Blaze/Html/QQ/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
module Text.Blaze.Html.QQ.Internal (
blaze
-- ** Utilities
, parseHTML
, drawHTML

) where
Expand Down Expand Up @@ -149,18 +150,6 @@ trimWhitespace = f . f
where
f = reverse . dropWhile isSpace

noNewlines :: String -> String
noNewlines = skipChar (== '\n')

-- λ> skipChar (== 'o') "potato"
-- "ptat"
skipChar :: (Char -> Bool) -> String -> String
skipChar f = foldr ins []
where
ins c acc
| f c = acc
| otherwise = c : acc

-- | build a ChoiceString
mkCS :: String -> ChoiceString
mkCS = String
Expand Down

0 comments on commit f78d17e

Please sign in to comment.