Fix: Make Article factory correctly break new lines
This commit is contained in:
parent
6b1d289506
commit
1d7082b2f6
|
|
@ -76,13 +76,13 @@ class ArticleFactory extends Factory
|
||||||
$dice_roll = rand(0,100);
|
$dice_roll = rand(0,100);
|
||||||
|
|
||||||
if($dice_roll <= 50) { // Make a SubTitle
|
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
|
} 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
|
// Always append a new line
|
||||||
$markdown_result .= '\n';
|
$markdown_result .= "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
return $markdown_result;
|
return $markdown_result;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue