comparison src/name/blackcap/clipman/Main.kt @ 15:732f92dc3bc6

Don't need head.
author David Barts <n5jrn@me.com>
date Mon, 20 Jan 2020 23:02:51 -0800
parents 0cd912d29184
children 9dd58db4d15a
comparison
equal deleted inserted replaced
14:0cd912d29184 15:732f92dc3bc6
149 alignmentX = JLabel.LEFT_ALIGNMENT 149 alignmentX = JLabel.LEFT_ALIGNMENT
150 } 150 }
151 151
152 private fun preproc(html: String): Pair<String, StyleSheet> { 152 private fun preproc(html: String): Pair<String, StyleSheet> {
153 val sty = StyleSheet().apply { 153 val sty = StyleSheet().apply {
154 addRule("head, body { font-family: serif; font-size: %d; }".format(PROP_SIZE)) 154 addRule("body { font-family: serif; font-size: %d; }".format(PROP_SIZE))
155 addRule("code, kbd, pre, samp, tt { font-family: monospace; font-size: %d; }".format(MONO_SIZE)) 155 addRule("code, kbd, pre, samp, tt { font-family: monospace; font-size: %d; }".format(MONO_SIZE))
156 } 156 }
157 val scrubbed = Jsoup.parse(html).run { 157 val scrubbed = Jsoup.parse(html).run {
158 select("style").forEach { 158 select("style").forEach {
159 it.dataNodes().forEach { sty.addRule(it.wholeData) } 159 it.dataNodes().forEach { sty.addRule(it.wholeData) }