Skip to content

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.

2 participants