Skip to content

Commit

Permalink
DM-48259 in review
Browse files Browse the repository at this point in the history
  • Loading branch information
pothiers committed Dec 27, 2024
1 parent fcc4c20 commit ee641e7
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions python/lsst/ts/logging_and_reporting/source_adapters.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
import copy
import datetime as dt
import itertools
import re
import traceback
from abc import ABC
from collections import defaultdict
Expand Down Expand Up @@ -509,7 +510,8 @@ def telescope(rec):
for tele, g0 in itertools.groupby(recs, key=telescope):
table.append(f"### Telescope: {tele}")
for rec in g0:
msg = rec["summary"].strip()
# Replace 3 or more newlines with just two.
msg = re.sub(r"\n{3,}", "\n\n", rec["summary"].strip())

table.append(f"\n{msg}\n")
crew_list = rec.get("observers_crew", [])
Expand Down Expand Up @@ -711,7 +713,11 @@ def obs_date(rec):
if new:
msg = new
else:
msg = rep.htmlcode(rec["message_text"].strip())

# Replace 3 or more newlines with just two.
msg = rep.htmlcode(
re.sub(r"\n{3,}", "\n\n", rec["message_text"].strip())
)
mdstr += f"- {attrstr}"

mdstr += "\n\n" + msg + "\n"
Expand Down

0 comments on commit ee641e7

Please sign in to comment.