:|
This commit is contained in:
@@ -46,18 +46,8 @@ function readReadmeFile(readmeFile) {
|
||||
contentPre = content_replace.slice(0, index);
|
||||
contentPost = content_replace.slice(index);
|
||||
}
|
||||
if (!contentPre.endsWith('\n')) {
|
||||
contentPre += '\n';
|
||||
}
|
||||
if (!contentPre.endsWith('\n\n')) {
|
||||
contentPre += '\n';
|
||||
}
|
||||
if (!contentPost.startsWith('\n')) {
|
||||
contentPost += '\n';
|
||||
}
|
||||
if (!contentPost.startsWith('\n\n')) {
|
||||
contentPre += '\n';
|
||||
}
|
||||
contentPre = contentPre.trimEnd() + '\n\n';
|
||||
contentPost = '\n\n' + contentPost.trimStart();
|
||||
console.log(JSON.stringify(index), JSON.stringify(content), JSON.stringify(contentPre), JSON.stringify(contentPost));
|
||||
return [contentPre, contentPost];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user