Skip to content

Commit

Permalink
remove extra divider
Browse files Browse the repository at this point in the history
- FIXED: Remove extra divider line before grand total in byday table
  • Loading branch information
ttscoff committed Mar 11, 2023
1 parent 0b42bbc commit c9023bd
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
doing (2.1.79)
doing (2.1.80)
chronic (~> 0.10, >= 0.10.2)
deep_merge (~> 1.2, >= 1.2.1)
gli (~> 2.20, >= 2.20.1)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ _If you're one of the rare people like me who find this useful, feel free to

<!--README-->

The current version of `doing` is <!--VER-->2.1.78<!--END VER-->.
The current version of `doing` is <!--VER-->2.1.79<!--END VER-->.

Find all of the documentation in the [doing wiki][wiki].

Expand Down
3 changes: 1 addition & 2 deletions lib/doing/plugins/export/byday.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,9 @@ def self.render(wwid, items, variables: {})
out << divider
end
all_total = "Grand Total: #{total.time_string(format: :clock)}"
out << divider
out << "{wd}|{xrb}#{all_total.rjust(width + 20)}{wd}|{x}"
out << divider
Doing::Pager.page Doing::Color.template(out.join("\n"))
Doing::Color.template(out.join("\n"))
end

Doing::Plugins.register 'byday', :export, self
Expand Down
2 changes: 1 addition & 1 deletion lib/doing/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Doing
VERSION = '2.1.79'
VERSION = '2.1.80'
end
23 changes: 15 additions & 8 deletions lib/doing/wwid/display.rb
Original file line number Diff line number Diff line change
Expand Up @@ -137,14 +137,21 @@ def today(times = true, output = nil, opt)
opt[:totals] ||= false
opt[:sort_tags] ||= false

cfg = Doing.setting('templates').deep_merge(Doing.setting('templates.default'), { extend_existing_arrays: true, sort_merged_arrays: true }).deep_merge({
'wrap_width' => Doing.setting('wrap_width') || 0,
'date_format' => Doing.setting('default_date_format'),
'order' => Doing.setting('order') || :asc,
'tags_color' => Doing.setting('tags_color'),
'duration' => Doing.setting('duration'),
'interval_format' => Doing.setting('interval_format')
}, { extend_existing_arrays: true, sort_merged_arrays: true })
cfg = Doing.setting('templates')
.deep_merge(Doing.setting('templates.default'), {
extend_existing_arrays: true,
sort_merged_arrays: true
}).deep_merge({
'wrap_width' => Doing.setting('wrap_width') || 0,
'date_format' => Doing.setting('default_date_format'),
'order' => Doing.setting('order') || :asc,
'tags_color' => Doing.setting('tags_color'),
'duration' => Doing.setting('duration'),
'interval_format' => Doing.setting('interval_format')
}, {
extend_existing_arrays: true,
sort_merged_arrays: true
})

template = opt[:template] || cfg['template']

Expand Down

0 comments on commit c9023bd

Please sign in to comment.