有幾個標籤用於代碼語法熒光筆,例如pre
和code
。如何使它們在同一個站點兼容?如何使代碼語法熒光筆兼容?
# Use PreCode for Windows Live Writer
<pre class="brush: py; toolbar: false;">
...
</pre>
# Install the plugin SyntaxHighlighter Evolved (for WordPress), the source codes will render as:
<div id="highlighter_539499" class="syntaxhighlighter python">
...
</div>
# in markdown, insert code blocks by:
```python
...
```
# will render as:
<pre><code class="python">
...
</code></pre>
# OR
[code lang=python]
...
[/code]
PS:我安裝插件演進SyntaxHighlighter的,使用前置碼在Windows Live Writer進行離線博客和網上博客WP降價編輯。