Skip to content

Minor improvements to path handling and access#333

Merged
rexm merged 1 commit intoHandlebars-Net:masterfrom
alexdawes:feature/paths-and-escape-characters
Jan 2, 2020
Merged

Minor improvements to path handling and access#333
rexm merged 1 commit intoHandlebars-Net:masterfrom
alexdawes:feature/paths-and-escape-characters

Conversation

@alexdawes
Copy link
Copy Markdown
Contributor

@alexdawes alexdawes commented Dec 20, 2019

Ensure that path breaking respects square bracket escape characters so that objects with keys like foo.bar can be accessed using {{ [foo.bar] }} (#328)

Give preference to string index property getters if one exists, to avoid classes that implement IEnumerable<object> whilst also having a string indexer (most notably JObject) from being unable to be used with numeric keys. (#329)

Only trim a single pair of square brackets from the key, and only if both exist ([ at start of key and ] at end)

Give preference to string index get properties if one exists.

Only trim a single pair of square brackets if both exist ([ at start of
key and ] at end)
@alexdawes
Copy link
Copy Markdown
Contributor Author

#329 #328

@rexm rexm merged commit 39906a0 into Handlebars-Net:master Jan 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants