mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:38:39 +08:00
fix code styling
This commit is contained in:
parent
a89e7ab662
commit
185f4bd8c8
@ -105,8 +105,7 @@ Discourse.Formatter = (function(){
|
|||||||
|
|
||||||
// http://stackoverflow.com/questions/196972/convert-string-to-title-case-with-javascript
|
// http://stackoverflow.com/questions/196972/convert-string-to-title-case-with-javascript
|
||||||
// TODO: locale support ?
|
// TODO: locale support ?
|
||||||
toTitleCase = function toTitleCase(str)
|
toTitleCase = function toTitleCase(str) {
|
||||||
{
|
|
||||||
return str.replace(/\w\S*/g, function(txt){
|
return str.replace(/\w\S*/g, function(txt){
|
||||||
return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();
|
return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();
|
||||||
});
|
});
|
||||||
@ -114,7 +113,6 @@ Discourse.Formatter = (function(){
|
|||||||
|
|
||||||
longDate = function(dt) {
|
longDate = function(dt) {
|
||||||
if (!dt) return;
|
if (!dt) return;
|
||||||
|
|
||||||
return moment(dt).longDate();
|
return moment(dt).longDate();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user