Skip to content

Commit

Permalink
Updated "Output options" > "comments" in README.md (#3717)
Browse files Browse the repository at this point in the history
Expanded the current documentation to include:

- What the value of `"some"` means based on `lib/output.js`.
- Information about the `Function` overload parameters and expected output.
  • Loading branch information
marcogrcr committed Feb 15, 2020
1 parent f0a2990 commit 31a7bf2
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions README.md
Expand Up @@ -848,8 +848,14 @@ can pass additional arguments that control the code output:
statement.

- `comments` (default `false`) -- pass `true` or `"all"` to preserve all
comments, `"some"` to preserve some comments, a regular expression string
(e.g. `/^!/`) or a function.
comments, `"some"` to preserve multi-line comments that contain `@cc_on`,
`@license`, or `@preserve` (case-insensitive), a regular expression string
(e.g. `/^!/`), or a function which returns `boolean`, e.g.
```js
function(node, comment) {
return comment.value.indexOf("@type " + node.TYPE) >= 0;
}
```

- `indent_level` (default `4`)

Expand Down

0 comments on commit 31a7bf2

Please sign in to comment.