You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add validator for double and single quotes in name and description #407
full_name:
type: str
default: Jane Smith
help: Enter your full name.
# validator: >-
# {% if '"' in full_name %}
# full_name must not contain unescaped double quotes. Use \\" for double quotes.
# {% endif %}
@abelsiqueira thanks, this is great indeed. We also use it for some of the variables.
I thinks the original functionality was to ensure that any double/single quotes are escaped. Do we want to allow this? I guess it is debatable.
This was implemented via cookicutter hooks like so: "full_name": cookiecutter.full_name.replace('\"', '\\\"'),
Activity
abelsiqueira commentedon Jul 31, 2024
We're using a regex to validate the package name: https://github.com/abelsiqueira/BestieTemplate.jl/blob/b1114d039578dbd5a132a8955c87352e6371448d/copier.yml#L9
Maybe it's helpful, maybe it's overkill.
lyashevska commentedon Jul 31, 2024
@abelsiqueira thanks, this is great indeed. We also use it for some of the variables.
I thinks the original functionality was to ensure that any double/single quotes are escaped. Do we want to allow this? I guess it is debatable.
This was implemented via cookicutter hooks like so:
"full_name": cookiecutter.full_name.replace('\"', '\\\"'),lyashevska commentedon Aug 15, 2024
Closing as addressed via #414