From c3d9e4a4ef4a3c93d88e69e1c6d6a8b37ed4cf05 Mon Sep 17 00:00:00 2001 From: darksnake Date: Mon, 14 Oct 2024 14:49:00 +0300 Subject: [PATCH] Fix type capture for raw html parser --- examples/document/data/simple/document.json | 4 ++++ .../kotlin/space/kscience/snark/html/SnarkHtmlReader.kt | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/examples/document/data/simple/document.json b/examples/document/data/simple/document.json index 13e0b84..e103d71 100644 --- a/examples/document/data/simple/document.json +++ b/examples/document/data/simple/document.json @@ -4,6 +4,10 @@ { "type": "data", "name": "body" + }, + { + "type": "data", + "name": "footer" } ] } diff --git a/snark-html/src/jvmMain/kotlin/space/kscience/snark/html/SnarkHtmlReader.kt b/snark-html/src/jvmMain/kotlin/space/kscience/snark/html/SnarkHtmlReader.kt index cd70d99..063036f 100644 --- a/snark-html/src/jvmMain/kotlin/space/kscience/snark/html/SnarkHtmlReader.kt +++ b/snark-html/src/jvmMain/kotlin/space/kscience/snark/html/SnarkHtmlReader.kt @@ -14,7 +14,7 @@ public interface SnarkHtmlReader : SnarkReader{ } public object RawHtmlReader : SnarkHtmlReader { - override val inputContentTypes: Set = setOf("html") + override val inputContentTypes: Set = setOf("text/html", "html") override fun readFrom(source: String): PageFragment = PageFragment { div {