Skip to content

Commit

Permalink
style(feed): improve feed command output format
Browse files Browse the repository at this point in the history
- Improved the feed command output format by updating the HTML structure
- Changed the link presentation to be more organized
  • Loading branch information
guanguans committed Apr 11, 2024
1 parent 705c1d1 commit f8dcc5e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ node_modules/
package-lock.json
.ai-commit.json
/eza.png
/tests.*
9 changes: 7 additions & 2 deletions app/Commands/FeedCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,13 @@ static function (Collection $carry, string $line) use (&$date): Collection {
'title' => $title = (string) $line->match('/\[.*\]/')->trim('[]'),
'link' => $link = (string) $line->match('/\(.*\)/')->trim('()'),
'content' => <<<HTML
<a href="$link" target="_blank">$title</a>
<a href="https://github.com/guanguans/favorite-link" target="_blank">https://github.com/guanguans/favorite-link</a>
<blockquote>
<p><a href="$link" target="_blank">$title</a></p>
</blockquote>
<ul>
<li><a href="$link" target="_blank">$link</a></li>
<li><a href="https://github.com/guanguans/favorite-link" target="_blank">https://github.com/guanguans/favorite-link</a></li>
</ul>
HTML,
]);
},
Expand Down

0 comments on commit f8dcc5e

Please sign in to comment.