-
-
Notifications
You must be signed in to change notification settings - Fork 59
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
feat(prism): caption #227
feat(prism): caption #227
Conversation
prismjs just doesn't support caption. Instead of adding caption support, what about simply ignoring it? |
highlight.js doesn't support it either, but Hexo enhance the triple backtick to support it. It's currently available for hexo's highlight.js, this PR simply bring feature parity to prismjs. |
So should we use other element instead? |
My suggestion is add a <pre>
<div>
<span>caption</span>
<a href>link</a>
</div>
<code>
<!-- code -->
</code>
</pre> |
backtick_code_block.js already wraps in // just wrap in <div>?
const codeCaption = caption ? `<div>${caption}</div>` : ''; Edit: updated will update highlight.js in next PR: Line 49 in b34456a
|
2602ca6
to
874e9a4
Compare
- BREAKING CHANGE: <figcaption> is replaced with <div> when wrap is disabled - hexojs#227 (comment)
- BREAKING CHANGE: <figcaption> is replaced with <div> when wrap is disabled - hexojs#227 (comment)
feat(prism): caption
- BREAKING CHANGE: <figcaption> is replaced with <div> when wrap is disabled - hexojs#227 (comment)
feat(prism): caption
- BREAKING CHANGE: <figcaption> is replaced with <div> when wrap is disabled - hexojs#227 (comment)
feat(prism): caption
- BREAKING CHANGE: <figcaption> is replaced with <div> when wrap is disabled - hexojs#227 (comment)
feat(prism): caption
- BREAKING CHANGE: <figcaption> is replaced with <div> when wrap is disabled - hexojs#227 (comment)
Feature requested in hexojs/hexo#4460 by @jerryc127