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(highlight): decouple 'wrap' and 'hljs' #138

Merged
merged 1 commit into from Dec 6, 2019
Merged

Conversation

@curbengh
Copy link
Contributor

curbengh commented Nov 19, 2019

Currently, enabling hljs always disable wrap, but I noticed that it is actually not necessary. I tested hljs: true + wrap: true with darcula theme, code highlighting works fine.

Noticed while testing hexojs/hexo#3865


line_number: true # or gutter: true
hljs: true
wrap: false

Since enabling line_number will also enable wrap, this behavior doesn't change.


line_number: false
hljs: true
wrap: true

With this PR, it is possible to enable both hljs and wrap, so user can use hljs-* prefix in css classes while wrapping the codeblock in <table>. This can make upgrading the hljs syntax slightly easier.

@curbengh curbengh requested a review from hexojs/core Nov 19, 2019
@coveralls

This comment has been minimized.

Copy link

coveralls commented Nov 19, 2019

Coverage Status

Coverage decreased (-0.008%) to 95.246% when pulling ef769c2 on curbengh:hljs-wrap into ad3541e on hexojs:master.

@curbengh curbengh mentioned this pull request Nov 19, 2019
2 of 2 tasks complete
@curbengh curbengh changed the title fix(highlight): no need to disable 'wrap' when 'hljs' is enabled fix(highlight): decouple 'wrap' and 'hljs' Nov 20, 2019
@curbengh curbengh requested review from hexojs/core and removed request for hexojs/core Nov 24, 2019
@curbengh curbengh mentioned this pull request Nov 24, 2019
@SukkaW
SukkaW approved these changes Dec 3, 2019
@curbengh curbengh merged commit a9abee6 into hexojs:master Dec 6, 2019
2 of 3 checks passed
2 of 3 checks passed
coverage/coveralls Coverage decreased (-0.008%) to 95.246%
Details
Travis CI - Pull Request Build Passed
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
@curbengh curbengh deleted the curbengh:hljs-wrap branch Dec 6, 2019
@SukkaW SukkaW mentioned this pull request Dec 12, 2019
1 of 1 task complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.