Skip to content
This repository has been archived by the owner on Jan 3, 2023. It is now read-only.

Internal error in highlighter #529

Open
gikuluca opened this issue Aug 27, 2021 · 3 comments
Open

Internal error in highlighter #529

gikuluca opened this issue Aug 27, 2021 · 3 comments

Comments

@gikuluca
Copy link

[Enter steps to reproduce:]

  1. ...
  2. ...

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 
@lierdakil
Copy link
Collaborator

Hi. Sorry for the late response. Can you provide a reproduction guide? This issue's pretty hard to reproduce, it turns out.

@fionaEyoung
Copy link

fionaEyoung commented Sep 15, 2021

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):

  1. Type ```bash to begin a bash code block; newline
  2. Close the block by typing ```

or

  1. Create an empty code block without a language specified:
    ```
    ```
  2. Add language
    ```bash
    ```

The error doesn't occur if the code block has contents before the language is specified, for example:

  1. ```
    ls /usr/local/bin
    ```
  2. ```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):

  1. ```bash

  2. ```bash
    ls /usr/local/bin

  3. ```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 

@a492219408
Copy link

a492219408 commented Jul 4, 2022

Prerequisites

Description

Steps to Reproduce

  1. Create a file
  2. ```java
  3. 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 

Additional Information

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants