Skip to content

Commit

Permalink
Add minimum character count for second p element
Browse files Browse the repository at this point in the history
  • Loading branch information
emma-imber committed May 14, 2024
1 parent 67b720f commit 1577ae1
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ object DotcomRenderingUtils {
if (bodyElements.size >= 2) {
val firstEl = bodyElements.get(0)
val secondEl = bodyElements.get(1)
if (firstEl.tagName == "p" && secondEl.tagName == "p") {
if (firstEl.tagName == "p" && secondEl.tagName == "p" && secondEl.text().length >= 250) {
AffiliateLinksCleaner.shouldAddAffiliateLinks(
switchedOn = Switches.AffiliateLinks.isSwitchedOn,
section = content.metadata.sectionId,
Expand Down

0 comments on commit 1577ae1

Please sign in to comment.