diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a32cfd9..bdf1903 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,9 +1,10 @@ -name: Release +name: Release Package on: push: branches: - main - next + - dev pull_request: branches: - main diff --git a/lib/index.js b/lib/index.js index 54755ad..0eff0b7 100644 --- a/lib/index.js +++ b/lib/index.js @@ -34,7 +34,7 @@ const parse = (content) => typeof content === 'undefined' || content === null || .flat(Infinity) .map((x) => { console.dir( - [x, TwitterText.parseTweet(x).permillage * 0.28, chunk(x.replaceAll(/\s\n\s/g, ' \n'), 240, { 'charLengthMask': 0, 'charLengthType': 'TextEncoder', 'textEncoder': + [x, TwitterText.parseTweet(x).permillage * 0.28, chunk(x.replaceAll(/\s\n\s/g, ' \n'), 250, { 'charLengthMask': 0, 'charLengthType': 'TextEncoder', 'textEncoder': { encode : (text) => { return { length: TwitterText.parseTweet(text).permillage * 0.28 }; @@ -49,7 +49,7 @@ const parse = (content) => typeof content === 'undefined' || content === null || } }).map(y => TwitterText.parseTweet(y).permillage * 0.28 ), ], {depth: null}); - return chunk(x.replaceAll(/\s\n\s/g, ' \n'), 240, { 'charLengthMask': 0, 'charLengthType': 'TextEncoder', 'textEncoder': + return chunk(x.replaceAll(/\s\n\s/g, ' \n'), 250, { 'charLengthMask': 0, 'charLengthType': 'TextEncoder', 'textEncoder': { encode : (text) => { return { length: TwitterText.parseTweet(text).permillage * 0.28 };