zarchitect 1.0.2 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/zarchitect/post.rb +2 -3
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 30e062bb13035f3e8d254ca6b5870da49c05632db2216808053ad279fe502799
4
- data.tar.gz: b1048c3eff90b5137c85a2fb369d5303613733b81a61dfae7dbe534a77613353
3
+ metadata.gz: da29297f6b1e99e5b3c8aecdf12f0a830ef4ce9a7505209024383254ff694beb
4
+ data.tar.gz: 1f2d180f6f9a7915787744c260c6c4c7327ea27e4641826e5471b658d9c1d553
5
5
  SHA512:
6
- metadata.gz: b88bdc7df4e7a605d57fa07c7074889706a47c76f541a38eade30e271417933a73e48998bc93524b11d4bc167c35b755d46a063325a0133a00acf0d7e1e1df34
7
- data.tar.gz: 41342f6caf0325d422e6c698d2f576571b933c9bcd5e6d5711add11fe4c5422fb560f84b13e1c2e02a3b03c9d84e6f05e6218f6fdb612974d9756761143dcfaa
6
+ metadata.gz: 2cc7aea40570ff45869f91c9cde9c56f65994235fa56e12d0c6c698ac1c11962378c11ce4fa42b0c92d054d1817a30e5922d2b73d83889c4bc003bdc2cc68b3f
7
+ data.tar.gz: 4bd70626ea736421099b8eb6818b803af0f15153a9a8c858dd51fd29a2db031bee101ece4bda695b6b31e3f1256f134d40160526d489a012a91589fa0bdaa76e
@@ -148,19 +148,18 @@ class Post < Zarchitect
148
148
  if @conf.has_option?('description')
149
149
  @description = @conf.description << "..."
150
150
  elsif @conf.has_option?('preview')
151
- @description = @conf.preview << "..."
151
+ @description = Sanitize.fragment(@conf.preview) << "..."
152
152
  else
153
153
  nodes = @content.nodes.select { |n| n.type == "p" }
154
154
  if nodes.count > 0
155
155
  @description = Sanitize.fragment(nodes[0].html)
156
156
  if @description.length > 120
157
- @description = @description[0..120]
157
+ @description = @description[0..120] << "..."
158
158
  end
159
159
  else
160
160
  @description = ""
161
161
  end
162
162
  end
163
- @description << "..."
164
163
  end
165
164
 
166
165
  def setup_html
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zarchitect
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - ryu