Skip to content

Commit

Permalink
Merge pull request #13 from twitter-base/next
Browse files Browse the repository at this point in the history
increase max tweet length from 240 to 250 [main]
  • Loading branch information
dezren39 authored Sep 16, 2020
2 parents 052b397 + 925e52b commit 3225a34
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 3225a34

Please sign in to comment.