summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoranomal00us <95467104+anomal00us@users.noreply.github.com>2022-07-20 22:58:53 +0200
committerroot <root@delphi.lan>2022-08-08 21:08:27 +0200
commit956cfa41988cc1b59892a495d5072adaa3791e38 (patch)
tree38af8dd65f75aa7589db075caad8f4976bbde1e7
parent69487d554800a8de5bc1390e636a7290af25f015 (diff)
downloadmustache-spec-956cfa41988cc1b59892a495d5072adaa3791e38.tar.gz
Removing redundant paragraph
-rw-r--r--specs/~dynamic-names.json2
-rw-r--r--specs/~dynamic-names.yml19
2 files changed, 1 insertions, 20 deletions
diff --git a/specs/~dynamic-names.json b/specs/~dynamic-names.json
index 8c325d0..93ea278 100644
--- a/specs/~dynamic-names.json
+++ b/specs/~dynamic-names.json
@@ -1,5 +1,5 @@
{
- "overview": "Dynamic 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 latter follows the same notation as in an\nInterpolation tag.\n\nThis tag's dotted name, which is equal to the Dynamic Name excluding the\nleading asterisk, refers to 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\nThis tag's content refers to a key in the context whose value will be used in\nplace of the Dynamic Name itself as content of the tag. The name resolution is\nidentical to name resolution in Interpolation tags, as follows:\n 1) Split the name on periods; the first part is the name to resolve, any\n remaining parts should be retained.\n 2) Walk the context stack from top to bottom, finding the first context\n that is a) a hash containing the name as a key OR b) an object responding\n to a method with the given name.\n 3) If the context is a hash, the data is the value associated with the\n name.\n 4) If the context is an object, the data is the value returned by the\n method with the given name.\n 5) If any name parts were retained in step 1, each should be resolved\n against a context stack containing only the result from the former\n resolution. If any part fails resolution, the result should be considered\n falsey, and should interpolate as the empty string.\nThe resolved data should be coerced into a string before being used as\ncontent.\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": "Dynamic 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 latter follows the same notation as in an\nInterpolation tag.\n\nThis tag's dotted name, which is equal to the Dynamic Name excluding the\nleading asterisk, refers to 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 062fbcd..a9bf913 100644
--- a/specs/~dynamic-names.yml
+++ b/specs/~dynamic-names.yml
@@ -12,25 +12,6 @@ overview: |
resolution produces the same value as an Interpolation tag and does not affect
the context for further processing.
- This tag's content refers to a key in the context whose value will be used in
- place of the Dynamic Name itself as content of the tag. The name resolution is
- identical to name resolution in Interpolation tags, as follows:
- 1) Split the name on periods; the first part is the name to resolve, any
- remaining parts should be retained.
- 2) Walk the context stack from top to bottom, finding the first context
- that is a) a hash containing the name as a key OR b) an object responding
- to a method with the given name.
- 3) If the context is a hash, the data is the value associated with the
- name.
- 4) If the context is an object, the data is the value returned by the
- method with the given name.
- 5) If any name parts were retained in step 1, each should be resolved
- against a context stack containing only the result from the former
- resolution. If any part fails resolution, the result should be considered
- falsey, and should interpolate as the empty string.
- The resolved data should be coerced into a string before being used as
- content.
-
Set Delimiter tags MUST NOT affect the resolution of a Dynamic Name. The
Dynamic Names MUST be resolved against the context stack local to the tag.
Failed resolution of the dynamic name should result in nothing being rendered.