Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Handlebars.SafeString #27

Merged
merged 8 commits into from
Aug 30, 2016
Merged

Support for Handlebars.SafeString #27

merged 8 commits into from
Aug 30, 2016

Conversation

nknapp
Copy link
Owner

@nknapp nknapp commented Aug 26, 2016

This PR solves #25. promisedHandlebars eturns the correct result for a test-case derived from the one in #22).
It would be nice if someone could review this and give comments. If nobody says a word, I will merge and publish next week (probably on Tuesday) to give some time for reviews.

Basically, the solution is to implement special behavior for Promises and SafeStrings in the replacePlaceholdersRecursivelyIn-function. This also caused the need for a String.prototype.replace-alternative that is capable for handling Promises returned from the replacer-function.
This is implemented in a separate file (and could possibly be extracted into a separate npm-module).

@coveralls
Copy link

coveralls commented Aug 26, 2016

Coverage Status

Coverage decreased (-0.8%) to 99.167% when pulling 436d769 on test-pr22 into 4ba01e2 on master.

2 similar comments
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.8%) to 99.167% when pulling 436d769 on test-pr22 into 4ba01e2 on master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.8%) to 99.167% when pulling 436d769 on test-pr22 into 4ba01e2 on master.

@coveralls
Copy link

coveralls commented Aug 26, 2016

Coverage Status

Coverage decreased (-0.8%) to 99.167% when pulling 80b065f on test-pr22 into 4ba01e2 on master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.8%) to 99.167% when pulling 80b065f on test-pr22 into 4ba01e2 on master.

- Add "replaceP" as replacement for "String.prototype.replace" with
  promise support.
- Use "replaceP" in Marker to replace placeholders by actual values.
@coveralls
Copy link

coveralls commented Aug 26, 2016

Coverage Status

Coverage decreased (-0.8%) to 99.167% when pulling 0be7ad0 on test-pr22 into e805c22 on master.

@coveralls
Copy link

coveralls commented Aug 26, 2016

Coverage Status

Coverage decreased (-0.8%) to 99.167% when pulling 82a68af on test-pr22 into e805c22 on master.

@nknapp nknapp mentioned this pull request Aug 26, 2016
@coveralls
Copy link

coveralls commented Aug 26, 2016

Coverage Status

Coverage remained the same at 100.0% when pulling 3550f1d on test-pr22 into e805c22 on master.

…(createrMarkerClass-function with Promise-constructor as argument)

Include extract "lib/*"-files into
Extract utility functions to separate file.
@coveralls
Copy link

coveralls commented Aug 30, 2016

Coverage Status

Coverage decreased (-0.8%) to 99.242% when pulling a42eb5d on test-pr22 into e805c22 on master.

@coveralls
Copy link

coveralls commented Aug 30, 2016

Coverage Status

Coverage remained the same at 100.0% when pulling a42eb5d on test-pr22 into e805c22 on master.

@nknapp nknapp merged commit b9eaaa0 into master Aug 30, 2016
@nknapp nknapp deleted the test-pr22 branch September 2, 2016 13:27
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.

None yet

2 participants