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): use <div> when wrap is disabled #229

Merged
merged 3 commits into from
Aug 17, 2020

Conversation

curbengh
Copy link
Contributor

@curbengh curbengh commented Aug 15, 2020

Affects users of following config:

# _config.yml
highlight:
  line_number: false
  wrap: false

# or
prismjs:
  enable: true

New rendered html:

<pre>
  <div class="caption">
    caption here
  </div>
  <code>codeblock</code>
<pre>

suggested css:

pre div.caption {
  font-size: 0.9em;
  color: #888;
}

pre div.caption a {
  float: right;
}

@coveralls
Copy link

coveralls commented Aug 15, 2020

Coverage Status

Coverage increased (+0.008%) to 97.436% when pulling 23372e0 on curbengh:wrap-caption into bf42b66 on hexojs:master.

curbengh pushed a commit to curbengh/curbengh.github.io that referenced this pull request Aug 15, 2020
@curbengh curbengh marked this pull request as ready for review August 15, 2020 13:40
lib/highlight.js Outdated Show resolved Hide resolved
@curbengh curbengh requested a review from SukkaW August 16, 2020 01:05
SukkaW
SukkaW previously approved these changes Aug 16, 2020
lib/highlight.js Outdated Show resolved Hide resolved
@curbengh curbengh merged commit a96335d into hexojs:master Aug 17, 2020
@curbengh curbengh deleted the wrap-caption branch August 17, 2020 11:55
@curbengh curbengh mentioned this pull request Aug 17, 2020
nevilm-lt pushed a commit to nevilm-lt/hexo-util that referenced this pull request Apr 22, 2022
fix(highlight): use <div> when wrap is disabled
nevilm-lt pushed a commit to nevilm-lt/hexo-util that referenced this pull request Apr 22, 2022
fix(highlight): use <div> when wrap is disabled
nevilm-lt pushed a commit to nevilm-lt/hexo-util that referenced this pull request Apr 22, 2022
fix(highlight): use <div> when wrap is disabled
nevilm-lt pushed a commit to nevilm-lt/hexo-util that referenced this pull request Apr 22, 2022
fix(highlight): use <div> when wrap is disabled
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