Skip to content

Commit

Permalink
fix(pkgs): Add space between bounty state and post content
Browse files Browse the repository at this point in the history
  • Loading branch information
realth000 committed Feb 16, 2024
1 parent 60d11f2 commit 674a721
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions lib/packages/html_muncher/lib/src/html_muncher.dart
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,13 @@ class Muncher {
/// </div>
InlineSpan _buildUnresolvedBounty(uh.Element element) {
final price = element.querySelector('cite')?.innerText ?? '';
return WidgetSpan(child: BountyCard(price: price, resolved: false));
return TextSpan(
children: [
WidgetSpan(child: BountyCard(price: price, resolved: false)),
// Ensure an empty line space between post content.
const TextSpan(text: '\n\n'),
],
);
}
/// Build for the thread bounty info area.
Expand All @@ -543,7 +549,13 @@ class Muncher {
/// ```
InlineSpan _buildResolvedBounty(uh.Element element) {
final price = element.querySelector('cite')?.innerText ?? '';
return WidgetSpan(child: BountyCard(price: price, resolved: true));
return TextSpan(
children: [
WidgetSpan(child: BountyCard(price: price, resolved: true)),
// Ensure an empty line space between post content.
const TextSpan(text: '\n\n'),
],
);
}
/// Build for the best answer of bounty area.
Expand Down

0 comments on commit 674a721

Please sign in to comment.