Skip to content

Commit

Permalink
feat(style): limit sha to 5 letters and make monospace
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Jul 2, 2022
1 parent b51c075 commit b07ade8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/markdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function formatReferences(references: string[], github: string, type: 'pr' | 'ha
if (type === 'pr')
return `https://github.com/${github}/issues/${ref.slice(1)}`

return `[${ref}](https://github.com/${github}/commit/${ref})`
return `[<samp>${ref.slice(0, 5)}</samp>](https://github.com/${github}/commit/${ref})`
})

const referencesString = join(refs).trim()
Expand Down

0 comments on commit b07ade8

Please sign in to comment.