代码高亮

样式


<?php echo '<p>Hello World</p>'; ?>

在需要高亮的代码前后分别加上<pre><code class="language-语言"></code></pre>
标签必须闭合
写法如下:tm-code.png


例如

<pre><code class="language-kotlin">代码块 </code></pre>
<pre><code class="language-jsx">代码块 </code></pre>
<pre><code class="language-tsx">代码块 </code></pre>
...

目前支持

markup css clike javascript abap abnf actionscript ada apacheconf apl applescript c arff asciidoc asm6502 csharp autohotkey autoit bash basic batch bison bnf brainfuck bro cpp aspnet arduino cil coffeescript cmake clojure ruby csp css-extras d dart diff markup-templating docker ebnf eiffel ejs elixir elm erb erlang fsharp flow fortran gcode gedcom gherkin git glsl gml go graphql groovy less handlebars haskell haxe hcl http hpkp hsts ichigojam icon inform7 ini io j java scala php javastacktrace jolie jq javadoclike n4js json jsonp json5 julia keyman kotlin latex markdown liquid lisp livescript lolcode lua makefile crystal django matlab mel mizar monkey n1ql typescript nand2tetris-hdl nasm nginx nim nix nsis objectivec ocaml opencl oz parigp parser pascal pascaligo pcaxis perl jsdoc phpdoc php-extras sql powershell processing prolog properties protobuf scss puppet pure python q qore r js-extras jsx renpy reason vala rest rip roboconf textile rust sas sass stylus javadoc scheme shell-session smalltalk smarty plsql soy twig swift yaml tcl haml toml tt2 pug tsx t4-templating visual-basic t4-cs regex vbnet velocity verilog vhdl vim t4-vb wasm wiki xeora xojo xquery tap

既然来了,那就试着讨论一下吧~,现在还没有评论噢

发表评论