Prose punctuation a line-number token can carry: "lines 900-1003," / "(L88)".
(token: string)
| 200 | |
| 201 | /** Prose punctuation a line-number token can carry: "lines 900-1003," / "(L88)". */ |
| 202 | function stripLineTokenPunctuation(token: string): string { |
| 203 | return token.replace(/^[('"`[]+/, '').replace(/[)'"`\].,;:!?]+$/, ''); |
| 204 | } |
| 205 | |
| 206 | /** |
| 207 | * Strip prose punctuation wrapped around a token without eating punctuation |