mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-08 08:34:21 +01:00
More code style fixes
This commit is contained in:
parent
465419f46a
commit
d4c9041ccd
61 changed files with 406 additions and 422 deletions
|
|
@ -17,7 +17,7 @@ class RichMessageExtractor
|
|||
DUE_MARKER,
|
||||
TAG_MARKER,
|
||||
STAR_MARKER
|
||||
]
|
||||
].freeze
|
||||
|
||||
def initialize(message)
|
||||
@message = message
|
||||
|
|
@ -44,7 +44,7 @@ class RichMessageExtractor
|
|||
# Regex only matches one tag, so recurse until we have them all
|
||||
while string.match /#(.*?)(?=[#{ALL_MARKERS.join}]|\Z)/
|
||||
tags << sanitize($1)
|
||||
string.gsub!(/##{$1}/,'')
|
||||
string.gsub!(/##{$1}/, '')
|
||||
end
|
||||
tags.empty? ? nil : tags
|
||||
end
|
||||
|
|
@ -65,11 +65,11 @@ class RichMessageExtractor
|
|||
|
||||
private
|
||||
|
||||
def select_for symbol
|
||||
def select_for(symbol)
|
||||
@message.match /#{symbol}(.*?)(?=[#{ALL_MARKERS.join}]|\Z)/
|
||||
end
|
||||
|
||||
def fix_date_string yymmdd
|
||||
def fix_date_string(yymmdd)
|
||||
"20#{yymmdd[0..1]}-#{yymmdd[2..3]}-#{yymmdd[4..5]} 00:00"
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue