Fix periods & add commas to LoremIpsum
This commit is contained in:
parent
deda433535
commit
4c9675032c
@ -29,10 +29,14 @@ const LoremIpsum: Component = () => {
|
||||
if (generator() < wordsSinceLastPeriod * wordsSinceLastPeriod * 0.002) {
|
||||
str = str.trim() + '. ';
|
||||
wordsSinceLastPeriod = 0;
|
||||
} else if (generator() < 0.1) {
|
||||
str = str.trim() + ', ';
|
||||
}
|
||||
}
|
||||
|
||||
str = str.trim() + '.';
|
||||
str = str.trim();
|
||||
if (str.endsWith(',')) str = str.substring(0, str.length - 1);
|
||||
if (!str.endsWith('.')) str += '.';
|
||||
|
||||
setOutput(str);
|
||||
}));
|
||||
|
Loading…
Reference in New Issue
Block a user