better hazard formatting

This commit is contained in:
Matt Walsh
2024-04-11 22:44:12 -05:00
parent 53ad8eb317
commit 5d00cf4608
2 changed files with 2 additions and 1 deletions

View File

@@ -66,7 +66,7 @@ class Hazards extends WeatherDisplay {
const lines = this.data.map((data) => {
const fillValues = {};
// text
fillValues['hazard-text'] = `${data.properties.event}<br/><br/>${data.properties.description.replace('\n', '<br/><br/>')}`;
fillValues['hazard-text'] = `${data.properties.event}<br/><br/>${data.properties.description.replaceAll('\n\n', '<br/><br/>').replaceAll('\n', ' ')}`;
return this.fillTemplate('hazard', fillValues);
});