Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow empty strings in paths #5

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

kapouer
Copy link

@kapouer kapouer commented Dec 6, 2019

No description provided.

@Irrelon
Copy link
Owner

Irrelon commented Dec 6, 2019

Hey, thanks for the PR. I'll need to review what impact supporting blank string literals as path nodes and removing clean() might have on existing use cases.

Can you give me a use case for blank string literals as a key other than because it's valid? I've never seen anyone use them ever and am curious what your use case would be.

@kapouer
Copy link
Author

kapouer commented Dec 6, 2019

Example: i have a situation where a template is:

<div>
  <p block-content="mykey">some content</p>
</div>

So i store content in {mykey: 'some content'}.

However sometimes the template is a single node, so the key is implied.
Since any name would risk the key to be a legit key, i choose to store

<div class="anothertemplate">some other content</div>

as {"": "some other content"}.

I used to store it as "some other content" (a plain string) but it makes a special case.

@Irrelon
Copy link
Owner

Irrelon commented May 18, 2020

Hi ya, just a quick update.... so having reviewed the impact this might have, I would like to support this but need to re-work the implementation so that it is an optional behaviour rather than implicit.

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.

None yet

2 participants