diff options
Diffstat (limited to 'Pancake/Rendering.hs')
-rw-r--r-- | Pancake/Rendering.hs | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/Pancake/Rendering.hs b/Pancake/Rendering.hs index 5f7e31f..06181e3 100644 --- a/Pancake/Rendering.hs +++ b/Pancake/Rendering.hs @@ -96,11 +96,18 @@ data RS = RS { indentationLevel :: Int -- | This is what gets rendered. data RendererOutput = RLink URI + -- ^ An URI reference. | RNote [RendererOutput] + -- ^ A note. | RLine StyledLine + -- ^ A line to render. | RIdentifier String Int + -- ^ An identifier. | RBlock Int Int - -- ^ number, start line, end line + -- ^ A fixed block's position (start line and end + -- line). These blocks reflect semantics and don't + -- vary as the terminal width changes, so they are + -- safe to rely on for position retention. deriving (Show, Eq) -- | Show a reference. @@ -125,7 +132,7 @@ rIdentifiers [] = [] rIdentifiers (RIdentifier s i:xs) = (s, i) : rIdentifiers xs rIdentifiers (_:xs) = rIdentifiers xs --- | Extracts block positions. +-- | Extracts fixed block positions. rBlocks :: [RendererOutput] -> [(Int, Int)] rBlocks [] = [] rBlocks (RBlock s e:xs) = (s, e) : rBlocks xs |