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

Disabling code_block may cause crash #528

Open
Benjamsk opened this issue Aug 16, 2021 · 0 comments
Open

Disabling code_block may cause crash #528

Benjamsk opened this issue Aug 16, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@Benjamsk
Copy link

Benjamsk commented Aug 16, 2021

To Reproduce
Steps to reproduce the behavior:

  1. Disable code_block and code_fence extensions
  2. Open an existing document (value) in editor that has a line starting with 4 consecutive spaces (" ")
  3. Editor will crash
  4. See error

Expected behavior
Should not crash. Should probably handle trailing spaces beginning of newline as nothing.

I am simply opening an editor with value I created in editor.

Console Sample:
Error: Token type code_block not supported by Markdown parser
at MarkdownParseState.parseTokens (from_markdown.js:55)
at MarkdownParser.parse (from_markdown.js:219)
at RichMarkdownEditor.createDocument (index.tsx:485)
at RichMarkdownEditor.createState (index.tsx:466)
at RichMarkdownEditor.createView (index.tsx:502)
at RichMarkdownEditor.init (index.tsx:290)
at RichMarkdownEditor.componentDidMount (index.tsx:208)
at commitLifeCycles (react-dom.development.js:20663)
at commitLayoutEffects (react-dom.development.js:23426)
at HTMLUnknownElement.callCallback (react-dom.development.js:3945)
at Object.invokeGuardedCallbackDev (react-dom.development.js:3994)
at invokeGuardedCallback (react-dom.development.js:4056)
at commitRootImpl (react-dom.development.js:23151)
at unstable_runWithPriority (scheduler.development.js:468)
at runWithPriority$1 (react-dom.development.js:11276)
at commitRoot (react-dom.development.js:22990)
at performSyncWorkOnRoot (react-dom.development.js:22329)
at react-dom.development.js:11327
at unstable_runWithPriority (scheduler.development.js:468)
at runWithPriority$1 (react-dom.development.js:11276)
at flushSyncCallbackQueueImpl (react-dom.development.js:11322)
at flushSyncCallbackQueue (react-dom.development.js:11309)
at batchedUpdates$1 (react-dom.development.js:22387)
at reactionScheduler (reaction.ts:261)
at runReactions (reaction.ts:229)
at endBatch (observable.ts:111)
at _endAction (action.ts:138)
at executeAction (action.ts:70)
at bound openMyTasksPage (action.ts:46)
at runMiddleWares (mobx-state-tree.module.js:3234)
at runWithActionContext (mobx-state-tree.module.js:3078)
at Proxy.res (mobx-state-tree.module.js:3105)
at NewTaskStore.js:80

Similar Error message for code_fence, when multiple places with 4 trailing spaces (in middle of line).

@Benjamsk Benjamsk added the bug Something isn't working label Aug 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant