From 6c435a39b4ba7a124744cd45ea929da4461e9ae0 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Mon, 30 May 2016 14:04:40 -0400 Subject: [PATCH] Revert "Render sizes minimally in split diffs." This reverts commit af17b7c6b85462a902ab296c0c0334aa26b4e0b9. --- src/Renderer/Split.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Renderer/Split.hs b/src/Renderer/Split.hs index d8bce3f12..67df9dd18 100644 --- a/src/Renderer/Split.hs +++ b/src/Renderer/Split.hs @@ -92,7 +92,7 @@ split diff blobs = TL.toStrict . renderHtml newtype Renderable a = Renderable a instance ToMarkup f => ToMarkup (Renderable (Source Char, Info, Syntax a (f, Range))) where - toMarkup (Renderable (source, Info range categories size, syntax)) = (! A.data_ (stringValue (showRational size))) . classifyMarkup categories $ case syntax of + toMarkup (Renderable (source, Info range categories size, syntax)) = (! A.data_ (stringValue (show size))) . classifyMarkup categories $ case syntax of Leaf _ -> span . string . toString $ slice range source Indexed children -> ul . mconcat $ wrapIn li <$> contentElements source range children Fixed children -> ul . mconcat $ wrapIn li <$> contentElements source range children @@ -119,7 +119,7 @@ instance ToMarkup (Renderable (Source Char, SplitDiff a Info)) where toMarkup (Renderable (source, diff)) = Prologue.fst $ iter (\ (info@(Info range _ _) :< syntax) -> (toMarkup $ Renderable (source, info, syntax), range)) $ toMarkupAndRange <$> diff where toMarkupAndRange :: SplitPatch (Term a Info) -> (Markup, Range) toMarkupAndRange patch = let term@(Info range _ size :< _) = runCofree $ getSplitTerm patch in - ((div ! A.class_ (splitPatchToClassName patch) ! A.data_ (stringValue (showRational size))) . toMarkup $ Renderable (source, cofree term), range) + ((div ! A.class_ (splitPatchToClassName patch) ! A.data_ (stringValue (show size))) . toMarkup $ Renderable (source, cofree term), range) instance ToMarkup a => ToMarkup (Renderable (Bool, Int, a)) where toMarkup (Renderable (hasChanges, num, line)) =