Skip to content

Commit

Permalink
fix options terminal highlighting in CLI
Browse files Browse the repository at this point in the history
The options regular expression matched anything starting with a dash.
This makes it so that a word must start with one or two dashes and a
word must start with an opening bracket. There must be whitespace
separating them.
  • Loading branch information
kbrsh committed Oct 18, 2019
1 parent b055b9a commit b56a09e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/moon-cli/dist/moon-cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
var exec = require("child_process").exec;

var parameterRE = /<\w+>/g;
var optionRE = /\[\w+\]|--?\w+/g;
var optionRE = /(?:^|\s)(?:\[\w+\]|--?\w+)/g;
var help = {
version: {
usage: "moon version",
Expand Down
2 changes: 1 addition & 1 deletion packages/moon-cli/dist/moon-cli.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/moon-cli/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const https = require("https");
const exec = require("child_process").exec;

const parameterRE = /<\w+>/g;
const optionRE = /\[\w+\]|--?\w+/g;
const optionRE = /(?:^|\s)(?:\[\w+\]|--?\w+)/g;

const help = {
version: {
Expand Down

0 comments on commit b56a09e

Please sign in to comment.