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

Configs are now expanded for hexo-util/highlight to make it easier to… #2901

Merged
merged 2 commits into from
Jan 7, 2018

Conversation

alxbl
Copy link
Contributor

@alxbl alxbl commented Dec 11, 2017

This is part of the code necessary to address #2145.

It simply expands config.highlight inside of the options object that is passed to hexo-util/highlight.

I went this route to make sure that the plugin remains backward compatible for themes and people who have already styled based on the current highlight engine.

This is a quick proof of concept, and if everything is fine, I will update the documentation accordingly.

The other part of the PR will be in @hexojs/hexo-util

The matching PR to support the added highlight.hljs setting is located at hexo-util/#30

  • Add test cases for the changes.
  • Passed the CI test.

@alxbl
Copy link
Contributor Author

alxbl commented Dec 11, 2017

Ah, I just realized why ...config wasn't being used... I hadn't noticed that node 6 support was required. In that case I can adjust the code to only extract the new setting into options or I can use Object.merge.

Let me know what course of action is best.

@coveralls
Copy link

coveralls commented Dec 11, 2017

Coverage Status

Coverage decreased (-0.05%) to 97.176% when pulling 903e7df on alxbl:support-hljs into dee3b03 on hexojs:master.

@coveralls
Copy link

coveralls commented Dec 11, 2017

Coverage Status

Coverage remained the same at 97.226% when pulling fa57d97 on alxbl:support-hljs into dee3b03 on hexojs:master.

Copy link
Member

@NoahDragon NoahDragon left a comment

Choose a reason for hiding this comment

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

LGTM. Note for npm publishing, make sure this change deployed with hexojs/hexo-util#30 .

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

Successfully merging this pull request may close these issues.

4 participants