livetext 0.8.58 → 0.8.59

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: 6dda0ce49859637e0a0676965adc42420e91c405bcf76d6de5c1132dae2ff195
4
- data.tar.gz: 7a235780c7ee3e4aed04a17429cb6fcf490ab4e18607435ab7496075cbf0c9a2
3
+ metadata.gz: 01ba24ecd7c4020f4861390c5d9a6204aa189cacdf88e7e696cb844178821b87
4
+ data.tar.gz: b55072776a3733acacd548b3324ca9538ec76957e42d616980f37990ffebd34b
5
5
  SHA512:
6
- metadata.gz: 13a4326ffc7cdacb7acffe7e5cbe4cb35124d5be993e372b6b74c1efad173776d9ef0905b8924e17a1bbc9e96b4dd274440397ea95cdfaf025cac98e5d69f01f
7
- data.tar.gz: 53a08be41450f45e8f5f691b42892e5f27437b0293353bebfce5b437d0fda9dbf3d39b34bf951bb93483bd9c1f965272744a86c875b1e682599e3cd20f2e36e1
6
+ metadata.gz: b67266f6a11553dce40b3bfda05ad14ea6e94ab801009d5d42d9f955333b7445c2dbb876af1807406e6dbb2ae1def54c144069042eedae09c85f35e02fa95ff5
7
+ data.tar.gz: 5e7be9992a31558491683f22a37c72cb9fdc75bc792fc95f7397053062b5eddad8be3576444e87871f990005f485c0fed3282aa3350ad7bcca3a5fdacb736768
data/lib/formatline.rb CHANGED
@@ -7,7 +7,7 @@ class FormatLine
7
7
  SimpleFormats = {}
8
8
  SimpleFormats[:b] = %w[<b> </b>]
9
9
  SimpleFormats[:i] = %w[<i> </i>]
10
- SimpleFormats[:t] = %w[<tt> </tt>]
10
+ SimpleFormats[:t] = %w[<b><tt> </tt></b>]
11
11
  SimpleFormats[:s] = %w[<strike> </strike>]
12
12
 
13
13
  def initialize
data/lib/livetext.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  class Livetext
2
- VERSION = "0.8.58"
2
+ VERSION = "0.8.59"
3
3
  Path = File.expand_path(File.join(File.dirname(__FILE__)))
4
4
  end
5
5
 
data/plugin/liveblog.rb CHANGED
@@ -50,7 +50,7 @@ def init_liveblog # FIXME - a lot of this logic sucks
50
50
  @blog, num = Livetext.parameters
51
51
  @meta = OpenStruct.new
52
52
  @meta.num = num
53
- @root = @blog.root
53
+ @root = @blog.root rescue nil
54
54
  @view = @blog.view.name rescue nil
55
55
  @vdir = @blog.view.dir rescue nil
56
56
  @body = ""
@@ -62,9 +62,9 @@ end
62
62
 
63
63
  def _passthru(line, context = nil)
64
64
  return if line.nil?
65
- @body << "<p>" if line == "\n" and ! @_nopara
66
65
  line = _formatting(line, context)
67
66
  @body << line + "\n"
67
+ @body << "<p>" if line.empty? && ! @_nopara
68
68
  end
69
69
 
70
70
  def title
@@ -149,7 +149,7 @@ end
149
149
  Dir.mkdir(@postdir) unless Dir.exist?(@postdir) # FIXME remember assets!
150
150
  Dir.chdir(@postdir)
151
151
  meta.views = meta.views.join(" ")
152
- meta.tags = meta.tags.join(" ")
152
+ meta.tags = meta.tags.join(" ") rescue ""
153
153
  File.write("body.txt", @body) # Actually HTML...
154
154
  File.write("teaser.txt", meta.teaser)
155
155
 
@@ -172,6 +172,10 @@ def teaser
172
172
  end
173
173
 
174
174
  def finalize
175
+ if @blog.nil?
176
+ puts @body
177
+ return
178
+ end
175
179
  @slug = @blog.make_slug(@meta)
176
180
  @postdir = @blog.view.dir + "/#@slug"
177
181
  write_post(@meta) # FIXME
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.58
4
+ version: 0.8.59
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hal Fulton
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-01-25 00:00:00.000000000 Z
11
+ date: 2019-03-07 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: A smart text processor extensible in Ruby
14
14
  email: rubyhacker@gmail.com