Skip to content

Commit

Permalink
Improve shortcode name documentation to specify first-letter rule (#2655
Browse files Browse the repository at this point in the history
)

This updates the Shortcodes documentation to specify that shortcode names must begin with a letter or an underscore.

fixes #2654
  • Loading branch information
ticky authored Sep 29, 2024
1 parent eb157ca commit 6d4b110
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/content/documentation/content/shortcodes.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down

0 comments on commit 6d4b110

Please sign in to comment.