“description”: “Bands of heavy rain will move east across southwest Scotland through Friday night, turning more persistent on Saturday, before clearing during the evening. 30-50 mm of rain falling widely, and possibly 60-80 mm over higher ground. \n\n\n\n\n\n\n\n\nWhat should I do?\nGive yourself the best chance of avoiding delays by checking road conditions if driving, or bus and \ntrain timetables, amending your travel plans if necessary.\nCheck if your property could be at risk of flooding. If so, consider preparing a flood plan and an \nemergency flood kit.\nPeople cope better with power cuts when they have prepared for them in advance. It’s easy to do; \nconsider gathering torches and batteries, a mobile phone power pack and other essential items.\nBe prepared for weather warnings to change quickly: when a weather warning is issued, the Met \nOffice recommends staying up to date with the weather forecast in your area. For further details see UK weather warnings - Met Office”
“description”: “After a drier interlude, further rain will spread north during Saturday, becoming heavy for a time, before clearing away during the evening. Rain will fall onto already saturated ground with 15-25 mm possible, and perhaps a further 30-35 mm over hills and mountains.\n\nWhat should I do?\n\nGive yourself the best chance of avoiding delays by checking road conditions if driving, or bus and \ntrain timetables, amending your travel plans if necessary.\n\nCheck if your property could be at risk of flooding. If so, consider preparing a flood plan and an \nemergency flood kit.\n\nBe prepared for weather warnings to change quickly: when a weather warning is issued, the Met \nOffice recommends staying up to date with the weather forecast in your area. For further details see UK weather warnings - Met Office”
These inconsistent line breaks produce very different results on pwsWD (and on Saratoga), while the MeteoAlarm live page description just has wordspaces, whatever the number of \n characters in the feed.
The author of the text used linefeeds to make the texts more readable.
There are three different warning-systems used: RSS, ATOM and CAP
The same warning is used in
text-only only systems on f.i. phones, in an SMS
and weather-websites which use html
Our scripts, when generating html, translate the new-line character to the html version ‘ ’ so that the formatting of the author still shows as intended.
When generating text -only output we leave the new-line characters as is.
Meteoalarm.org does not care about the original text-formatting. They are interested in maps and hide the text as small as possible somewhere on the right of their map.
But what should I, the current script author, do?
Do the readers of weather-warnings on our website, prefer the formatting?
Or do they prefer all informational texts in 1 long line ?
Until today I heard no complaints. and your first post started with “Can’t remember noticing this before,”.
I prefer to leave it as is.
It wasn’t a complaint about pwsWD, and I never wanted you (or Ken) to change anything, I just thought there ought to be some internal standards at Met Office or MeteoAlarm. . . obviously not
EDIT: Seven UK warnings today.
Linefeeds between description proper and “What should I do?” – 5, 9, 8, 9, 9, 2, 2.
“description”: “Information on update: Area of warning adjusted south to remove parts of northeast Scotland but include northeast England. The expected impacts have been reduced. An area of rain arriving from the west early on Tuesday is expected to become slow-moving and persistent across this area, eventually clearing southeast in the early hours of Wednesday morning. Much of the warning area is expected to see 10-20 mm of rainfall during this time, and in some places, particularly east facing areas of higher ground, 30-40 mm is likely, which could lead to some flooding.\n\nWhat should I do? \n\nCheck if your property could be at risk of flooding. If so, consider preparing a flood plan and an emergency flood kit. \n \nGive yourself the best chance of avoiding delays by checking road conditions if driving, or bus and train timetables, amending your travel plans if necessary. \n\nPeople cope better with power cuts when they have prepared for them in advance. It’s easy to do; consider gathering torches and batteries, a mobile phone power pack and other essential items. \n\nBe prepared for weather warnings to change quickly: when a weather warning is issued, the Met Office recommends staying up to date with the weather forecast in your area. For further details see UK weather warnings - Met Office”