Fix potential infinite loop

The code removed here was copied from another project some years back.
Now there is an improved version in fs2 that can be used.

Fixes: #2376
This commit is contained in:
eikek
2023-11-12 13:04:03 +01:00
parent 1ad17150ce
commit dd763e7796
4 changed files with 14 additions and 60 deletions

View File

@ -52,7 +52,7 @@ object Markdown {
cfg: MarkdownConfig,
cs: Charset
): F[String] =
data.through(Binary.decode(cs)).compile.foldMonoid.map(str => toHtml(str, cfg))
data.through(Binary.decode(cs)).compile.string.map(str => toHtml(str, cfg))
private def wrapHtml(body: String, cfg: MarkdownConfig): String =
s"""<!DOCTYPE html>