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 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 curbengh requested a review from a team November 22, 2019 11:45
@curbengh curbengh mentioned this pull request Nov 22, 2019
@curbengh curbengh mentioned this pull request Nov 27, 2019
@curbengh curbengh requested review from a team and removed request for a team December 6, 2019 02:42
@curbengh curbengh merged commit 46a68c6 into hexojs:master Dec 7, 2019
@curbengh curbengh deleted the anchors-default branch December 7, 2019 00:39
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