1
1
mirror of https://github.com/github/semantic.git synced 2024-12-22 06:11:49 +03:00

Empty lines defer to the ToMarkup instance for Line.

This commit is contained in:
Rob Rix 2015-12-15 09:46:06 -05:00
parent 2bb4e6565c
commit c5fa99182b

View File

@ -84,11 +84,11 @@ instance Show Row where
show (Row left right) = "\n" ++ show left ++ " | " ++ show right
instance ToMarkup (Int, Line, Int, Line) where
toMarkup (_, EmptyLine, _, EmptyLine) = tr $ numberTd "" <> td (string "") <> numberTd "" <> toMarkup (string "") <> string "\n"
toMarkup (_, EmptyLine, num, right) = tr $ numberTd "" <> td (string "") <>
toMarkup (_, EmptyLine, _, EmptyLine) = tr $ numberTd "" <> toMarkup EmptyLine <> numberTd "" <> toMarkup EmptyLine <> string "\n"
toMarkup (_, EmptyLine, num, right) = tr $ numberTd "" <> toMarkup EmptyLine <>
numberTd (show num) <> toMarkup right <> string "\n"
toMarkup (num, left, _, EmptyLine) = tr $ numberTd (show num) <> toMarkup left <>
numberTd "" <> td (string "") <> string "\n"
numberTd "" <> toMarkup EmptyLine <> string "\n"
toMarkup (leftNum, left, rightNum, right) = tr $ numberTd (show leftNum) <> toMarkup left <>
numberTd (show rightNum) <> toMarkup right <> string "\n"