Skip to content

Allow empty strings in paths#5

Open
kapouer wants to merge 4 commits into
Irrelon:masterfrom
kapouer:issue3
Open

Allow empty strings in paths#5
kapouer wants to merge 4 commits into
Irrelon:masterfrom
kapouer:issue3

Conversation

@kapouer

@kapouer kapouer commented Dec 6, 2019

Copy link
Copy Markdown

No description provided.

@Irrelon

Irrelon commented Dec 6, 2019

Copy link
Copy Markdown
Owner

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

kapouer commented Dec 6, 2019

Copy link
Copy Markdown
Author

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

Irrelon commented May 18, 2020

Copy link
Copy Markdown
Owner

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