(refs #445)Keep line separator in online file editing

This commit is contained in:
Naoki Takezoe
2014-07-26 23:15:47 +09:00
parent 0822b7b5f3
commit 34e299bf52
4 changed files with 37 additions and 11 deletions

View File

@@ -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.