@alemonjs/kook 2.1.3 → 2.1.4

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.
package/lib/format.js CHANGED
@@ -62,8 +62,7 @@ const markdownToKMarkdown = (items, hideUnsupported) => {
62
62
  return String(item?.value ?? '');
63
63
  }
64
64
  })
65
- .join('')
66
- .trim();
65
+ .join('');
67
66
  };
68
67
  const markdownRawToKMarkdown = (raw, hideUnsupported) => {
69
68
  if (Number(hideUnsupported) >= 4)
package/lib/index.js CHANGED
@@ -380,7 +380,7 @@ const main = () => {
380
380
  .filter(Boolean)
381
381
  .join('')
382
382
  : '';
383
- return [nativeText, fallbackText].filter(Boolean).join('');
383
+ return [nativeText, fallbackText].filter(Boolean).join('').replace(/^[^\S\n\r]+|[^\S\n\r]+$/g, '');
384
384
  };
385
385
  const resolveImageBuffer = async (val) => {
386
386
  const images = val.filter(item => item.type === 'Image' || item.type === 'ImageFile' || item.type === 'ImageURL');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alemonjs/kook",
3
- "version": "2.1.3",
3
+ "version": "2.1.4",
4
4
  "description": "kook platform connection",
5
5
  "author": "lemonade",
6
6
  "license": "MIT",