Skip to content

Feature request: international characters in placeholders #21

Open
@jlous

Description

@jlous

My project uses the local language in domain model identifiers, including some local non-ascii letters (æøå).
This works fine with with js/ts generally, but does not work with named placeholders.

This means I either have to let requirements from my persistence library pollute my core model, or maintain an anti-corruption layer with redundant DTOs and mappers just for the spelling, or transliterate param objects on the fly, which would be vulnerable to naming collisions.
None of them are very tempting.

Ideally, the requirements for placeholders names should be similar to the ones for js identifiers (but allowing the reserved words).
There may of course be technical reasons why this is impractical, but getting close would be a good design goal.

The js regex unicode classes should be useful for this: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Regular_expressions/Unicode_character_class_escape#examples
TLDR: the character class for "unicode letter" is "\p{L}"

A fair second choice would be a configurable placeholder 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