mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-09 06:55:54 +01:00
Trim each lines of command guidance
This commit is contained in:
@@ -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].
|
||||
*/
|
||||
|
||||
@@ -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){
|
||||
|
||||
Reference in New Issue
Block a user