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

Already on GitHub? Sign in to your account

Fixed bugs related to #each blocks #162

Closed
wants to merge 8 commits into
from

Conversation

Projects
None yet
3 participants

When model.at() was used to get the path for an element in an #each block it would give an incorrect index if there was text or spaces between the #each block and the contained element.

The fix skips any text nodes in the #each block.

There was another bug where updates to #each blocks wouldn't remove all the right elements when there was space inside the #each block but outside the one element it can contain.

Both bugs could occur for code like:

{#each}
<li>{.}</li>
{/}

reneclaus added some commits Nov 12, 2012

When model.at() was used to get the path for an element in an #each b…
…lock it could give an incorrect index. If there was text or spaces between the #each block and the containing element it would give a wrong answer.

The #each block can still only contain one element. It may now contain text surrounding the single element. It may not have any variables outside the single element.
The setRemove function wasn't handling ranges correctly. This was cau…
…sing removes from #each blocks with ranges (for example some blank text before/after the element) to fail.

I originally used a while loop but the condition wasn't being reevaluated - maybe a browser optimization.

@reneclaus reneclaus closed this Jan 16, 2013

What just happened?

Sorry, I'm new at using git. I felt bad having this pull request on my fork. When originally submitted it I just wanted to suggest a fix I made. Since then I've added some modifications to the fork that I needed for my project but don't think should be integrated into derby so I wanted to get rid of the pull request. What should I do instead?

Don't worry dude, I was just surprised to see you closing the pull request after making so many commits.

First of all welcome to git and github.

Secondly git users usually create feature branches. That is one branch for one unit of work that you are doing, later you can merge this branch in your main branch that is usually master branch in most cases. When you want to suggest a code change, you can create a branch for it in your repo and send a pull request from that branch. You can continue your personal development, that you don't wish to share, or that you think might not be useful for rest of the community in other branches

I know its all very confusing to a new git user. Git-scm.com is a good resource if you want to learn branching and Distributed workflow. For a quick start however you can skim through this blog.

So what about this? I was having troubles with the each blocks, so I manually modified this to get it working again from the reneclaus/derby@68b894f pull request.

@reneclaus thanks, it works soft again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment