Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.

Simplify FindUtils.parseDollars - #7582

Merged
dangoor merged 2 commits into
adobe:masterfrom
marcelgerber:simplify-parse-dollars
Jun 25, 2014
Merged

dangoor merged 2 commits into
adobe:masterfrom
marcelgerber:simplify-parse-dollars

Conversation

@marcelgerber

Copy link
Copy Markdown
Contributor

I tried to simplify/comment the quite complicated FindReplace helper function parseDollars, but to be honest, I don't know if I made it better or worse.

Let's see if someone understands the function now 😆

The only architectural change is that parseInt is only called after we made sure index is indeed an integer (and not &).

@dangoor

dangoor commented Apr 21, 2014

Copy link
Copy Markdown
Contributor

@njx

@njx

njx commented Apr 24, 2014

Copy link
Copy Markdown

Marking low priority. (@SAplayer - not intended to be an insult :), but we're starting to try to sort out pull requests that need to be dealt with more urgently from ones that can wait a bit.)

Comment thread src/search/FindReplace.js Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: "unescaped"

@dangoor dangoor assigned dangoor and unassigned njx Jun 17, 2014
@dangoor

dangoor commented Jun 17, 2014

Copy link
Copy Markdown
Contributor

Stealing this from @njx. @SAplayer the change seems fine. Would you be willing to add some test code for this to FindReplace-test.js? I realize there are no tests there now, but it would be nice to have some that demonstrate what this function does (and that it actually does it!)

Thanks!

@njx

njx commented Jun 17, 2014

Copy link
Copy Markdown

Before merging this, let me check whether it will merge cleanly with the replace-across-files branch - I might have moved the function elsewhere.

@dangoor

dangoor commented Jun 17, 2014

Copy link
Copy Markdown
Contributor

@njx OK. I was surprised it hadn't moved already :)

Getting replace-across-files in is higher priority, so you can just carry on, merge that and then we'll see what needs to happen.

@njx

njx commented Jun 17, 2014

Copy link
Copy Markdown

Yup, it's moved to FindUtils.js in my branch. Should be easy enough to copy it there after that lands and put up a new PR. (Sorry, I should have landed this before starting the branch in the first place.)

@marcelgerber

Copy link
Copy Markdown
Contributor Author

@dangoor There are no tests specificially for this function, but there are many for the functionality:
https://github.com/adobe/brackets/blob/master/test/spec/FindReplace-test.js#L1173-1331

@dangoor

dangoor commented Jun 18, 2014

Copy link
Copy Markdown
Contributor

@SAplayer Ahh, you're right. That's fine.

…llars

Conflicts:
	src/search/FindReplace.js
@marcelgerber

Copy link
Copy Markdown
Contributor Author

@dangoor @njx Merged and ready.

@marcelgerber marcelgerber changed the title Simplify (?) FindReplace helper function parseDollars Simplify FindUtils.parseDollars Jun 20, 2014
@dangoor

dangoor commented Jun 25, 2014

Copy link
Copy Markdown
Contributor

@SAplayer Thanks for merging this in with the recent find changes.

dangoor added a commit that referenced this pull request Jun 25, 2014
@dangoor
dangoor merged commit f5fd5fa into adobe:master Jun 25, 2014
@marcelgerber
marcelgerber deleted the simplify-parse-dollars branch June 25, 2014 20:52
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants