feat: added getHTMLtoMarkdownOptions func
Signed-off-by: moonleay <contact@moonleay.net>
This commit is contained in:
parent
9468efa10d
commit
e4a593b7d3
1 changed files with 9 additions and 0 deletions
|
@ -18,6 +18,8 @@
|
|||
|
||||
package net.moonleay.rssbot.util
|
||||
|
||||
import com.overzealous.remark.IgnoredHtmlElement
|
||||
import com.overzealous.remark.Options
|
||||
import dev.kord.common.entity.ButtonStyle
|
||||
import dev.kord.core.entity.Embed
|
||||
import dev.kord.rest.builder.component.ActionRowBuilder
|
||||
|
@ -141,4 +143,11 @@ object EmbedUtil {
|
|||
return "https://www.google.com/s2/favicons?domain=${str.split("/")[2]}"
|
||||
}
|
||||
|
||||
fun getHTMLtoMarkdownOptions(): Options {
|
||||
val o = Options()
|
||||
o.ignoredHtmlElements.add(IgnoredHtmlElement("img"))
|
||||
o.inlineLinks = true
|
||||
return o
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue