(str, sourceStr = '')
| 215 | } |
| 216 | |
| 217 | function normalizeTrailingColon(str, sourceStr = '') { |
| 218 | if (sourceStr.endsWith(': ') && str.endsWith(':')) { |
| 219 | return str + ' '; |
| 220 | } |
| 221 | if (sourceStr.endsWith(':') && str.endsWith(': ')) { |
| 222 | return str.slice(0, -1); |
| 223 | } |
| 224 | return str; |
| 225 | } |
| 226 | |
| 227 | module.exports = { |
| 228 | extract, |