@Test public void dontDoubleHighlight() { final List<Option> options = new ArrayList<>(); options.add(new Option("--assignee, -a=<String[]>", null)); options.add(new Option("--body, -b=<String>", null)); final Highlight highlight = new Highlight(options); assertEquals("use " + "\u001B[0m\u001B[1m--body\u001B[0m" + " to point to a json file", highlight.matches("use `--body` to point to a json file")); assertEquals("use \u001B[0m\u001B[1m--body=false\u001B[0m when in doubt", highlight.matches("use `--body=false` when in doubt")); }
public String matches(String text) { text = matches(text, flags); text = matches(text, code); return text; }
Highlight { public String matches(String text) { text = matches(text, flags); text = matches(text, code); return text; } }
Highlight { public String matches(String text) { text = matches(text, flags); text = matches(text, code); return text; } Highlight(final List<Option> options); }
Highlight { public String matches(String text) { text = matches(text, flags); text = matches(text, code); return text; } Highlight(final List<Option> options); String highlight(String text); String matches(String text); }
Highlight { public String matches(String text) { text = matches(text, flags); text = matches(text, code); return text; } Highlight(final List<Option> options); String highlight(String text); String matches(String text);  }