1
1
mirror of https://github.com/github/semantic.git synced 2024-11-28 01:47:01 +03:00

Split rendering of fixed terms.

This commit is contained in:
Rob Rix 2015-12-01 16:07:53 -05:00
parent 9b1b1b8643
commit 8387d7bc6e

View File

@ -33,6 +33,7 @@ splitTerm :: String -> Term a Info -> HTML
splitTerm source term = fst $ cata toElement term where
toElement (Info range lineRange categories) (Leaf _) = (Span (classify categories) $ substring range source, range)
toElement (Info range lineRange categories) (Indexed i) = makeList i range categories
toElement (Info range lineRange categories) (Fixed i) = makeList i range categories
accumulate (children, previous) (child, range) = (children ++ [ subtext previous $ start range, child ], end range)