Skip to content
This repository has been archived by the owner on Apr 26, 2021. It is now read-only.

Ignore colors in the parser #70

Closed
matthewmueller opened this issue Aug 15, 2016 · 3 comments
Closed

Ignore colors in the parser #70

matthewmueller opened this issue Aug 15, 2016 · 3 comments

Comments

@matthewmueller
Copy link

matthewmueller commented Aug 15, 2016

First of all this is a really excellent library. I've been waiting awhile for a proper docopt parser for JS. Great work!

One thing I did run into was that it's not possible to fully color some of the key commands. For example, if I want to color Usage:

This works

${chalk.blue('I. Usage')}:

This doesn't work:

${chalk.blue('I. Usage:')}

It's quite minor, but I'd love for this parser to just ignore the color codes altogether.

@felixSchl
Copy link
Owner

Wow yeah, good find and thanks for reporting. I can see how that would be an issue. Won't take long to fix I think.

@felixSchl
Copy link
Owner

I've got a fix implemented. These tests show what is now allowed: ffa7424#diff-846cfe57c9231ae390e1f48b1aeaacb2R913. That should cover your usecase but if you'd like to give me a fixture we can add that to the testbed and verify.

@felixSchl felixSchl modified the milestone: Next release Aug 17, 2016
felixSchl added a commit that referenced this issue Aug 18, 2016
There are dedicated tests in purescript that #70, so this is just an
"extra".
@felixSchl
Copy link
Owner

Github was a bit eager to close this because of the subject line. The fix is on development now and will be part of the next release. It's working fine for the fixture you have given me for #71 which includes colors as well. I updated the test suite accordingly. I think once we have #71 sorted out, I'll do a patch release. I've got some other fixes pending as well.

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

2 participants