contexted link highlight + adjust prettier

This commit is contained in:
2023-04-30 16:57:50 +02:00
parent 2ff849219b
commit 8db4583b0b
11 changed files with 53 additions and 74 deletions

View File

@@ -6,15 +6,10 @@ export const formatDate = (date: Date | number): string => {
: date
const dateDistanceInWords = formatDistance(dateToFormat, new Date()) + ' ago'
return isToday(date)
? dateDistanceInWords
: format(date, 'D MMMM [at] HH:mm ')
return isToday(date) ? dateDistanceInWords : format(date, 'D MMMM [at] HH:mm ')
}
export const getAllMatches = (
regex: RegExp,
input: string
): RegExpExecArray[] => {
export const getAllMatches = (regex: RegExp, input: string): RegExpExecArray[] => {
const matches = []
let m
do {