@@ -43,11 +43,8 @@ docHToBlocks d' =
4343 (docHToInlines False $ headerTitle h)
4444 DocAppend d1 d2 -> mappend (docHToBlocks d1) (docHToBlocks d2)
4545 DocString _ -> inlineFallback
46− DocParagraph (DocHeader h) -> docHToBlocks (DocHeader h)
4746 DocParagraph (DocAName h) -> B.plain $ docHToInlines False $ DocAName h
48− DocParagraph x -> let (ils, rest) = getInlines x
49− in (B.para $ docHToInlines False ils)
50− <> docHToBlocks rest
47+ DocParagraph x -> B.para $ docHToInlines False x
5148 DocIdentifier _ -> inlineFallback
5249 DocIdentifierUnchecked _ -> inlineFallback
5350 DocModule s -> B.plain $ docHToInlines False $ DocModule s
@@ -115,40 +112,6 @@ docHToInlines isCode d' =
115112 DocProperty _ -> mempty
116113 DocExamples _ -> mempty
117114
118−getInlines :: DocH String Identifier -> (DocH String Identifier, DocH String Identifier)
119−getInlines (DocAppend x y) = if isInline x
120− then let (a, b) = getInlines y
121− in (DocAppend x a, b)
122− else (DocEmpty, DocAppend x y)
123−getInlines x = if isInline x
124− then (x, DocEmpty)
125− else (DocEmpty, x)
126−
127−isInline :: DocH String Identifier -> Bool
128−isInline d' =
129− case d' of
130− DocEmpty -> True
131− DocAppend d1 _ -> isInline d1
132− DocString _ -> True
133− DocParagraph _ -> False
134− DocIdentifier _ -> True
135− DocIdentifierUnchecked _ -> True
136− DocModule _ -> True
137− DocWarning _ -> True
138− DocEmphasis _ -> True
139− DocMonospaced _ -> True
140− DocBold _ -> True
141− DocHeader _ -> False
142− DocUnorderedList _ -> False
143− DocOrderedList _ -> False
144− DocDefList _ -> False
145− DocCodeBlock _ -> False
146− DocHyperlink _ -> True
147− DocPic _ -> True
148− DocAName _ -> True
149− DocProperty _ -> False
150− DocExamples _ -> False
151−
152115-- | Create an 'Example', stripping superfluous characters as appropriate
153116makeExample :: String -> String -> [String] -> Blocks
154117makeExample prompt expression result =
@@ -173,4 +136,3 @@ makeExample prompt expression result =
173136 substituteBlankLine "<BLANKLINE>" = ""
174137 substituteBlankLine line = line
175138 coder = B.codeWith ([], ["result"], [])
176−