This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

added extra punctuation logic.

+11 -3
+11 -3
src/wolf-noise-generator.ts
··· 98 98 wolfNoises.punctuation[category].length > 0 99 99 ) { 100 100 const punctuationLength = wolfNoises.punctuation[category].length; 101 - const randomPunctuation = 102 - wolfNoises.punctuation[category][getRandomInt(0, punctuationLength - 1)]; 103 - result += randomPunctuation; 101 + 102 + // Check if there's already punctuation at the end 103 + const hasPunctuation = result.length > 0 && /[?!.]$/.test(result); 104 + 105 + if (!hasPunctuation) { 106 + const randomPunctuation = 107 + wolfNoises.punctuation[category][ 108 + getRandomInt(0, punctuationLength - 1) 109 + ]; 110 + result += randomPunctuation; 111 + } 104 112 } 105 113 106 114 return result.trim(); // Remove any leading/trailing whitespace