Skip to content

Allow customizing parameter regex #53

@amake

Description

@amake

In c4a3c32 the parameter matching regex was changed from

  const regex = /{{(\w|:|[\s-+.,@/\//()?=*_$])+}}/g;

to

  const regex = /\{\{\s*([\p{L}_$][\p{L}\p{N}_.]*)(?::([^}]*))?\s*\}\}/gu;

While I think being stricter about parameter names is fine in theory, this is a big break in compatibility and broke lots of our saved templates.

I actually do need Unicode support, so I wouldn't ask to go back to the old regex. However it might make sense to allow consumers to specify their own regex.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions