整理代码,较复杂的单行if-then-end拆成多行
This commit is contained in:
@@ -7,7 +7,9 @@ local themeColor={
|
||||
}
|
||||
|
||||
function THEME.calculate(Y,M,D)
|
||||
if not Y then Y,M,D=os.date('%Y'),os.date('%m'),os.date('%d')end
|
||||
if not Y then
|
||||
Y,M,D=os.date('%Y'),os.date('%m'),os.date('%d')
|
||||
end
|
||||
--Festival calculate within one statement
|
||||
return
|
||||
--Christmas
|
||||
@@ -90,7 +92,9 @@ function THEME.set(theme)
|
||||
end
|
||||
|
||||
function THEME.getThemeColor(theme)
|
||||
if not theme then theme=THEME.cur end
|
||||
if not theme then
|
||||
theme=THEME.cur
|
||||
end
|
||||
return themeColor[theme]
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user