外掛標籤
開發者團隊
原文外掛簡介
Shawn Code Highlighter brings back syntax highlighting for code that lost it: SyntaxHighlighter blocks left behind after that plugin was removed, pre blocks imported from another platform, and plain pre blocks with no language hint. It works on the rendered page only, so stored post content is never rewritten.
Code is shown in a dark palette inspired by Xcode’s default dark editor theme. This plugin is not affiliated with or endorsed by Apple.
Supported markup:
SyntaxHighlighter blocks (wp:syntaxhighlighter/code), using the language saved in the block.
pre > code with language-*, lang-* or brush:* classes.
Migrated pre.source-code blocks.
CodeMirror-exported blocks (div.cm-line per line) and pre blocks that use
for line breaks.
Plain pre blocks, using constrained language auto-detection.
Long lines wrap inside the code block instead of forcing a horizontal scrollbar.
Assets load only on single posts that contain a pre element or a SyntaxHighlighter block. There are no settings, no tracking and no external requests: all files are bundled with the plugin.
The plugin highlights code inside the post content area of block themes (.wp-block-post-content) and classic themes (.entry-content).
Third-party software
This plugin bundles Highlight.js 11.12.0, distributed under the BSD 3-Clause License (see assets/vendor/LICENSE).
Source code: https://github.com/highlightjs/highlight.js
The bundled highlight.min.js is the unmodified minified release file.
The color theme (assets/xcode-dark.css) is original to this plugin and licensed GPLv2 or later.
