Skip to content

deprecate substr method and use existing strip function in grammar#1504

Merged
nknapp merged 1 commit intohandlebars-lang:4.xfrom
liqiang372:deprecate-substr-method
Mar 14, 2019
Merged

deprecate substr method and use existing strip function in grammar#1504
nknapp merged 1 commit intohandlebars-lang:4.xfrom
liqiang372:deprecate-substr-method

Conversation

@liqiang372
Copy link
Copy Markdown
Contributor

String.prototype.substr(...) method is discouraged and should use substring when possible.

Before creating a pull-request, please check https://github.com/wycats/handlebars.js/blob/master/CONTRIBUTING.md first.

Generally we like to see pull requests that

  • Please don't start pull requests for security issues. Instead, file a report at https://www.npmjs.com/advisories/report?package=handlebars
  • Maintain the existing code style
  • Are focused on a single change (i.e. avoid large refactoring or style adjustments in untouched code if not the primary goal of the pull request)
  • Have good commit messages
  • Have tests
  • Have the typings (lib/handlebars.d.ts) updated on every API change. If you need help, updating those, please mention that in the PR description.
  • Don't significantly decrease the current code coverage (see coverage/lcov-report/index.html)
  • Currently, the 4.x-branch contains the latest version. Please target that branch in the PR.

@nknapp
Copy link
Copy Markdown
Collaborator

nknapp commented Mar 13, 2019

Thanks for this PR. The change seems reasonable. Unfortunately, I just added another commit to the 4.xx branch . Could you rebase your branch onto the current 4.x?

@liqiang372 liqiang372 force-pushed the deprecate-substr-method branch from 5705e5a to 445ae12 Compare March 13, 2019 21:25
@liqiang372
Copy link
Copy Markdown
Contributor Author

@nknapp done!

@nknapp nknapp merged commit 4108b83 into handlebars-lang:4.x Mar 14, 2019
@nknapp
Copy link
Copy Markdown
Collaborator

nknapp commented Mar 14, 2019

thanks

@nknapp
Copy link
Copy Markdown
Collaborator

nknapp commented Mar 16, 2019

Released in 4.1.1

@liqiang372 liqiang372 deleted the deprecate-substr-method branch March 17, 2019 03:11
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