jekyll-activity-pub 0.2.9 → 0.2.10

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: 7b0f6f6119fa44051c64bd08a383c53abfa24e14becf78d7b3864024095f908f
4
- data.tar.gz: b6b7f3d104dc9b02b4116f6f19a3b2ebbbf7644343842af0d90e2d271c060f86
3
+ metadata.gz: b7c8c48c9feaf8a6694f65b9ed392a1934ccb492105b701681ee1048c73dbfce
4
+ data.tar.gz: 7a3520277e1c376e3bf03c0f8c1bb7639185b1a0d61e8ec0759aba9f775b8628
5
5
  SHA512:
6
- metadata.gz: 5e48160e0d713f7c3cd9cbdafe8f60bc1d0fbeb55d369585d34b498ffa33065f0d5870bef2182364abff7b86813c2f4b4c5648dd995d9f0b938df0bf6a928bab
7
- data.tar.gz: 4425e4ec5ddcd7cc9c0a283fbe72570016dd6c3d0089946b497a9dcc1372544807982a7eae9ade1d2045f30d73f2b63b7a5d50f8f571d372241a5537c1b8ffa4
6
+ metadata.gz: b8a2b458cf7785d417a7140086dd946242c945ab19fd484d01b843c4c01e860e64562246f46255842838728021b899b138db1a2bcb0d7d4897ae11ce03fcaee5
7
+ data.tar.gz: 0cd9c974e382de6afc6e38d507a199ce41d5f7d356ea61a3304339cf9732cac7c771a9924332c6d8ccdacc5d2f803a7d4085d1809ebfc78c6716b77454afef35
@@ -11,6 +11,9 @@ module Jekyll
11
11
  class Activity < Jekyll::Page
12
12
  include Helper
13
13
 
14
+ # HTML white space removal
15
+ WHITE_SPACE = />\s+</.freeze
16
+
14
17
  # @param :doc [Jekyll::Document]
15
18
  attr_reader :doc
16
19
 
@@ -37,6 +40,8 @@ module Jekyll
37
40
 
38
41
  # @return [nil]
39
42
  def read_yaml(*)
43
+ doc_content = doc.content.tr("\n", '').gsub(WHITE_SPACE, '><')
44
+
40
45
  self.data = {
41
46
  '@context' => [
42
47
  'https://www.w3.org/ns/activitystreams',
@@ -58,10 +63,10 @@ module Jekyll
58
63
  'cc' => [Notifier.followers_url],
59
64
  'inReplyTo' => doc.data['in_reply_to'],
60
65
  'sensitive' => sensitive?,
61
- 'content' => doc.content,
66
+ 'content' => doc_content,
62
67
  'name' => doc.data['title'],
63
68
  'contentMap' => {
64
- locale => doc.content
69
+ locale => doc_content
65
70
  },
66
71
  'attachment' => attachments,
67
72
  'tag' => [],
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-activity-pub
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.9
4
+ version: 0.2.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sutty
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-05-13 00:00:00.000000000 Z
11
+ date: 2024-05-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: distributed-press-api-client