@vielhuber/wahelper 1.3.4 → 1.3.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/WhatsApp.js +2 -0
  2. package/package.json +1 -1
package/WhatsApp.js CHANGED
@@ -388,6 +388,8 @@ export default class WhatsApp {
388
388
  message = message.replace(/ /g, ' ');
389
389
  // replace <br> with real line breaks
390
390
  message = message.replace(/<br\s*\/?>/gis, '\n');
391
+ // replace <p></p> with line breaks
392
+ message = message.replace(/<p(?:\s[^>]*)?\>(.*?)<\/p>/gis, '\n$1\n');
391
393
  // replace " </x>" with "</x> " (multiple times)
392
394
  message = message.replace(/ +(\<\/[a-z]+\>)/gis, '$1 ');
393
395
  message = message.replace(/ +(\<\/[a-z]+\>)/gis, '$1 ');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vielhuber/wahelper",
3
- "version": "1.3.4",
3
+ "version": "1.3.5",
4
4
  "description": "Lightweight whatsapp integration layer.",
5
5
  "main": "WhatsApp.js",
6
6
  "files": [