cmless 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cmless.rb +2 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eb8a359f53083d2d2da6220c06da3f6701281639
|
4
|
+
data.tar.gz: b80f25065a23c1c85f55c0998ee7c18bb9d0b30f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d03df5485f2b8120c4af361e13d5253131a06cb36f71fe5c5d5d5bcacb970e105856d917ac9c1421fc62f4e2ed86468bdb79ea86fb7e74ae06a92de6fb37f553
|
7
|
+
data.tar.gz: 569223ae59ed582ab39e30a7d7200110a3026dcddc6f4fc44b2d2946e064183c838c2e29ea9ad03b39f3d093d03a7e6fe706d16c4c58aaa38ab291b22df0549a
|
data/lib/cmless.rb
CHANGED
@@ -9,6 +9,7 @@ require 'nokogiri'
|
|
9
9
|
# CMS alternative: Content in markdown / Extract HTML and data for display
|
10
10
|
class Cmless # rubocop:disable Metrics/ClassLength
|
11
11
|
attr_reader :path
|
12
|
+
attr_reader :title
|
12
13
|
attr_reader :title_html
|
13
14
|
|
14
15
|
private
|
@@ -22,6 +23,7 @@ class Cmless # rubocop:disable Metrics/ClassLength
|
|
22
23
|
|
23
24
|
doc.xpath('//h1').first.tap do |h1|
|
24
25
|
@title_html = h1.inner_html
|
26
|
+
@title = h1.text
|
25
27
|
h1.remove
|
26
28
|
html_methods.delete(:title_html)
|
27
29
|
end
|