ui: auto convert \r\n

This commit is contained in:
undefined committed 2021-06-27 11:23:24 +08:00
1 parent 56aafde4a8
commit 77b08c9e7c
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@hydrooj/ui-default",
"version": "4.11.37",
"version": "4.11.38",
"author": "undefined <i@undefined.moe>",
"license": "AGPL-3.0",
"main": "hydro.js",
@@ -194,7 +194,7 @@ const page = new NamedPage('problem_files', () => {
model: `hydro://problem/file/${filename}`,
});
const action = await promise;
value = editor.value();
value = editor.value().replace(/\r\n/g, '\n');
editor.destory();
if (action !== 'ok') return null;
return value;