Skip to content

Commit 7ad87cb

Browse files
Merge pull request #33 from The-3Labs-Team/params
Fix ad rendering logic to prepend ads to current element's outertext
2 parents cd33d39 + feeac57 commit 7ad87cb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/AdsPostParser.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public function appendAdvertising(array $params = []): string
5454
}
5555

5656
try {
57-
$currentElement->outertext .= Blade::render('ads-post-parser::ads'.array_keys($thresholds)[$adsCount], ['params' => $params]);
57+
$currentElement->outertext = Blade::render('ads-post-parser::ads'.array_keys($thresholds)[$adsCount], ['params' => $params]).$currentElement->outertext;
5858
} catch (\Exception $e) {
5959
// Content without ADV
6060
}

0 commit comments

Comments
 (0)