abe33 / abe33/atom-pigments

TypeError: Cannot read property 'colorExpression' of undefined

Aperta
#375 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
bug
Lingua principale
CoffeeScript
Stelle
518
Fork
70
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

I am making an [extension package for Pigments](https://github.com/Gethe/pigments-wow) that will add highlights for WoW addon code. While setting up a regex for color escape sequences in text, I came across this error.

**Atom Version**: 1.24.0-beta1
**Pigments Version**: v0.40.2
**System**: Windows 10

Stack Trace
``` javascript
Cannot read property 'colorExpression' of undefined TypeError: Cannot read property 'colorExpression' of undefined
at ColorScanner.module.exports.ColorScanner.search (file:///C:/Users/Tim/.atom/packages/pigments/lib/color-scanner.coffee:29:42)
at BufferColorsScanner.scan (file:///C:/Users/Tim/.atom/packages/pigments/lib/tasks/scan-buffer-colors-handler.coffee:18:29)
at Object.module.exports (file:///C:/Users/Tim/.atom/packages/pigments/lib/tasks/scan-buffer-colors-handler.coffee:31:35)
at process. (C:\Users\Tim\AppData\Local\atom\app-1.24.0-beta1\resources\app.asar\src\task-bootstrap.js:51:41)
at emitTwo (events.js:106:13)
at process.emit (events.js:191:7)
at process.nextTick (internal/child_process.js:752:12)
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickCallback (internal/process/next_tick.js:98:9)
```

The regex causing the error is `\|c([\da-fA-F]{8}).*?(?:(?=\|c)|\|r)`. It works properly on [regex101](https://regex101.com/r/Dh1Uxy/1/) and with the regex tester package.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.