summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoranomal00us <95467104+anomal00us@users.noreply.github.com>2022-07-25 23:51:35 +0200
committerroot <root@delphi.lan>2022-08-08 21:08:57 +0200
commit80395e474812871fecf35af476153f6b304dacc6 (patch)
treea6a12428846d5feeec02e32ddf9d9f9cbb36b18c
parent2030fff3d513b93f527711afc7467a89cab88737 (diff)
downloadmustache-spec-80395e474812871fecf35af476153f6b304dacc6.tar.gz
Updating rationale.
-rw-r--r--specs/~dynamic-names.json2
-rw-r--r--specs/~dynamic-names.yml16
2 files changed, 8 insertions, 10 deletions
diff --git a/specs/~dynamic-names.json b/specs/~dynamic-names.json
index 194162d..d019d4f 100644
--- a/specs/~dynamic-names.json
+++ b/specs/~dynamic-names.json
@@ -1,5 +1,5 @@
{
- "overview": "Rationale: this special notation was introduced specifically to allow the\ndynamic loading of partials. The main advantage that this notation\noffers is to allow dynamic loading of partials, which is particularly useful\nin cases where polymorphic data needs to be rendered, or in cases where\na child template is shared by multiple parent templates; cases which\notherwise would be possible to render only by using either complex (and\noptional) features such as lambdas, or by using solutions that are inefficient\nboth in terms of space and in terms of computational efficiency, such as:\noverloading the template with if blocks or preprocessing the template.\n\nDynamic Names are a special notation to dynamically determine a tag's content.\n\nDynamic Names MUST be a non-whitespace character sequence NOT containing\nthe current closing delimiter. A Dynamic Name consists of an asterisk,\nfollowed by a dotted name. The dotted name follows the same notation as in an\nInterpolation tag.\n\nThis tag's dotted name, which is the Dynamic Name excluding the\nleading asterisk, references a key in the context whose value will be used in\nplace of the Dynamic Name itself as content of the tag. The dotted name\nresolution produces the same value as an Interpolation tag and does not affect\nthe context for further processing.\n\nSet Delimiter tags MUST NOT affect the resolution of a Dynamic Name. The\nDynamic Names MUST be resolved against the context stack local to the tag.\nFailed resolution of the dynamic name SHOULD result in nothing being rendered.\n\nEngines that implement Dynamic Names MUST support their use in Partial tags.\nIn engines that also implement the optional inheritance spec, Dynamic Names\ninside Parent tags SHOULD be supported as well. Dynamic Names cannot be\nresolved more than once (Dynamic Names cannot be nested).\n",
+ "overview": "Rationale: this special notation was introduced primarly to allow the dynamic\nloading of partials. The main advantage that this notation offers is to allow\ndynamic loading of partials, which is particularly useful in cases where\npolymorphic data needs to be rendered in different ways, or in cases where a\npartial template needs to be included by multiple parent templates; cases\nwhich would otherwise be possible to render only with solutions that are\nconvoluted, inefficient, or both.\n\nDynamic Names are a special notation to dynamically determine a tag's content.\n\nDynamic Names MUST be a non-whitespace character sequence NOT containing\nthe current closing delimiter. A Dynamic Name consists of an asterisk,\nfollowed by a dotted name. The dotted name follows the same notation as in an\nInterpolation tag.\n\nThis tag's dotted name, which is the Dynamic Name excluding the\nleading asterisk, references a key in the context whose value will be used in\nplace of the Dynamic Name itself as content of the tag. The dotted name\nresolution produces the same value as an Interpolation tag and does not affect\nthe context for further processing.\n\nSet Delimiter tags MUST NOT affect the resolution of a Dynamic Name. The\nDynamic Names MUST be resolved against the context stack local to the tag.\nFailed resolution of the dynamic name SHOULD result in nothing being rendered.\n\nEngines that implement Dynamic Names MUST support their use in Partial tags.\nIn engines that also implement the optional inheritance spec, Dynamic Names\ninside Parent tags SHOULD be supported as well. Dynamic Names cannot be\nresolved more than once (Dynamic Names cannot be nested).\n",
"tests": [
{
"name": "Basic Behavior - Partial",
diff --git a/specs/~dynamic-names.yml b/specs/~dynamic-names.yml
index d60ef2b..7307fc3 100644
--- a/specs/~dynamic-names.yml
+++ b/specs/~dynamic-names.yml
@@ -1,13 +1,11 @@
overview: |
- Rationale: this special notation was introduced specifically to allow the
- dynamic loading of partials. The main advantage that this notation
- offers is to allow dynamic loading of partials, which is particularly useful
- in cases where polymorphic data needs to be rendered, or in cases where
- a child template is shared by multiple parent templates; cases which
- otherwise would be possible to render only by using either complex (and
- optional) features such as lambdas, or by using solutions that are inefficient
- both in terms of space and in terms of computational efficiency, such as:
- overloading the template with if blocks or preprocessing the template.
+ Rationale: this special notation was introduced primarly to allow the dynamic
+ loading of partials. The main advantage that this notation offers is to allow
+ dynamic loading of partials, which is particularly useful in cases where
+ polymorphic data needs to be rendered in different ways, or in cases where a
+ partial template needs to be included by multiple parent templates; cases
+ which would otherwise be possible to render only with solutions that are
+ convoluted, inefficient, or both.
Dynamic Names are a special notation to dynamically determine a tag's content.