Skip to content

Commit

Permalink
Add short widow avoidance in post titles
Browse files Browse the repository at this point in the history
  • Loading branch information
jonamil committed Aug 8, 2024
1 parent 70ef57d commit e0f9e23
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/PostsListItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
>
<div class="space-y-0.5 font-serif text-base-serif">
<h2 class="font-serif-heading font-bold">
{{ smartquotes(item.title) }}
{{ avoidShortWidows(smartquotes(item.title)) }}
</h2>
<div class="[overflow-wrap:anywhere]">
{{ item.url?.hostname }}
Expand Down Expand Up @@ -68,6 +68,7 @@
<script setup lang="ts">
import smartquotes from 'smartquotes-ts';
import type { HackerNewsItem } from '@/types';
import { avoidShortWidows } from '@/utils/avoidShortWidows';
import { formatNumber } from '@/utils/formatNumber';
import { absoluteTimestamp } from '@/utils/absoluteTimestamp';
import BaseLabel from '@/components/BaseLabel.vue';
Expand Down

1 comment on commit e0f9e23

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deploy preview for hackernews-dot-cool ready!

✅ Preview
https://hackernews-dot-cool-f0atakck6-jonamil-56ba8df7.vercel.app

Built with commit e0f9e23.
This pull request is being automatically deployed with vercel-action

Please sign in to comment.