Folks, I'm clueless. This snippet w/o the the impo...
# kotlinx-html
g
Folks, I'm clueless. This snippet w/o the the import of
kotlinx.html.title
puts the title usage in red and suggests the import, which it then does. However, the import does not correct the red unknown mark, and re-suggests the same import. Am I not seeing something extremely obvious here?
Copy code
import kotlinx.html.html
import kotlinx.html.stream.appendHTML
import kotlinx.html.title
import org.junit.jupiter.api.Test

class HtmlTest {

    @Test
    fun makesTitle() {
        val output = StringBuilder()
        output.appendHTML().html {
            title("Let's try this.")
        }
    }
}
Answer: The title extension method has to be on .head { } not .html { }.
Feels like a compiler hole that it couldn't find a way to inform me of that.