Skip to content

Commit 331c0cf

Browse files
committed
FIXED: gsub error in doing meanwhile
1 parent aa7b67c commit 331c0cf

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

lib/doing/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module Doing
2-
VERSION = '1.0.12'
2+
VERSION = '1.0.13'
33
end

lib/doing/wwid.rb

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -592,7 +592,7 @@ def stop_start(tag,opt={})
592592
tag.sub!(/^@/,'')
593593

594594
found_items = 0
595-
595+
begin
596596
@content[opt[:section]]['items'].each_with_index {|item, i|
597597
if item['title'] =~ /@#{tag}/
598598
title = item['title'].gsub(/(^| )@(#{tag}|done)(\([^\)]*\))?/,'')
@@ -619,9 +619,15 @@ def stop_start(tag,opt={})
619619
title, note = format_input(opt[:new_item])
620620
note.push(opt[:note].gsub(/ *$/,'')) if opt[:note]
621621
title += " @#{tag}"
622-
add_item(title.cap_first, opt[:section], {:note => note.gsub(/ *$/,''), :back => opt[:back]})
622+
add_item(title.cap_first, opt[:section], {:note => note.join(' ').rstrip, :back => opt[:back]})
623623
end
624624

625+
rescue Exception=>e
626+
puts e
627+
puts e.backtrace
628+
end
629+
630+
625631
write(@doing_file)
626632
end
627633

0 commit comments

Comments
 (0)