| Issue |
174359
|
| Summary |
[clang-doc] Mustache looks up missing tags in parent contexts
|
| Labels |
clang-doc
|
| Assignees |
|
| Reporter |
evelez7
|
If a tag, like `{{#Description}}`, is not found within the current context, then Mustache will go up the stack to find it. This is actually expected behavior according [to the Mustache spec](https://mustache.github.io/mustache.5.html) (See the "Tag Types/Variables") but that means that contexts that don't have partials (namely variables and friends currently) will end up searching parent contexts for the property if it doesn't exist. It seems like partials only search their current given context.
In practice, that means that friends and variables currently cant serialize comments because `{{#Description}}` will render the parent's comments. In theory, this seems to negate most of the logic that was set up to compensate for Mustache's "logic-less" design. It would be unfortunate to have to serialize a `HasVariableDescription` inside a variable JSON object (redundancy), but a full partial just for variables doesn't seem warranted yet.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs