templatePlaceholderElement property

RegExp templatePlaceholderElement
final

Regex that describes the format of placeholders in a urlTemplate

Used internally by populateTemplatePlaceholders, but may also be used externally.


The regex used prior to v6 originated from leaflet.js, specifically from commit dc79b10683d2. Prior to that, a more permissive regex was used, starting from commit 70339807ed6b. It is never mentioned why this regex was used or changed in Leaflet. This regex is more permissive of the characters it allows.

Implementation

static final templatePlaceholderElement = RegExp(r'{([^{}]*)}');