From 661d7b509933708ac1edc2067c85c5f561e1abbc Mon Sep 17 00:00:00 2001 From: alexlamsl Date: Sat, 15 Feb 2020 22:21:54 +0800 Subject: [PATCH] update text --- README.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e0129157..7e07cc87 100644 --- a/README.md +++ b/README.md @@ -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 (i.e. `/@preserve|@license|@cc_on/i`), a regular expression string - (e.g. `/^!/`), or a function that returns a *truthy/falsy* value that will be converted to `boolean` (e.g. `(_, comment) => preserveComment(comment.value)` where `preserveComment` is a user-defined 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`)