onebox 1.8.91 → 1.8.92
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ca01813d94c0f5fe8cacd3ae6e15985d47fea9387c66bfb93b39de0907524252
|
4
|
+
data.tar.gz: 5a9cb9eb02953b67663eff335ec92937d491913005b3882f6cd7f2e0c727c1e0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3008ac2993514403041d75fa04e9ab57887070628c3cb1c2747d63f1821a49cfc6f7a84926e80a29fb9ade687a40c25cae95ccbecde4f90206c4da88fe8f3477
|
7
|
+
data.tar.gz: 210cc41af9a0554999c8ca65fc6231a9a2700159cab3c182dc61df0edae65ff1cb3779283db7e7fdec5cc35a679e56320a35f613cfd5f53e4cb5371a35018f84
|
data/Gemfile.lock
CHANGED
@@ -37,7 +37,7 @@ module Onebox
|
|
37
37
|
message_words = message.gsub("\n\n", "\n").gsub("\n", "<br>").split(" ")
|
38
38
|
max_words = 20
|
39
39
|
result['message'] = message_words[0..max_words].join(" ")
|
40
|
-
result['message']
|
40
|
+
result['message'] += "..." if message_words.length > max_words
|
41
41
|
result['message'] = result['message'].gsub("<br>", "\n")
|
42
42
|
end
|
43
43
|
|
@@ -29,7 +29,7 @@ module Onebox
|
|
29
29
|
content_words = body_text.gsub("\n\n", "\n").gsub("\n", "<br>").split(" ") #one pass of removing double newline, then we change \n to <br> and later on we revert it back to \n this is a workaround to avoid losing newlines after we join it back.
|
30
30
|
max_words = 20
|
31
31
|
short_content = content_words[0..max_words].join(" ")
|
32
|
-
short_content
|
32
|
+
short_content += "..." if content_words.length > max_words
|
33
33
|
|
34
34
|
ulink = URI(link)
|
35
35
|
{
|
@@ -31,12 +31,12 @@ module Onebox
|
|
31
31
|
return escaped_src if query_params.has_key?('typeform-embed')
|
32
32
|
|
33
33
|
if query_params.empty?
|
34
|
-
escaped_src
|
34
|
+
escaped_src += '?' unless escaped_src.end_with?('?')
|
35
35
|
else
|
36
|
-
escaped_src
|
36
|
+
escaped_src += '&'
|
37
37
|
end
|
38
38
|
|
39
|
-
escaped_src
|
39
|
+
escaped_src += 'typeform-embed=embed-widget'
|
40
40
|
end
|
41
41
|
end
|
42
42
|
end
|
@@ -53,7 +53,7 @@ module Onebox
|
|
53
53
|
cnt = 0
|
54
54
|
while text.length < Onebox::LayoutSupport.max_text && cnt <= 3
|
55
55
|
break if cnt >= paras.size
|
56
|
-
text
|
56
|
+
text += " " unless cnt == 0
|
57
57
|
|
58
58
|
if paras[cnt].name == "ul" #Handle UL tag. Generate a textual ordered list (1.item | 2.item | 3.item). Unfourtently no newline allowed in output
|
59
59
|
li_index = 1
|
data/lib/onebox/version.rb
CHANGED