diff --git a/packages/string-templates/manifest.json b/packages/string-templates/manifest.json index d06a01f606..dce4af8665 100644 --- a/packages/string-templates/manifest.json +++ b/packages/string-templates/manifest.json @@ -264,7 +264,7 @@ "numArgs": 2, "example": "{{equalsLength [1, 2, 3] 3}} -> true", "description": "
Returns true if the the length of the given value
is equal to the given length
. Can be used as a block or inline helper.
Returns true if the the length of the given value
is equal to the given length
. Can be used as a block or inline helper.
Uppercase all of the characters in the given string. If used as a block helper it will uppercase the entire block. This helper does not support inverse blocks.
\n", - "requiresBlock": true + "requiresBlock": false } }, "comparison": { @@ -931,7 +931,7 @@ "numArgs": 4, "example": "{{compare 10 '<' 5 }} -> false", "description": "Render a block when a comparison of the first and third arguments returns true. The second argument is the [arithemetic operator][operators] to use. You may also optionally specify an inverse block to render when falsy.
\n", - "requiresBlock": true + "requiresBlock": false }, "contains": { "args": [ diff --git a/packages/string-templates/scripts/gen-collection-info.js b/packages/string-templates/scripts/gen-collection-info.js index 1b540c829c..ed57fe7fae 100644 --- a/packages/string-templates/scripts/gen-collection-info.js +++ b/packages/string-templates/scripts/gen-collection-info.js @@ -115,7 +115,8 @@ function getCommentInfo(file, func) { docs.example = docs.example.replace("product", "multiply") } docs.description = blocks[0].trim() - docs.requiresBlock = docs.tags.some(el => el.title === "block") + docs.acceptsBlock = docs.tags.some(el => el.title === "block") + docs.acceptsInline = docs.tags.some(el => el.title === "inline") return docs } @@ -160,7 +161,7 @@ function run() { numArgs: args.length, example: jsDocInfo.example || undefined, description: jsDocInfo.description, - requiresBlock: jsDocInfo.requiresBlock, + requiresBlock: jsDocInfo.acceptsBlock && !jsDocInfo.acceptsInline, }) } outputJSON[collection] = collectionInfo