|
|
@@ -10,7 +10,11 @@ module.exports = function(crowi) {
|
|
|
|
|
|
revisionSchema = new mongoose.Schema({
|
|
|
path: { type: String, required: true },
|
|
|
- body: { type: String, required: true },
|
|
|
+ body: { type: String, required: true, get: (data) => {
|
|
|
+ // replace CR/CRLF to LF above v3.1.5
|
|
|
+ // see https://github.com/weseek/growi/issues/463
|
|
|
+ return data.replace(/\r\n?/g, '\n');
|
|
|
+ }},
|
|
|
format: { type: String, default: 'markdown' },
|
|
|
author: { type: ObjectId, ref: 'User' },
|
|
|
createdAt: { type: Date, default: Date.now }
|