markdown-toc icon indicating copy to clipboard operation
markdown-toc copied to clipboard

Dash bullets not working from CLI

Open bencmbrook opened this issue 6 years ago • 4 comments

markdown-toc --bullets "-" README.md

causes this error: https://github.com/jonschlinkert/markdown-toc/blob/4ba79a2948f2a2ca472a103916a0530e6acb26f9/cli.js#L17

markdown-toc --bullets "*" README.md

works perfectly well

bencmbrook avatar Jul 31 '19 21:07 bencmbrook

It looks like it is getting parsed as an argument rather than a parameter to bullets, this is what i get when i log the a args object

{ _: [ '-', 'README.md' ],
  i: true,
  json: false,
  firsth1: true,
  stripHeadingTags: true,
  bullets: '' }

michaelfarrell76 avatar Jul 31 '19 21:07 michaelfarrell76

Also having this problem ❤️

bnb avatar Aug 21 '19 17:08 bnb

@bnb sharing our temporary work around below:

https://github.com/transcend-io/penumbra/blob/046e073b5ed6191cfc522b2b8a2d550a65c6c4bf/package.json#L31

bencmbrook avatar Aug 21 '19 17:08 bencmbrook

You can work around that with:

markdown-toc --bullets=- README.md

Note the = between the option name and value.

weibeld avatar Mar 13 '20 12:03 weibeld