From 5d00cf46080eda5c5abe782bbc7000f3626bf335 Mon Sep 17 00:00:00 2001 From: Matt Walsh Date: Thu, 11 Apr 2024 22:44:12 -0500 Subject: [PATCH] better hazard formatting --- server/scripts/modules/hazards.mjs | 2 +- ws4kp.code-workspace | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/server/scripts/modules/hazards.mjs b/server/scripts/modules/hazards.mjs index 7bb2bfb..7a55fdb 100644 --- a/server/scripts/modules/hazards.mjs +++ b/server/scripts/modules/hazards.mjs @@ -66,7 +66,7 @@ class Hazards extends WeatherDisplay { const lines = this.data.map((data) => { const fillValues = {}; // text - fillValues['hazard-text'] = `${data.properties.event}

${data.properties.description.replace('\n', '

')}`; + fillValues['hazard-text'] = `${data.properties.event}

${data.properties.description.replaceAll('\n\n', '

').replaceAll('\n', ' ')}`; return this.fillTemplate('hazard', fillValues); }); diff --git a/ws4kp.code-workspace b/ws4kp.code-workspace index 429d7b8..641f4a3 100644 --- a/ws4kp.code-workspace +++ b/ws4kp.code-workspace @@ -53,5 +53,6 @@ }, "files.exclude": {}, "files.eol": "\n", + "editor.formatOnSave": true, }, } \ No newline at end of file