Preserve whitespace around time when reformatting.
This commit is contained in:
parent
f004f2e353
commit
498cd667f9
@ -8,7 +8,9 @@ Time =
|
|||||||
|
|
||||||
node: ->
|
node: ->
|
||||||
return if @isClone
|
return if @isClone
|
||||||
@nodes.date.textContent = Time.format Conf['time'], @info.date
|
{textContent} = @nodes.date
|
||||||
|
@nodes.date.textContent = textContent.match(/^\s*/)[0] + Time.format(Conf['time'], @info.date) + textContent.match(/\s*$/)[0]
|
||||||
|
|
||||||
format: (formatString, date) ->
|
format: (formatString, date) ->
|
||||||
formatString.replace /%(.)/g, (s, c) ->
|
formatString.replace /%(.)/g, (s, c) ->
|
||||||
if c of Time.formatters
|
if c of Time.formatters
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user