1
1
mirror of https://github.com/aelve/guide.git synced 2024-12-23 12:52:31 +03:00

Quick-fix for Edit'Set* cases when old Text value is empty

This commit is contained in:
Abhishek Bhattacharya 2016-10-16 22:10:45 +05:30
parent 36b79b8d40
commit f69acf774b

View File

@ -411,7 +411,7 @@ renderEdit globalState edit = do
" from " >> quote (toHtml (show oldStatus))
" to " >> quote (toHtml (show newStatus))
Edit'SetCategoryNotes catId oldNotes newNotes -> do
p_ $ "changed notes of category " >> printCategory catId
p_ $ (if (T.null oldNotes) then "added" else "changed") >> " notes of category " >> printCategory catId
table_ $ tr_ $ do
td_ $ blockquote_ $ toHtml (toMarkdownBlock oldNotes)
td_ $ blockquote_ $ toHtml (toMarkdownBlock newNotes)
@ -441,24 +441,24 @@ renderEdit globalState edit = do
" from " >> code_ (toHtml (show oldKind))
" to " >> code_ (toHtml (show newKind))
Edit'SetItemDescription itemId oldDescr newDescr -> do
p_ $ "changed description of item " >> printItem itemId
p_ $ (if (T.null oldDescr) then "added" else "changed") >> " description of item " >> printItem itemId
table_ $ tr_ $ do
td_ $ blockquote_ $ toHtml (toMarkdownBlock oldDescr)
td_ $ blockquote_ $ toHtml (toMarkdownBlock newDescr)
Edit'SetItemNotes itemId oldNotes newNotes -> do
p_ $ "changed notes of item " >> printItem itemId
p_ $ (if (T.null oldNotes) then "added" else "changed") >> " notes of item " >> printItem itemId
table_ $ tr_ $ do
td_ $ blockquote_ $ toHtml (toMarkdownBlock oldNotes)
td_ $ blockquote_ $ toHtml (toMarkdownBlock newNotes)
Edit'SetItemEcosystem itemId oldEcosystem newEcosystem -> do
p_ $ "changed ecosystem of item " >> printItem itemId
p_ $ (if (T.null oldEcosystem) then "added" else "changed") >> " ecosystem of item " >> printItem itemId
table_ $ tr_ $ do
td_ $ blockquote_ $ toHtml (toMarkdownBlock oldEcosystem)
td_ $ blockquote_ $ toHtml (toMarkdownBlock newEcosystem)
-- Change trait properties
Edit'SetTraitContent itemId _traitId oldContent newContent -> do
p_ $ "changed trait of item " >> printItem itemId
p_ $ (if (T.null oldContent) then "added" else "changed") >> " trait of item " >> printItem itemId
table_ $ tr_ $ do
td_ $ blockquote_ $ p_ (toHtml (toMarkdownInline oldContent))
td_ $ blockquote_ $ p_ (toHtml (toMarkdownInline newContent))