Navigation Menu

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

refactor: replace deprecated String.prototype.substr() #3590

Merged
merged 2 commits into from Aug 29, 2022
Merged

refactor: replace deprecated String.prototype.substr() #3590

merged 2 commits into from Aug 29, 2022

Conversation

CommanderRoot
Copy link
Contributor

String.prototype.substr() is deprecated so we replace it with String.prototype.slice() which works similarily but isn't deprecated.
.substr() probably isn't going away anytime soon but the change is trivial so it doesn't hurt to do it.

What is the previous behavior before this PR?

Same as new

What is the new behavior after this PR?

Same as before, just without a deprecated function

.substr() is deprecated so we replace it with .slice() which works similarily but isn't deprecated

Signed-off-by: Tobias Speicher <rootcommander@gmail.com>
Copy link
Member

@ylemkimon ylemkimon left a comment

Choose a reason for hiding this comment

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

Thank you for the PR!

@ylemkimon ylemkimon enabled auto-merge (squash) August 29, 2022 21:15
@codecov
Copy link

codecov bot commented Aug 29, 2022

Codecov Report

Merging #3590 (74937ba) into main (48b15e4) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #3590   +/-   ##
=======================================
  Coverage   92.98%   92.98%           
=======================================
  Files          90       90           
  Lines        6739     6739           
  Branches     1568     1568           
=======================================
  Hits         6266     6266           
  Misses        435      435           
  Partials       38       38           
Impacted Files Coverage Δ
src/functions/mclass.js 96.61% <ø> (ø)
src/Parser.js 96.14% <100.00%> (ø)
src/buildCommon.js 96.91% <100.00%> (ø)
src/buildMathML.js 97.67% <100.00%> (ø)
src/environments/array.js 98.03% <100.00%> (ø)
src/functions/enclose.js 98.47% <100.00%> (ø)
src/functions/op.js 98.97% <100.00%> (ø)
src/macros.js 97.50% <100.00%> (ø)
src/stretchy.js 87.87% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 48b15e4...74937ba. Read the comment docs.

@ylemkimon ylemkimon merged commit 299584d into KaTeX:main Aug 29, 2022
@KaTeX-bot
Copy link
Member

🎉 This PR is included in version 0.16.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants