livetext 0.8.17 → 0.8.18
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.
- checksums.yaml +4 -4
- data/dsl/liveblog.rb +14 -15
- data/lib/livetext.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f1f5704323c6fccda88a23e4ed02cf444bd0daf3
|
4
|
+
data.tar.gz: 665f664a8c6942aeef3a19058f8489b7248915ae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6c4ecd396c05dccc154faa358956710481c3264d301f4e9907c56f80fefe165d4699d19669a2b2dea59f79ec35a3ddf1edf649de2a2cd59c9bd1bcd2c278b4d8
|
7
|
+
data.tar.gz: 19573b24eb4e401138d4991a5ac7b14e462283c84974465db04fb3a32e59dbd20b6389605460ec8ee5cf63f36165fdd962c7a11003c8e5b343b762171f32f089
|
data/dsl/liveblog.rb
CHANGED
@@ -4,7 +4,7 @@ require 'yaml'
|
|
4
4
|
def init_liveblog
|
5
5
|
@teaser = ""
|
6
6
|
@body = ""
|
7
|
-
@
|
7
|
+
@body = ""
|
8
8
|
@meta = ::OpenStruct.new
|
9
9
|
end
|
10
10
|
|
@@ -14,14 +14,14 @@ end
|
|
14
14
|
|
15
15
|
def _passthru(line)
|
16
16
|
return if line.nil?
|
17
|
-
@
|
17
|
+
@body << "<p>" if line == "\n" and ! @_nopara
|
18
18
|
line = _formatting(line)
|
19
|
-
@
|
19
|
+
@body << line + "\n"
|
20
20
|
end
|
21
21
|
|
22
22
|
def title
|
23
23
|
@meta.title = @_data
|
24
|
-
@
|
24
|
+
@body << "<h1>#{@meta.title}</h1>"
|
25
25
|
end
|
26
26
|
|
27
27
|
def pubdate
|
@@ -47,34 +47,33 @@ def liveblog_version
|
|
47
47
|
end
|
48
48
|
|
49
49
|
def list
|
50
|
-
@
|
51
|
-
_body {|line| @
|
52
|
-
@
|
50
|
+
@body << "<ul>"
|
51
|
+
_body {|line| @body << "<li>#{line}</li>" }
|
52
|
+
@body << "</ul>"
|
53
53
|
end
|
54
54
|
|
55
55
|
def list!
|
56
|
-
@
|
57
|
-
lines = _body.each # {|line| @
|
56
|
+
@body << "<ul>"
|
57
|
+
lines = _body.each # {|line| @body << "<li>#{line}</li>" }
|
58
58
|
loop do
|
59
59
|
line = lines.next
|
60
60
|
line = _formatting(line)
|
61
61
|
if line[0] == " "
|
62
|
-
@
|
62
|
+
@body << line
|
63
63
|
else
|
64
|
-
@
|
64
|
+
@body << "<li>#{line}</li>"
|
65
65
|
end
|
66
66
|
end
|
67
|
-
@
|
67
|
+
@body << "</ul>"
|
68
68
|
end
|
69
69
|
|
70
70
|
def finalize
|
71
|
-
|
72
|
-
# @meta.slug = make_slug(@meta.title)
|
73
|
-
@meta.body = @dest
|
71
|
+
@meta.body = @body
|
74
72
|
@meta
|
75
73
|
end
|
76
74
|
|
77
75
|
def teaser
|
78
76
|
@meta.teaser = _body_text
|
77
|
+
@body << @meta.teaser + "\n"
|
79
78
|
# FIXME
|
80
79
|
end
|
data/lib/livetext.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: livetext
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.18
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hal Fulton
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-05-
|
11
|
+
date: 2017-05-11 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: A smart text processor extensible in Ruby
|
14
14
|
email: rubyhacker@gmail.com
|