JanLoebel / JanLoebel/showdown-toc

Error when attempting to run with showdown 1.3.0

Open
#1 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
4
Forks
1
PR merge metrics
No merged PRs in 30d

Description

Thanks for this helpful extension :-).

I'm using it with showdown 1.3.0 via grunt-showdown (actually via [ferllings/grunt-showdown](https://github.com/ferllings/grunt-showdown) because the original repo doesn't work with showdown 1.3.0). When I try to use showdown-toc I get the following error:

> Error in 2 extension-> sub-extension 0: property "type" must be a string, but undefined given

This does not appear to be grunt-showdown-specific because if I comment out showdown-toc it works fine; also I am using other showdown extensions such as [showdownjs/prettify-extension](https://github.com/showdownjs/prettify-extension).

I am using a config like this in Gruntfile.js:

``` javascript
showdown: {
all: {
options: {
customExtensions: ['showdown-prettify', 'showdown-toc']
},
files: [{
expand: true,
src: 'tmp/book/**/*.md',
ext: '.html'
}]
}
},
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the failure with the customExtensions configuration shown in Gruntfile.js, using showdown-toc with showdown 1.3.0 and grunt-showdown. Then inspect the showdown-toc extension entry point and compare its setup with the working prettify extension. Done means the configuration runs without the "property \"type\"..." error while both extensions remain enabled.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.