mirror of
https://github.com/strapi/strapi.git
synced 2025-11-16 18:19:34 +00:00
multi lines in content type description#1543
This commit is contained in:
parent
8b78daf3e7
commit
aada9332a5
@ -48,7 +48,7 @@ module.exports = {
|
|||||||
return ctx.badRequest(null, [{ messages: attributesErrors }]);
|
return ctx.badRequest(null, [{ messages: attributesErrors }]);
|
||||||
}
|
}
|
||||||
|
|
||||||
const _description = escapeNewlines(description);
|
const _description = escapeNewlines(description, '\\n');
|
||||||
|
|
||||||
strapi.reload.isWatching = false;
|
strapi.reload.isWatching = false;
|
||||||
|
|
||||||
|
|||||||
@ -62,7 +62,7 @@ const reorderList = (manager, list) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const escapeNewlines = (content, placeholder = '\n') => {
|
const escapeNewlines = (content, placeholder = '\n') => {
|
||||||
return content.replace(/[\n]+/g, placeholder);
|
return content.replace(/[\r\n]+/g, placeholder);
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user