(date = new Date())
| 252 | |
| 253 | /** Sanitizes a commit hash or shortHash for safe interpolation into Markdown links. */ |
| 254 | function sanitizeCommitHash(hash: string | undefined): string { |
| 255 | return (hash ?? '').replace(/[\[\]()<>\\\r\n]/g, ''); |
| 256 | } |
| 257 | |
| 258 | /** |
| 259 | * Builds a date stamp for stamping in release notes. |
| 260 | * |
| 261 | * Uses the current date, or a provided date in the format of YYYY-MM-DD, i.e. 1970-11-05. |
| 262 | */ |
| 263 | export function buildDateStamp(date = new Date()) { |