packages feed

persistent-documentation 0.1.0.3 → 0.1.0.4

raw patch · 3 files changed

+16/−2 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -1,5 +1,9 @@ # Revision history for persistent-documentation +## 0.1.0.4++* Replace newlines with line breaks in field comments as rendered by `markdownTableRenderer` [#9](https://github.com/lumihq/persistent-documentation/pull/9)+ ## 0.1.0.3  * Support `persistent-2.12` and `persistent-2.13`. [#4](https://github.com/lumihq/persistent-documentation/pull/4)
persistent-documentation.cabal view
@@ -1,7 +1,7 @@ cabal-version:       >=1.10  name:                persistent-documentation-version:             0.1.0.3+version:             0.1.0.4 synopsis:            Documentation DSL for persistent entities description:         A convenient DSL that allows you to attach documentation to persistent database entities -- bug-reports:
src/Database/Persist/Documentation.hs view
@@ -297,7 +297,7 @@         , "` | "         , showType fieldSqlType         , " | "-        , fold mextra+        , foldMap cleanComment mextra         , " |"         ] @@ -344,6 +344,16 @@    showType SqlBlob      = "blob"    showType SqlBool      = "boolean"    showType (SqlOther t) = t+   +   cleanComment :: Text -> Text+   cleanComment comment =+     let+       -- Newline characters may be present in a comment. The need to be removed+       -- to allow the markdown tables to render properly.+       newlineToBr '\n' = "<br>"+       newlineToBr c = Text.singleton c+     in+       Text.concatMap newlineToBr $ Text.strip comment  -- | Render the '[EntityDef]' into a Markdown table representation. See -- 'markdownTable