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

improved getAndRemoveConfig util function #1603

Closed
wants to merge 3 commits into from
Closed

improved getAndRemoveConfig util function #1603

wants to merge 3 commits into from

Conversation

luwol03
Copy link
Contributor

@luwol03 luwol03 commented Jun 28, 2021

Summary

Improved the getAndRemoveConfig until function to only parse a config if there is a colon on start.
I pushed this commit before I realized that my previous PR is already merged.

What kind of change does this PR introduce?

  • Refactor
  • Bug

For any code change,

  • Related documentation has been updated if needed
  • Related tests have been updated or tests have been added

Does this PR introduce a breaking change? (check one)

  • Yes (maybe)
  • No

If yes, please describe the impact and migration path for existing applications:

Related issue, if any:

#1597
#1598

Tested in the following browsers:

  • Chrome
  • Firefox
  • Safari
  • Edge
  • IE

@vercel
Copy link

vercel bot commented Jun 28, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/docsify-core/docsify-preview/6tRYwHFmrfvrJ3WaBw3bWvvD3NW9
✅ Preview: https://docsify-preview-git-fork-luwol03-issue-1597-118886-docsify-core.vercel.app

@codesandbox-ci
Copy link

codesandbox-ci bot commented Jun 28, 2021

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 28aa079:

Sandbox Source
docsify-template Configuration

@luwol03
Copy link
Contributor Author

luwol03 commented Jun 28, 2021

Thank you, Sorry, my branch was not updated to the latest commit, because I’m not at home. - Can’t rebase my branch.

sy-records
sy-records previously approved these changes Jul 4, 2021
Copy link
Member

@sy-records sy-records left a comment

Choose a reason for hiding this comment

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

Good patch, Thanks

.replace(/^('|")/, '')
.replace(/('|")$/, '')
.replace(/^"(:.*)"$/, '$1')
.replace(/^'(:.*)'$/, '$1')
Copy link
Member

Choose a reason for hiding this comment

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

It would be nice to have the matching-quotes addition without the : change. A separate PR for the : could be saved for v5 (breaking change).

@luwol03
Copy link
Contributor Author

luwol03 commented Aug 26, 2021

what should happen to this pr?

This pull request was closed.
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.

3 participants