Skip to content

Commit

Permalink
Improve renderer speed (#368)
Browse files Browse the repository at this point in the history
  • Loading branch information
jocmp authored Sep 18, 2024
1 parent 8fb87e8 commit 0d2d439
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
4 changes: 2 additions & 2 deletions capy/src/main/assets/media.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ class ArticleRenderer(
"title" to article.title,
"byline" to byline,
"feed_name" to article.feedName,
"body" to body(article, extractedContent),
"script" to script(article, extractedContent),
"text_size" to textSize.get().slug,
"font_family" to fontOption.get().slug,
Expand All @@ -47,6 +46,8 @@ class ArticleRenderer(
article.siteURL?.let { setBaseUri(it) }
}

document.getElementById("article-body-content")?.append(body(article, extractedContent))

cleanLinks(document)

return document.html()
Expand Down
10 changes: 4 additions & 6 deletions capy/src/main/res/raw/template.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 0d2d439

Please sign in to comment.