linkedin / linkedin/dustjs

Support special characters as key names in dust

Open
#229 9 comments 1 reaction 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

Support a use case "a.b.c" : " You are here"

Note: the json key itself has .

One way to solve is allow {a.b.c} to render the a.b.c. as the key ans not compile the same to getPath

https://github.com/linkedin/dustjs/blob/master/src/dust.pegjs

_-------------------------------------------------------------------------------------------------------------------------------------
key is defined as a character matching a to z, upper or lower case, followed by 0 or more alphanumeric characters
---------------------------------------------------------------------------------------------------------------------------------------_/
key "key"
= h:[a-zA-Z_$] t:[0-9a-zA-Z_$-]*
{ return h + t.join('') }

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 with src/dust.pegjs and the existing key grammar. Trace how a dotted key is parsed and resolved, then verify that the proposed {a.b.c} form treats the full text as one key rather than a path; confirm the behavior with the project's existing tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.