Trim each lines of command guidance

This commit is contained in:
Naoki Takezoe
2015-01-02 19:11:50 +09:00
parent da216c6960
commit 182acb2e02
2 changed files with 21 additions and 22 deletions

View File

@@ -38,10 +38,8 @@ object helpers extends AvatarImageProvider with LinkConverter with RequestCache
}
/**
*
* Format java.util.Date to "x {seconds/minutes/hours/days} ago"
* If duration over 1 month, format to "d MMM (yyyy)"
*
*/
def datetimeAgoRecentOnly(date: Date): String = {
val duration = new Date().getTime - date.getTime
@@ -247,6 +245,8 @@ object helpers extends AvatarImageProvider with LinkConverter with RequestCache
}
}
def pre(value: Html): Html = Html(s"<pre>${value.body.trim.split("\n").map(_.trim).mkString("\n")}</pre>")
/**
* Implicit conversion to add mkHtml() to Seq[Html].
*/

View File

@@ -16,20 +16,19 @@
}
</div>
<h3 style="margin-top: 30px;">Create a new repository on the command line</h3>
<pre>
@pre {
touch README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin <span class="live-clone-url">@repository.httpUrl</span>
git push -u origin master
</pre>
}
<h3 style="margin-top: 30px;">Push an existing repository from the command line</h3>
<pre>
@pre {
git remote add origin <span class="live-clone-url">@repository.httpUrl</span>
git push -u origin master
</pre>
}
<script>
$(function(){
$('.git-protocol-selector').click(function(e){