From 6d4b11008af7edcca47991c191c3e56616775342 Mon Sep 17 00:00:00 2001 From: Jessica Stokes Date: Sun, 29 Sep 2024 12:05:12 -0700 Subject: [PATCH] Improve shortcode name documentation to specify first-letter rule (#2655) This updates the Shortcodes documentation to specify that shortcode names must begin with a letter or an underscore. fixes #2654 --- docs/content/documentation/content/shortcodes.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/content/documentation/content/shortcodes.md b/docs/content/documentation/content/shortcodes.md index 382cedfd1..609c692b3 100644 --- a/docs/content/documentation/content/shortcodes.md +++ b/docs/content/documentation/content/shortcodes.md @@ -82,9 +82,9 @@ pretty much just shuttle arguments to their template. Several limitions of note If the shortcode is invalid, it will not be interpreted by the markdown parser and will instead get rendered directly into the final HTML. -Lastly, a shortcode name (and thus the corresponding `.html` file) as well as the argument names -can only contain numbers, letters and underscores, or in Regex terms `[0-9A-Za-z_]`. -Although theoretically an argument name could be a number, it will not be possible to use such an argument in the template. +Lastly, a shortcode name (and thus the corresponding `.html` file) as well as any argument names +can only contain numbers, letters and underscores, and must start with a letter or underscore. +In Regex terms, `^[A-Za-z_][0-9A-Za-z_]+$`. Argument values can be of one of five types: