Skip to content

Commit

Permalink
Add support for summary tag for entry in atom feed parser
Browse files Browse the repository at this point in the history
  • Loading branch information
msasikanth committed Feb 7, 2024
1 parent bdcb3d1 commit 8760996
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import dev.sasikanth.rss.reader.core.network.parser.FeedParser.Companion.TAG_CON
import dev.sasikanth.rss.reader.core.network.parser.FeedParser.Companion.TAG_LINK
import dev.sasikanth.rss.reader.core.network.parser.FeedParser.Companion.TAG_PUBLISHED
import dev.sasikanth.rss.reader.core.network.parser.FeedParser.Companion.TAG_SUBTITLE
import dev.sasikanth.rss.reader.core.network.parser.FeedParser.Companion.TAG_SUMMARY
import dev.sasikanth.rss.reader.core.network.parser.FeedParser.Companion.TAG_TITLE
import dev.sasikanth.rss.reader.core.network.parser.FeedParser.Companion.TAG_UPDATED
import io.ktor.http.Url
Expand Down Expand Up @@ -115,7 +116,8 @@ internal object AtomContentParser : ContentParser() {
skip(parser)
}
}
TAG_CONTENT -> {
TAG_CONTENT,
TAG_SUMMARY -> {
rawContent = readTagText(tagName, parser).trimIndent()

val htmlContent = HtmlContentParser.parse(htmlContent = rawContent)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ class FeedParser(private val dispatchersProvider: DispatchersProvider) {
internal const val TAG_ENCLOSURE = "enclosure"
internal const val TAG_CONTENT_ENCODED = "content:encoded"
internal const val TAG_CONTENT = "content"
internal const val TAG_SUMMARY = "summary"
internal const val TAG_SUBTITLE = "subtitle"
internal const val TAG_PUB_DATE = "pubDate"
internal const val TAG_PUBLISHED = "published"
Expand Down

0 comments on commit 8760996

Please sign in to comment.