Skip to content

Commit

Permalink
fix(SHS-5980): Minor fixes from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
Marc Berger committed Feb 14, 2025
1 parent f3ff624 commit 3d91359
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions docroot/modules/humsci/hs_dashboard/src/AnnouncementsManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ private function parseCsv(string $csv_content): array {
}

// Removes empty rows.
if (empty($data[2]) && empty($data[3])) {
if (empty($data[1]) || (empty($data[2]) && empty($data[3]))) {
continue;
}

Expand All @@ -169,7 +169,7 @@ private function parseCsv(string $csv_content): array {
}

if (isset($data[2])) {
$data[2] = $this->convertMarkdownLinks('<strong>' . trim($data[2]) . '</strong>');
$data[2] = $this->convertMarkdownLinks(trim($data[2]));
}

if (isset($data[3])) {
Expand Down Expand Up @@ -286,7 +286,13 @@ public function getTableRows(): array {
$table_rows[] = [
'data' => [
['data' => $row[1]],
['data' => ['#markup' => $row[2]]],
[
'data' => [
'#markup' => $row[2],
'#prefix' => '<strong>',
'#suffix' => '</strong>',
],
],
['data' => ['#markup' => $row[3]]],
],
];
Expand Down

0 comments on commit 3d91359

Please sign in to comment.