Open gikuluca opened 3 years ago
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):
```bash
to begin a bash code block; newline```
or
The error doesn't occur if the code block has contents before the language is specified, for example:
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
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)
-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)
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
Expected behavior:
Actual behavior:
Atom: 1.60.0 x64 Electron: 9.4.4 OS: macOS 12.4 Thrown From: markdown-preview-plus package 4.11.3
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)
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)
markdown-preview-plus 4.11.3
simplified-chinese-menu 5.3.5
[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
Commands
Non-Core Packages