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

Conversation

curbengh
Copy link
Contributor

@curbengh 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 a team November 19, 2019 04:30
@coveralls
Copy link

Coverage Status

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

@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 a team and removed request for a team November 24, 2019 01:25
@curbengh curbengh mentioned this pull request Nov 24, 2019
@curbengh curbengh merged commit a9abee6 into hexojs:master Dec 6, 2019
@curbengh curbengh deleted the hljs-wrap branch December 6, 2019 04:57
@SukkaW SukkaW mentioned this pull request Dec 12, 2019
1 task
curbengh pushed a commit to curbengh/curbengh.github.io that referenced this pull request Apr 15, 2020
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