1
1
mirror of https://github.com/github/semantic.git synced 2025-01-06 06:46:07 +03:00

Mark up empty code cells directly.

This commit is contained in:
Rob Rix 2015-12-22 18:23:34 -05:00
parent cbd0987010
commit 91bf531af9

View File

@ -39,7 +39,7 @@ instance Monoid (Line a) where
mappend (Line xs) (Line ys) = Line (xs <> ys)
instance ToMarkup a => ToMarkup (Bool, Int, Line a) where
toMarkup (_, _, line@EmptyLine) = td mempty ! A.class_ (stringValue "blob-num blob-num-empty empty-cell") <> toMarkup line <> string "\n"
toMarkup (_, _, EmptyLine) = td mempty ! A.class_ (stringValue "blob-num blob-num-empty empty-cell") <> td mempty ! A.class_ (stringValue "blob-code blob-code-empty empty-cell") <> string "\n"
toMarkup (hasChanges, num, Line contents)
= td (string $ show num) ! A.class_ (stringValue $ if hasChanges then "blob-num blob-num-replacement" else "blob-num")
<> td (mconcat $ toMarkup <$> contents) ! A.class_ (stringValue $ if hasChanges then "blob-code blob-code-replacement" else "blob-code") <> string "\n"