aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorST-DDT <[email protected]>2022-04-05 23:25:45 +0200
committerGitHub <[email protected]>2022-04-05 21:25:45 +0000
commit6a2d8fce89e0b46f7b9693a7b1f697c108e8af04 (patch)
treebb614517d2c74b8f97e8626894f771a1f1e78fc9 /src
parent28f49466eb9d76a6a96ed34a8d463ecb030bdf79 (diff)
downloadfaker-6a2d8fce89e0b46f7b9693a7b1f697c108e8af04.tar.xz
faker-6a2d8fce89e0b46f7b9693a7b1f697c108e8af04.zip
fix: use `\n` as default separator for lorem.paragraphs() (#783)
Diffstat (limited to 'src')
-rw-r--r--src/lorem.ts5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/lorem.ts b/src/lorem.ts
index 9a4f9e04..a605aa2f 100644
--- a/src/lorem.ts
+++ b/src/lorem.ts
@@ -131,7 +131,7 @@ export class Lorem {
* Generates the given number of paragraphs.
*
* @param paragraphCount The number of paragraphs to generate. Defaults to `3`.
- * @param separator The separator to use. Defaults to `'\n \r'`.
+ * @param separator The separator to use. Defaults to `'\n'`.
*
* @example
* faker.lorem.paragraphs()
@@ -150,8 +150,7 @@ export class Lorem {
* // 'Eos magnam aut qui accusamus. Sapiente quas culpa totam excepturi. Blanditiis totam distinctio occaecati dignissimos cumque atque qui officiis.<br/>
* // Nihil quis vel consequatur. Blanditiis commodi deserunt sunt animi dolorum. A optio porro hic dolorum fugit aut et sint voluptas. Minima ad sed ipsa est non dolores.'
*/
- // TODO ST-DDT 2022-02-09: The separator looks odd.
- paragraphs(paragraphCount: number = 3, separator: string = '\n \r'): string {
+ paragraphs(paragraphCount: number = 3, separator: string = '\n'): string {
const paragraphs: string[] = [];
for (paragraphCount; paragraphCount > 0; paragraphCount--) {
paragraphs.push(this.faker.lorem.paragraph());