Skip to content

Commit 04bcacf

Browse files
fix: small oopsies with h1 formatting in headers
1 parent b65319a commit 04bcacf

File tree

2 files changed

+14
-17
lines changed

2 files changed

+14
-17
lines changed

src/models/platform.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ def format_header(self, custom_header: str, start_date: datetime,
249249
safe_header = str(header_text) if header_text is not None else ""
250250
safe_subheader = str(subheader).rstrip() if subheader is not None else "" # Use rstrip here
251251

252-
final_content = f"{safe_header}\n\n{safe_subheader}" # Initial assignment
252+
final_content = f"# {safe_header}\n\n{safe_subheader}"
253253
logger.debug("🖌️ format_header - Assembled base final_content")
254254

255255
if timezone_line:
@@ -311,7 +311,7 @@ def format_tv_event(self, event_item: EventItem, passed_event_handling: str) ->
311311

312312
formatted = f"{time_prefix}{formatted_show}{episode_details}"
313313
if event_item.is_premiere:
314-
formatted += " 🎉"
314+
formatted += " 🎉"
315315
if event_item.is_past and passed_event_handling == "STRIKE":
316316
formatted = f"{DISCORD_STRIKE_START}{formatted}{DISCORD_STRIKE_END}"
317317

@@ -489,7 +489,7 @@ def format_tv_event(self, event_item: EventItem, passed_event_handling: str) ->
489489

490490
formatted = f"{time_prefix}{formatted_show}{episode_details}"
491491
if event_item.is_premiere:
492-
formatted += " 🎉"
492+
formatted += " "
493493
if event_item.is_past and passed_event_handling == "STRIKE":
494494
formatted = f"{SLACK_STRIKE_START}{formatted}{SLACK_STRIKE_END}"
495495

src/utils/format_utils.py

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -155,26 +155,26 @@ def format_subheader_text(tv_count: int, movie_count: int, premiere_count: int,
155155
# Add TV shows count
156156
if tv_count > 0:
157157
shows_text = pluralize("episode", tv_count)
158-
subheader_parts.append(f"📺 {tv_count} all-new {shows_text}") # Use 📺
158+
subheader_parts.append(f"{bold_start} 📺 {tv_count} all-new {shows_text}{bold_end}")
159159

160160
# Add movies if any
161161
if movie_count > 0:
162162
movies_text = pluralize("movie release", movie_count)
163-
subheader_parts.append(f"🎬 {movie_count} {movies_text}") # Use 🎬
163+
subheader_parts.append(f"{bold_start} 🎬 {movie_count} {movies_text}{bold_end}")
164164

165165
# Add premieres if any
166166
if premiere_count > 0:
167167
premiere_text = pluralize("premiere", premiere_count)
168-
subheader_parts.append(f"🎉 {premiere_count} season {premiere_text}") # Use 🎉
168+
subheader_parts.append(f"{bold_start} 🎉 {premiere_count} season {premiere_text}{bold_end}")
169169

170-
# Join with appropriate separators
170+
# Join with appropriate separators (UNBOLDED)
171171
if len(subheader_parts) == 1:
172-
subheader = f"{bold_start}{subheader_parts[0]}{bold_end}"
172+
subheader = subheader_parts[0]
173173
elif len(subheader_parts) == 2:
174-
subheader = f"{bold_start}{subheader_parts[0]} and {subheader_parts[1]}{bold_end}"
174+
subheader = f"{subheader_parts[0]} and {subheader_parts[1]}"
175175
else:
176-
# Join all but last with commas, then add the last with "and"
177-
subheader = f"{bold_start}{', '.join(subheader_parts[:-1])}, and {subheader_parts[-1]}{bold_end}"
176+
# d the last with "and"
177+
subheader = f"{', '.join(subheader_parts[:-1])}, and {subheader_parts[-1]}"
178178

179179
return subheader + "\n\n" # Add line break
180180

@@ -205,14 +205,11 @@ def get_day_colors(platform: str, start_week_on_monday: bool = True) -> Dict:
205205

206206
def format_timezone_line(timezone_obj: Optional[pytz.BaseTzInfo], platform: str) -> str:
207207
"""
208-
Formats the timezone information line, using custom names or abbreviations.
208+
Formats the timezone information line, usi[g custom names or abbreviations.
209209
210210
Args:
211-
timezone_obj: The pytz timezone object from the config.
212-
platform: The target platform ('discord' or 'slack').
213-
214-
Returns:
215-
Formatted timezone line (e.g., "_All times shown in Central Time_") or empty string.
211+
timezone_obj: The pytz timezone oom t[ he config.
212+
platformoomt platt[ hem ('discord'platformoomteturnsplatt[ hem Formatted timezonplatformoomteturnsplatt[ hem own in Central Time_") or empty string.
216213
"""
217214
if not timezone_obj:
218215
logger.warning("‼️ No timezone object provided to format_timezone_line.")

0 commit comments

Comments
 (0)