Add Go syntax highlighting to the guides.

pull/17125/head
Péter Szilágyi 8 years ago
parent 0aeeae1b6c
commit 5bfc5356a9
No known key found for this signature in database
GPG Key ID: E9AE538CEDF8293D
  1. 1
      guide/index.html
  2. 1
      static/scripts/highlight-go.min.js

@ -21,6 +21,7 @@
<script src="../static/scripts/marked.min.js"></script>
<script src="../static/scripts/emojify.min.js"></script>
<script src="../static/scripts/highlight.min.js"></script>
<script src="../static/scripts/highlight-go.min.js"></script>
<script src="../static/scripts/highlight-java.min.js"></script>
<script src="../static/scripts/highlight-gradle.min.js"></script>
<script src="../static/scripts/highlight-swift.min.js"></script>

@ -0,0 +1 @@
hljs.registerLanguage("go",function(e){var t={keyword:"break default func interface select case map struct chan else goto package switch const fallthrough if range type continue for import return var go defer bool byte complex64 complex128 float32 float64 int8 int16 int32 int64 string uint8 uint16 uint32 uint64 int uint uintptr rune",literal:"true false iota nil",built_in:"append cap close complex copy imag len make new panic print println real recover delete"};return{aliases:["golang"],k:t,i:"</",c:[e.CLCM,e.CBCM,{cN:"string",v:[e.QSM,{b:"'",e:"[^\\\\]'"},{b:"`",e:"`"}]},{cN:"number",v:[{b:e.CNR+"[dflsi]",r:1},e.CNM]},{b:/:=/},{cN:"function",bK:"func",e:/\s*\{/,eE:!0,c:[e.TM,{cN:"params",b:/\(/,e:/\)/,k:t,i:/["']/}]}]}});
Loading…
Cancel
Save