GPL-2.0-only licensed by Alexander Dunlap, Patrick Brisbin
Maintained by Patrick Brisbin
This version can be pinned in stack with:yesod-markdown-0.12.6.14@sha256:355bcafe531e96a62e0b0cd73a524aa2ab8f22abc2edc96e0f409962c1585e67,1616

Module documentation for 0.12.6.14

Yesod Markdown

Hackage Stackage Nightly Stackage LTS CI

A small wrapper over Pandoc’s powerful Markdown -> Html support, with usage tailored for Yesod.

Usage

getPageR :: FilePath -> Handler RepHtml
getPageR fp = do
    content <- liftIO
        $ fmap markdownToHtml
        $ markdownFromFile fp

    defaultLayout $ do
        [shamlet|
            <div class="content">
                #{content}
            |]

The default extensions are minimal, you can specify your preferred extensions with markdownToHtmlWithExtensions:

import Text.Pandoc.Extensions (githubMarkdownExtensions)

getPageR :: FilePath -> Handler RepHtml
getPageR fp = do
    content <- liftIO
        $ fmap (markdownToHtmlWithExtensions githubMarkdownExtensions)
        $ markdownFromFile fp

    defaultLayout $ do
        [shamlet|
            <div class="content">
                #{content}
            |]

For more information, see the haddocks.

Developing & Tests

stack setup
stack build --pedantic --test

CHANGELOG | LICENSE

Changes

Unreleased

v0.12.6.14

  • Change GHC Support

    • Add 9.4, 9.6, and 9.8
    • Drop 8.4

    NOTE: Things may still compile on versions not present here. These are just the versions we test with on CI.

v0.12.6.13

  • Support GHCs 9.0 and 9.2

v0.12.6.12

  • Relax test assertion for change in xss-sanitize behavior.

v0.12.6.11

Released without changes, to test release automation.

v0.12.6.10

  • Remove all dependencies upper bounds

v0.12.6.9

  • Allow yesod-form-1.7

v0.12.6.8

  • Allow persistent-2.12

v0.12.6.7

  • Allow pandoc-2.13

v0.12.6.6

  • Allow pandoc-2.12

v0.12.6.5

  • Fix incorrect dependency bounds

v0.12.6.4

  • Allow pandoc-2.11 and bytestring 0.11

v0.12.6.3

  • Allow pandoc-2.9

v0.12.6.2

  • Allow pandoc-2.7

v0.12.6.1

  • Allow pandoc-2.6

v0.12.6.0

  • Allow pandoc-2.5

v0.12.5

  • Allow pandoc-2.4

v0.12.4

v0.12.3

  • Added markdownToHtmlWith & markdownToHtmlWithExtensions
  • Deprecate internal conversion functions

v0.12.2

v0.12.1

  • Allow pandoc-2.1

v0.12.0

  • Require pandoc-2.0, support GHC 8.2 (@cdepillabout)
  • Drop GHC 7.10 support

v0.11.4

v0.11.3

v0.11.2

No changes

v0.11.1

v0.11.0

  • Allow pandoc-1.16

v0.10.0

  • Require pandoc-1.14, support pandoc 1.15 (@robgssp)

v0.9.4

v0.9.3.1

v0.9.3

  • Allow yesod-1.4 (@nek0)

v0.9.2

v0.9.1

  • Remove temporary < 1.2.0.2 workaround
  • Add dependency bounds to avoid broken texmath-0.6.5.1

v0.9.0

  • Support shakespeare (renamed from hamlet package)

v0.8.5

  • Add upper bound on temporary-1.2.0.2
  • Write PersistFieldSql instance by hand

v0.8.4

  • Allow text-1.*
  • Allow blaze-html-0.7 and blaze-markup-0.7

v0.8.3

v0.8.2

v0.8.1

  • Derive PersistFieldSql

v0.8.0

v0.7.2

v0.7.1

  • Trim \r from textarea content

v0.7

  • Fix reading content with UTF-8 characters

v0.6

  • Support pandoce-1.10

v0.5.1

v0.5.0

  • Require yesod-1.1 and yesod-form-1.2 (@dlthomas)

v0.4.1

v0.4.0

  • Support yesod-1.0 (@pSub)

v0.3.4

  • Drop GHC 6 support (@pSub)

v0.3.3

v0.3.2

  • Require pandoc-1.9

v0.3.1

This is the first version where we begin tracking changes.