Skip to content

Commit

Permalink
yaml lineWidth 200
Browse files Browse the repository at this point in the history
  • Loading branch information
duc-cnzj committed Apr 14, 2023
1 parent a3881de commit 179c2a6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
3 changes: 2 additions & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@
"web-vitals": "^2.1.2",
"whatwg-fetch": "^3.6.2",
"xterm": "^5.0.0",
"xterm-addon-fit": "^0.6.0"
"xterm-addon-fit": "^0.6.0",
"yaml": "^2.2"
},
"scripts": {
"start": "craco start",
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/MyCodeMirror.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export const MyCodeMirror: React.FC<{
const data = parseDocument(String(value));
console.log(data.errors);
if (data.errors.length === 0) {
onChange?.(data.toString());
onChange?.(data.toString({ lineWidth: 200 }));
}
}
} catch (e) {
Expand Down
5 changes: 5 additions & 0 deletions frontend/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11937,6 +11937,11 @@ yaml@^2.1.3:
resolved "https://registry.npmmirror.com/yaml/-/yaml-2.1.3.tgz#9b3a4c8aff9821b696275c79a8bee8399d945207"
integrity sha512-AacA8nRULjKMX2DvWvOAdBZMOfQlypSFkjcOcu9FalllIDJ1kvlREzcdIZmidQUqqeMv7jorHjq2HlLv/+c2lg==

yaml@^2.2:
version "2.2.1"
resolved "https://registry.npmmirror.com/yaml/-/yaml-2.2.1.tgz#3014bf0482dcd15147aa8e56109ce8632cd60ce4"
integrity sha512-e0WHiYql7+9wr4cWMx3TVQrNwejKaEe7/rHNmQmqRjazfOP5W8PB6Jpebb5o6fIapbz9o9+2ipcaTM2ZwDI6lw==

yargs-parser@^20.2.2:
version "20.2.9"
resolved "https://registry.npmmirror.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee"
Expand Down

0 comments on commit 179c2a6

Please sign in to comment.