mirror of
https://github.com/aelve/guide.git
synced 2024-12-23 04:42:24 +03:00
Don't use 'show' on Markdown (#368)
This commit is contained in:
parent
c4051a9285
commit
285dd6b7f3
@ -32,7 +32,7 @@ import Imports
|
|||||||
|
|
||||||
import Named
|
import Named
|
||||||
|
|
||||||
import Guide.Markdown (toMarkdownBlock, toMarkdownTree, toMarkdownInline)
|
import Guide.Markdown (toMarkdownBlock, toMarkdownTree, toMarkdownInline, markdownBlockSource, markdownTreeSource, markdownInlineSource)
|
||||||
import Guide.Types.Core (Category (..), CategoryStatus, Item (..), ItemSection, Trait (..),
|
import Guide.Types.Core (Category (..), CategoryStatus, Item (..), ItemSection, Trait (..),
|
||||||
TraitType)
|
TraitType)
|
||||||
import Guide.Utils (Uid (..), makeClassWithLenses, fields)
|
import Guide.Utils (Uid (..), makeClassWithLenses, fields)
|
||||||
@ -142,7 +142,7 @@ categoryToRowCategory $(fields 'Category) = CategoryRow
|
|||||||
, categoryRowCreated = categoryCreated
|
, categoryRowCreated = categoryCreated
|
||||||
, categoryRowGroup = categoryGroup
|
, categoryRowGroup = categoryGroup
|
||||||
, categoryRowStatus = categoryStatus
|
, categoryRowStatus = categoryStatus
|
||||||
, categoryRowNotes = toText $ show categoryNotes -- TODO fix!
|
, categoryRowNotes = markdownBlockSource categoryNotes
|
||||||
, categoryRowEnabledSections = categoryEnabledSections
|
, categoryRowEnabledSections = categoryEnabledSections
|
||||||
, categoryRowItemsOrder = map itemUid categoryItems
|
, categoryRowItemsOrder = map itemUid categoryItems
|
||||||
}
|
}
|
||||||
@ -193,9 +193,9 @@ itemToRowItem catId (arg #deleted -> deleted) $(fields 'Item) = ItemRow
|
|||||||
, itemRowCreated = itemCreated
|
, itemRowCreated = itemCreated
|
||||||
, itemRowLink = itemLink
|
, itemRowLink = itemLink
|
||||||
, itemRowHackage = itemHackage
|
, itemRowHackage = itemHackage
|
||||||
, itemRowSummary = toText $ show itemSummary -- TODO fix
|
, itemRowSummary = markdownBlockSource itemSummary
|
||||||
, itemRowEcosystem = toText $ show itemEcosystem -- TODO fix
|
, itemRowEcosystem = markdownBlockSource itemEcosystem
|
||||||
, itemRowNotes = toText $ show itemNotes -- TODO fix
|
, itemRowNotes = markdownTreeSource itemNotes
|
||||||
, itemRowDeleted = deleted
|
, itemRowDeleted = deleted
|
||||||
, itemRowCategoryUid = catId
|
, itemRowCategoryUid = catId
|
||||||
, itemRowProsOrder = map traitUid itemPros
|
, itemRowProsOrder = map traitUid itemPros
|
||||||
@ -222,7 +222,7 @@ traitToTraitRow
|
|||||||
traitToTraitRow itemId (arg #deleted -> deleted) traitType $(fields 'Trait) =
|
traitToTraitRow itemId (arg #deleted -> deleted) traitType $(fields 'Trait) =
|
||||||
TraitRow
|
TraitRow
|
||||||
{ traitRowUid = traitUid
|
{ traitRowUid = traitUid
|
||||||
, traitRowContent = toText $ show traitContent -- TODO fix
|
, traitRowContent = markdownInlineSource traitContent
|
||||||
, traitRowDeleted = deleted
|
, traitRowDeleted = deleted
|
||||||
, traitRowType = traitType
|
, traitRowType = traitType
|
||||||
, traitRowItemUid = itemId
|
, traitRowItemUid = itemId
|
||||||
|
Loading…
Reference in New Issue
Block a user