| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent a9fa2da commit d264639
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -241,14 +241,17 @@ const meta = [ | |||
| 241 | 241 | ]; | |
| 242 | 242 | ||
| 243 | 243 | // Regex used for ansi escape code splitting | |
| 244 | - // Adopted from https://github.com/chalk/ansi-regex/blob/HEAD/index.js | ||
| 245 | - // License: MIT, authors: @sindresorhus, Qix-, arjunmehta and LitoMore | ||
| 244 | + // Ref: https://github.com/chalk/ansi-regex/blob/f338e1814144efb950276aac84135ff86b72dc8e/index.js | ||
| 245 | + // License: MIT by Sindre Sorhus <sindresorhus@gmail.com> | ||
| 246 | 246 | // Matches all ansi escape code sequences in a string | |
| 247 | - const ansiPattern = '[\\u001B\\u009B][[\\]()#;?]*' + | ||
| 248 | - '(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*' + | ||
| 249 | - '|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)' + | ||
| 250 | - '|(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))'; | ||
| 251 | - const ansi = new RegExp(ansiPattern, 'g'); | ||
| 247 | + const ansi = new RegExp( | ||
| 248 | + '[\\u001B\\u009B][[\\]()#;?]*' + | ||
| 249 | + '(?:(?:(?:(?:;[-a-zA-Z\\d\\/\\#&.:=?%@~_]+)*' + | ||
| 250 | + '|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/\\#&.:=?%@~_]*)*)?' + | ||
| 251 | + '(?:\\u0007|\\u001B\\u005C|\\u009C))' + | ||
| 252 | + '|(?:(?:\\d{1,4}(?:;\\d{0,4})*)?' + | ||
| 253 | + '[\\dA-PR-TZcf-nq-uy=><~]))', 'g', | ||
| 254 | + ); | ||
| 252 | 255 | ||
| 253 | 256 | let getStringWidth; | |
| 254 | 257 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments