javascript - determine line number when my codemirror mode object is called -


my codemirror mode object implements token(stream, state) , blankline(state) methods.

how determine line number of stream object passed in token method, , line number skipped when blankline called?

you can't, , shouldn't. modes must approach document stream, , know came before (the state) , current line (the stream). necessary allow editor use highlighting info , states if lines added or removed above given position in document.


Comments

Popular posts from this blog

javascript - oscilloscope of speaker input stops rendering after a few seconds -

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -