Skip to content

Commit

Permalink
Merge pull request #12 from twitter-base/dev
Browse files Browse the repository at this point in the history
increase max tweet length from 240 to 250
  • Loading branch information
dezren39 authored Sep 16, 2020
2 parents 3bfd466 + f35cb1f commit 925e52b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
name: Release
name: Release Package
on:
push:
branches:
- main
- next
- dev
pull_request:
branches:
- main
Expand Down
4 changes: 2 additions & 2 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 };
Expand All @@ -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 };
Expand Down

0 comments on commit 925e52b

Please sign in to comment.