This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let take limit html = | |
let spaces = Str.regexp "[ \t\r\n]+" in | |
let rec repeat acc n v = if n > 0 then repeat (v::acc) (n - 1) v else acc in | |
let filter_signals = | |
(0, 0) | |
|> Markup.transform (fun ((seen, unclosed_elements) as state) signal -> | |
match signal with | |
| `Text ss -> |