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

fix: handle defaults correctly #92

Merged
merged 5 commits into from Dec 7, 2019
Merged

Conversation

@curbengh
Copy link
Contributor

curbengh commented Nov 22, 2019

noticed Object.assign() doesn't do deep cloning,

In the following config, the defaults level and collisionSuffix are not parsed to the plugin in current behavior.

markdown:
  anchors:
    permalink: true

This PR ensure defaults are handled correctly, so that level and collisionSuffix are retained.


also fixed an issue where duplicate titles are not handled correctly, should be Object.prototype.hasOwnProperty(), not Object.prototype.isPrototypeOf()

curbengh added 3 commits Nov 22, 2019
@curbengh curbengh requested a review from hexojs/core Nov 22, 2019
@curbengh curbengh mentioned this pull request Nov 22, 2019
curbengh added 2 commits Nov 22, 2019
@curbengh curbengh mentioned this pull request Nov 27, 2019
@curbengh curbengh requested review from hexojs/core and removed request for hexojs/core Dec 6, 2019
@SukkaW
SukkaW approved these changes Dec 6, 2019
@curbengh curbengh merged commit 46a68c6 into hexojs:master Dec 7, 2019
1 of 2 checks passed
1 of 2 checks passed
Travis CI - Pull Request Build Errored
Details
coverage/coveralls Coverage increased (+4.7%) to 93.443%
Details
@curbengh curbengh deleted the curbengh:anchors-default branch Dec 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.