Repository navigation
Fix bug in screenshot DSL parsing - #78
Merged
Merged
Conversation
I guess I was expecting `String.prototype.split` to work this way: ```js > "click .rentals li:first-of-type article.rental .image".split(/\s+/, 2); [ 'click', 'rentals li:first-of-type article.rental .image' ] ``` But it does not, it returns this: ```js > "click .rentals li:first-of-type article.rental .image".split(/\s+/, 2); [ 'click', '.rentals' ] ``` TL;DR I was expecting the limit paramemter to mean that it will only split the first space, and the rest will be returned unsplit (like how it is in Ruby). However, it actually just split all the spaces anyway, the "extra" strings are just dropped from the returned array.
chancancode
pushed a commit
to ember-learn/guides-source
that referenced
this pull request
Oct 2, 2019
Fix bug in screenshot DSL parsing --- Commit: ember-learn/super-rentals-tutorial@28ebcc3 Script: https://github.com/ember-learn/super-rentals-tutorial/blob/28ebcc38de56c77d50fcf0c3bab011dc0deb575a/scripts/deploy.sh Logs: https://travis-ci.org/ember-learn/super-rentals-tutorial/jobs/592719662
chancancode
pushed a commit
to ember-learn/super-rentals
that referenced
this pull request
Oct 2, 2019
Fix bug in screenshot DSL parsing --- Commit: ember-learn/super-rentals-tutorial@28ebcc3 Script: https://github.com/ember-learn/super-rentals-tutorial/blob/28ebcc38de56c77d50fcf0c3bab011dc0deb575a/scripts/deploy.sh Logs: https://travis-ci.org/ember-learn/super-rentals-tutorial/jobs/592719662
chancancode
pushed a commit
to ember-learn/guides-source
that referenced
this pull request
Oct 2, 2019
* Merge ember-learn/super-rentals-tutorial#74 Remove alt text for decorative image --- Commit: ember-learn/super-rentals-tutorial@6062aa2 Script: https://github.com/ember-learn/super-rentals-tutorial/blob/6062aa21fe7d3f2718d994d0d4d9f4d40158db09/scripts/deploy.sh Logs: https://travis-ci.org/ember-learn/super-rentals-tutorial/jobs/592222136 * Merge ember-learn/super-rentals-tutorial#73 Copy edit pass --- Commit: ember-learn/super-rentals-tutorial@f2fcd9d Script: https://github.com/ember-learn/super-rentals-tutorial/blob/f2fcd9d9cec3b71d5185ede26953292b24da2df5/scripts/deploy.sh Logs: https://travis-ci.org/ember-learn/super-rentals-tutorial/jobs/592251594 * Use backtick for `qunit-dom` --- Commit: ember-learn/super-rentals-tutorial@7502df1 Script: https://github.com/ember-learn/super-rentals-tutorial/blob/7502df14b5267648f8442f590b709c1d9f10e181/scripts/deploy.sh Logs: https://travis-ci.org/ember-learn/super-rentals-tutorial/jobs/592593660 * Merge ember-learn/super-rentals-tutorial#77 Add summary images --- Commit: ember-learn/super-rentals-tutorial@4c1524e Script: https://github.com/ember-learn/super-rentals-tutorial/blob/4c1524ee26279bb87a31606573eadda2fd28c2b0/scripts/deploy.sh Logs: https://travis-ci.org/ember-learn/super-rentals-tutorial/jobs/592686563 * Merge ember-learn/super-rentals-tutorial#78 Fix bug in screenshot DSL parsing --- Commit: ember-learn/super-rentals-tutorial@28ebcc3 Script: https://github.com/ember-learn/super-rentals-tutorial/blob/28ebcc38de56c77d50fcf0c3bab011dc0deb575a/scripts/deploy.sh Logs: https://travis-ci.org/ember-learn/super-rentals-tutorial/jobs/592719662 * Merge ember-learn/super-rentals-tutorial#79 Use regex correctly (-‸ლ) --- Commit: ember-learn/super-rentals-tutorial@c76a874 Script: https://github.com/ember-learn/super-rentals-tutorial/blob/c76a8744e1f2fa72e261009b7ecc3757cb45f7c5/scripts/deploy.sh Logs: https://travis-ci.org/ember-learn/super-rentals-tutorial/jobs/592774277
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I guess I was expecting
String.prototype.splitto work this way:But it does not, it returns this:
TL;DR I was expecting the limit parameter to mean that it will only split the first space, and the rest will be returned unspilt (like how it is in Ruby). However, it actually just split all the spaces anyway, the "extra" strings are just dropped from the returned array.