Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Table of contents creation fails when some lines begin with tab #603

Closed
bugrasan opened this issue Jan 27, 2020 · 1 comment · Fixed by #877
Closed

Table of contents creation fails when some lines begin with tab #603

bugrasan opened this issue Jan 27, 2020 · 1 comment · Fixed by #877
Assignees
Labels
Area: Table of contents Pertaining to table of contents (TOC generation and detection, related heading operations). Issue: Bug Res: Fixed Fix is checked in, but it might be a few weeks until a release.
Milestone

Comments

@bugrasan
Copy link

What is the problem?

Table of content creation fails with the following error, when code block is indented in ordered list:

Cannot read property '1' of null

How can I reproduce it?

VSCode: v1.41.1
OS: Linux
Markdown All in One: v2.7.0

Copy and paste the following markdown into a file, e.g. test.md:

# first header



## Second header

1. test line1
2. check if works as expected:
	```bash
	# comment
	ls
	```

then try to add TOC on line 3 and you will receive the error above.

Is there any error message in the console?

notificationsAlerts.ts:38 TypeError: Cannot read property '1' of null
	at /home/user/.vscode/extensions/yzhang.markdown-all-in-one-2.7.0/dist/extension.js:1
	at Array.map (<anonymous>)
	at h (/home/user/.vscode/extensions/yzhang.markdown-all-in-one-2.7.0/dist/extension.js:1)
	at /home/user/.vscode/extensions/yzhang.markdown-all-in-one-2.7.0/dist/extension.js:1
	at Generator.next (<anonymous>)
	at /home/user/.vscode/extensions/yzhang.markdown-all-in-one-2.7.0/dist/extension.js:1
	at new Promise (<anonymous>)
	at n (/home/user/.vscode/extensions/yzhang.markdown-all-in-one-2.7.0/dist/extension.js:1)
	at d (/home/user/.vscode/extensions/yzhang.markdown-all-in-one-2.7.0/dist/extension.js:1)
	at /home/user/.vscode/extensions/yzhang.markdown-all-in-one-2.7.0/dist/extension.js:1
	at Generator.next (<anonymous>)
	at /home/user/.vscode/extensions/yzhang.markdown-all-in-one-2.7.0/dist/extension.js:1
	at new Promise (<anonymous>)
	at n (/home/user/.vscode/extensions/yzhang.markdown-all-in-one-2.7.0/dist/extension.js:1)
	at c (/home/user/.vscode/extensions/yzhang.markdown-all-in-one-2.7.0/dist/extension.js:1)
	at v._executeContributedCommand (/opt/visual-studio-code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:538)
	at v.$executeContributedCommand (/opt/visual-studio-code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:539)
	at p._doInvokeHandler (/opt/visual-studio-code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:663)
	at p._invokeHandler (/opt/visual-studio-code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:662)
	at p._receiveRequest (/opt/visual-studio-code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:661)
	at p._receiveOneMessage (/opt/visual-studio-code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:660)
	at /opt/visual-studio-code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:658
	at l.fire (/opt/visual-studio-code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:46)
	at _.fire (/opt/visual-studio-code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:189)
	at /opt/visual-studio-code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:820
	at l.fire (/opt/visual-studio-code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:46)
	at _.fire (/opt/visual-studio-code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:189)
	at t.PersistentProtocol._receiveMessage (/opt/visual-studio-code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:193)
	at /opt/visual-studio-code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:190
	at l.fire (/opt/visual-studio-code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:46)
	at p.acceptChunk (/opt/visual-studio-code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:186)
	at /opt/visual-studio-code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:186
	at Socket.t (/opt/visual-studio-code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:195)
	at Socket.emit (events.js:200)
	at addChunk (_stream_readable.js:294)
	at readableAddChunk (_stream_readable.js:275)
	at Socket.Readable.push (_stream_readable.js:210)
	at Pipe.onStreamRead (internal/stream_base_commons.js:166)
@yzhang-gh yzhang-gh added Area: Table of contents Pertaining to table of contents (TOC generation and detection, related heading operations). Issue: Bug labels Jan 27, 2020
yzhang-gh added a commit that referenced this issue Jan 27, 2020
@yzhang-gh
Copy link
Owner

Thanks for the feedback. It should be fixed in the dev build.

@yzhang-gh yzhang-gh added the Res: Fixed Fix is checked in, but it might be a few weeks until a release. label Jan 27, 2020
@Lemmingh Lemmingh self-assigned this Dec 22, 2020
@Lemmingh Lemmingh removed the Res: Fixed Fix is checked in, but it might be a few weeks until a release. label Dec 22, 2020
@Lemmingh Lemmingh changed the title Table of content creation fails when code block is indented in ordered list Table of contents creation fails when some lines begin with tab Dec 22, 2020
@Lemmingh Lemmingh added the Res: Fixed Fix is checked in, but it might be a few weeks until a release. label Jan 17, 2021
@Lemmingh Lemmingh added this to the Next milestone Jan 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Table of contents Pertaining to table of contents (TOC generation and detection, related heading operations). Issue: Bug Res: Fixed Fix is checked in, but it might be a few weeks until a release.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants