(str = "", numSpaces = 1)
| 14019 | return str.replace(/\n\n+/g, "\n") |
| 14020 | } |
| 14021 | static shiftRight(str = "", numSpaces = 1) { |
| 14022 | let spaces = " ".repeat(numSpaces) |
| 14023 | return str.replace(/\n/g, `\n${spaces}`) |
| 14024 | } |
| 14025 | static getLinks(str = "") { |
| 14026 | const _re = new RegExp("(^|[ \t\r\n])((ftp|http|https):(([A-Za-z0-9$_.+!*(),;/?:@&~=-])|%[A-Fa-f0-9]{2}){2,}(#([a-zA-Z0-9][a-zA-Z0-9$_.+!*(),;/?:@&~=%-]*))?([A-Za-z0-9$_+!*();/?:~-]))", "g") |
| 14027 | return str.match(_re) || [] |
no test coverage detected