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

simplify xpath functions #353

Merged
merged 1 commit into from
Nov 6, 2020
Merged

Conversation

leastbad
Copy link
Contributor

@leastbad leastbad commented Nov 6, 2020

Type of PR (feature, enhancement, bug fix, etc.)

Enhancement

Description

Inspired by @julianrubisch I realized that the xPath encoding process was visually confusing and could be better abstracted, so I moved some of the logic to a new function in utils.js.

I also took the opportunity to improve the xPath string generation function with string interpolation.

Why should this be added

Increase readability and maintainability of source

Checklist

  • My code follows the style guidelines of this project
  • Checks (StandardRB & Prettier-Standard) are passing
  • This is not a documentation update

@leastbad leastbad merged commit aa14bd9 into stimulusreflex:master Nov 6, 2020
@leastbad leastbad deleted the compute_xpath branch November 6, 2020 16:02
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.

1 participant