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:
parent
9b1b1b8643
commit
8387d7bc6e
@ -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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user