☁️ Loving our new documentation website? Provide feedback in the CloudCannon Community! ✨

allow_numbers

Table of contents

Description:

This key toggles whether CloudCannon will allow unquoted numbers like 5 and -0.4 when parsing snippet parameters.

Setting this key to true will allow unquoted numeric values in snippet parameter parsing.

By default, this key is false (i.e., unquoted numbers are not allowed).

Appears in:
└── Snippet Format
    └── allow_numbers
Type:
boolean
Examples:

In this example, we have configured snippet format to allow unquoted numbers.

Copied to clipboard
_snippets:
  example:
    snippet: <<example [[param]]>>
    params:
      param:
        parser: argument
        options:
          format:
            allow_numbers: true
{
  "_snippets": {
    "example": {
      "snippet": "<<example [[param]]>>",
      "params": {
        "param": {
          "parser": "argument",
          "options": {
            "format": {
              "allow_numbers": true
            }
          }
        }
      }
    }
  }
}
Open in a new tab