Internal error in highlighter
[Enter steps to reproduce:]
- ...
- ...
Atom: 1.57.0 x64 Electron: 9.4.4 OS: Ubuntu 20.04.3 Thrown From: markdown-preview-plus package 4.11.1
Stack Trace
Internal error in highlighter
At TypeError: Cannot read property 'moveToSuccessor' of undefined
TypeError: Cannot read property 'moveToSuccessor' of undefined
at HighlightIterator.moveToSuccessor (/snap/atom/282/usr/share/atom/resources/app/static/<embedded>:11:3303358)
at /packages/markdown-preview-plus/dist/main.js:1:199717
at /packages/markdown-preview-plus/dist/main.js:1:198971
at async Promise.all (index 25)
at Ei (/packages/markdown-preview-plus/dist/main.js:1:197589)
at /packages/markdown-preview-plus/dist/main.js:1:76242)
at Bo.renderMarkdownText (/packages/markdown-preview-plus/dist/main.js:1:225921)
Commands
-3:41.3.0 editor:indent (input.hidden-input)
5x -3:39.7.0 core:backspace (input.hidden-input)
-3:30.5.0 core:move-right (input.hidden-input)
-3:30.2.0 editor:newline (input.hidden-input)
2x -3:06.1.0 core:move-down (input.hidden-input)
2x -3:04.8.0 editor:newline (input.hidden-input)
2x -2:42.9.0 core:backspace (input.hidden-input)
-2:23 core:move-right (input.hidden-input)
2x -1:45.9.0 core:backspace (input.hidden-input)
-1:40 core:move-right (input.hidden-input)
7x -1:38.2.0 core:backspace (input.hidden-input)
3x -0:56.7.0 editor:newline (input.hidden-input)
-0:45.3.0 autocomplete-plus:confirm (input.hidden-input)
-0:42.8.0 editor:newline (input.hidden-input)
4x -0:19.5.0 core:backspace (input.hidden-input)
-0:14.5.0 editor:newline (input.hidden-input)
Non-Core Packages
atom-material-ui 2.1.3
atom-ternjs 0.20.0
busy-signal 2.0.1
hyperclick 0.1.5
ide-docker 0.1.0
intentions 2.1.1
language-ansible 0.2.2
language-docker 1.1.8
language-terraform 0.9.6
linter 3.4.0
linter-terraform-syntax 1.6.0
linter-ui-default 3.4.1
markdown-preview-plus 4.11.1
markdown-up-img 1.0.1
platformio-ide-terminal 2.10.1
readme 2.0.0
tidy-markdown 3.0.1
Hi. Sorry for the late response. Can you provide a reproduction guide? This issue's pretty hard to reproduce, it turns out.
Hi, it looks like this error happens when a code block is created with a language specified and without any contents. This is how it occurs in my case (language doesn't matter):
- Type
```bashto begin a bash code block; newline - Close the block by typing
```
or
- Create an empty code block without a language specified: ``` ```
- Add language ```bash ```
The error doesn't occur if the code block has contents before the language is specified, for example:
- ``` ls /usr/local/bin ```
- ```bash ls /usr/local/bin ```
In the following case, the error occurs after step 1 only if you are at the end of the document (i.e. nothing but whitespace follows):
-
```bash
-
```bash ls /usr/local/bin
-
```bash ls /usr/local/bin ```
Atom: 1.57.0 x64 Electron: 9.4.4 OS: macOS 11.1 Thrown From: markdown-preview-plus package 4.11.1
Stack Trace
Internal error in highlighter
At TypeError: Cannot read property 'moveToSuccessor' of undefined
TypeError: Cannot read property 'moveToSuccessor' of undefined
at HighlightIterator.moveToSuccessor (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:3305679)
at /packages/markdown-preview-plus/dist/main.js:1:199717
at /packages/markdown-preview-plus/dist/main.js:1:198971
at async Promise.all (index 3)
at Ei (/packages/markdown-preview-plus/dist/main.js:1:197589)
at /packages/markdown-preview-plus/dist/main.js:1:76242)
at Bo.renderMarkdownText (/packages/markdown-preview-plus/dist/main.js:1:225921)
Commands
-1:22.1.0 editor:newline (input.hidden-input)
-1:21.5.0 core:move-up (input.hidden-input)
2x -1:20.3.0 core:backspace (input.hidden-input)
2x -1:18.3.0 editor:newline (input.hidden-input)
3x -1:14.3.0 core:backspace (input.hidden-input)
2x -0:46.2.0 editor:newline (input.hidden-input)
-0:45.4.0 core:backspace (input.hidden-input)
-0:44.4.0 core:move-up (input.hidden-input)
-0:39.9.0 core:backspace (input.hidden-input)
-0:38 core:move-down (input.hidden-input)
8x -0:37.7.0 core:backspace (input.hidden-input)
2x -0:34.4.0 editor:newline (input.hidden-input)
-0:25.6.0 core:backspace (input.hidden-input)
3x -0:22.9.0 editor:newline (input.hidden-input)
-0:13.4.0 core:backspace (input.hidden-input)
-0:08.8.0 editor:newline (input.hidden-input)
Non-Core Packages
file-templates 0.2.0
git-log 0.4.1
language-latex 1.2.0
language-matlab 0.2.1
latex 0.50.2
latex-wordcount 0.6.0
markdown-preview-plus 4.11.1
minimap 4.39.10
pdf-view 0.73.0
python-indent 1.2.6
scroll-sync 0.2.4
Prerequisites
- [ ] Put an X between the brackets on this line if you have done all of the following:
- Reproduced the problem in Safe Mode: https://flight-manual.atom.io/hacking-atom/sections/debugging/#using-safe-mode
- Followed all applicable steps in the debugging guide: https://flight-manual.atom.io/hacking-atom/sections/debugging/
- Checked the FAQs on the message board for common solutions: https://discuss.atom.io/c/faq
- Checked that your issue isn't already filed: https://github.com/issues?q=is%3Aissue+user%3Aatom
- Checked that there is not already an Atom package that provides the described functionality: https://atom.io/packages
Description
Steps to Reproduce
- Create a file
- ```java
- Press Enter.
Expected behavior:
Actual behavior:
Versions
Atom: 1.60.0 x64 Electron: 9.4.4 OS: macOS 12.4 Thrown From: markdown-preview-plus package 4.11.3
Stack Trace
Internal error in highlighter
At TypeError: Cannot read property 'moveToSuccessor' of undefined
TypeError: Cannot read property 'moveToSuccessor' of undefined
at HighlightIterator.moveToSuccessor (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:3326541)
at /packages/markdown-preview-plus/dist/main.js:1:199717
at /packages/markdown-preview-plus/dist/main.js:1:198971
at async Promise.all (index 0)
at Ei (/packages/markdown-preview-plus/dist/main.js:1:197589)
at /packages/markdown-preview-plus/dist/main.js:1:76242)
at Bo.renderMarkdownText (/packages/markdown-preview-plus/dist/main.js:1:225921)
Commands
4x -0:35.6.0 core:backspace (input.hidden-input)
-0:32.9.0 editor:newline (input.hidden-input)
-0:25.8.0 core:copy (atom-notification.fatal.icon.icon-bug.native-key-bindings.has-detail.has-close.has-stack.has-description)
Non-Core Packages
markdown-preview-plus 4.11.3
simplified-chinese-menu 5.3.5