mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-05 21:15:49 +01:00
(refs #445)Keep line separator in online file editing
This commit is contained in:
@@ -98,7 +98,12 @@ object JGitUtil {
|
||||
* @param content the string content
|
||||
* @param charset the character encoding
|
||||
*/
|
||||
case class ContentInfo(viewType: String, content: Option[String], charset: Option[String])
|
||||
case class ContentInfo(viewType: String, content: Option[String], charset: Option[String]){
|
||||
/**
|
||||
* the line separator of this content ("LF" or "CRLF")
|
||||
*/
|
||||
val lineSeparator: String = if(content.exists(_.indexOf("¥r¥n") >= 0)) "CRLF" else "LF"
|
||||
}
|
||||
|
||||
/**
|
||||
* The tag data.
|
||||
|
||||
Reference in New Issue
Block a user