linkedin / linkedin/dustjs

too much recursion: that can lead to a infinite loop when resolving values

Open
#310 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
2.9k
Forks
461
PR merge metrics
No merged PRs in 30d

Description

One of the use cases that can lead to this issue

{#male root="{title}" title="Mrs"}
{root}
{#names:female title="{title}" period="."}
{title}{period} {.}{~n}
{/names}
{/male}

too much recursion
elem = elem(this, context, null, {auto: auto, filters: filters});

{
"female" : { "title" : "Senorita" },
"title": "Sir",
"names": ['Javier'],
"male" : { "title" : "Senor" },
}

The issue is related to have same name aliases , title=title or title="{title}" in nested levels

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the nested alias example and trace the reported elem = elem(this, context, null, {auto: auto, filters: filters}); path during value resolution. Done means the example renders without excessive recursion or an infinite loop while preserving nested aliases such as title="{title}".

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.