Fix: Make Article factory correctly break new lines

This commit is contained in:
Jonathan Nielson 2024-08-04 12:38:03 -05:00
parent 6b1d289506
commit 1d7082b2f6
1 changed files with 3 additions and 3 deletions

View File

@ -76,13 +76,13 @@ class ArticleFactory extends Factory
$dice_roll = rand(0,100);
if($dice_roll <= 50) { // Make a SubTitle
$markdown_result .= '# ' . fake()->words(rand(1,5), true) . '\n';
$markdown_result .= '# ' . fake()->words(rand(1,5), true) . "\n";
} elseif ($dice_roll <= 100) { // Make a paragraph
$markdown_result .= fake()->sentences(rand(2,5), true) . '\n';
$markdown_result .= fake()->sentences(rand(2,5), true) . "\n";
}
// Always append a new line
$markdown_result .= '\n';
$markdown_result .= "\n";
}
return $markdown_result;