浏览代码

Update syntax highlighting example

simov 7 年之前
父节点
当前提交
16aa9493e2
共有 1 个文件被更改,包括 78 次插入6 次删除
  1. 78 6
      test/syntax/highlighting.md

+ 78 - 6
test/syntax/highlighting.md

@@ -13,6 +13,12 @@ var some = new actionscript();
 ServerName apacheconf
 ```
 
+#### applescript
+
+```applescript
+display alert "Hello, world!"
+```
+
 #### aspnet
 
 ```aspnet
@@ -67,6 +73,12 @@ string some = "csharp";
 #some { content: 'css'; }
 ```
 
+#### d
+
+```d
+int mySum(int a, int b) pure nothrow
+```
+
 #### dart
 
 ```dart
@@ -87,18 +99,42 @@ var some = "dart";
 MAINTAINER docker
 ```
 
+#### elixir
+
+```elixir
+IO.puts "Hello World!"
+```
+
 #### erlang
 
 ```erlang
 module(erlang).
 ```
 
+#### flow
+
+```flow
+function foo(x: ?number): string {}
+```
+
+#### fsharp
+
+```fsharp
+let mutable x = 1
+```
+
 #### go
 
 ```go
 type go string
 ```
 
+#### graphql
+
+```graphql
+type Query {hero: Character}
+```
+
 #### haskell
 
 ```haskell
@@ -141,6 +177,12 @@ const some = 'js';
 function({"some": "jsonp"})
 ```
 
+#### latex
+
+```latex
+$\sqrt{3x-1}+(1+x)^2$
+```
+
 #### lua
 
 ```lua
@@ -159,12 +201,6 @@ check: makefile
 `some` **markdown**
 ```
 
-#### html
-
-```html
-<p>some <strong>markup</strong></p>
-```
-
 #### nginx
 
 ```nginx
@@ -177,6 +213,12 @@ server_name nginx;
 char some = "objectivec";
 ```
 
+#### ocaml
+
+```ocaml
+let sum xs = List.fold_left (fun acc x -> acc + x) 0 xs;;
+```
+
 #### perl
 
 ```perl
@@ -201,6 +243,18 @@ some('prolog', 1972)
 some = 'python'
 ```
 
+#### r
+
+```r
+x <- c(1, 2, 3, 4, 5, 6)
+```
+
+#### reason
+
+```reason
+let merge: (('a, 'a) => bool, list('a), list('a)) => list('a);
+```
+
 #### ruby
 
 ```ruby
@@ -219,6 +273,12 @@ let some = 'rust';
 @include sass;
 ```
 
+#### scala
+
+```scala
+def formatApples(x: Int) = "I ate %d apples".format(x)
+```
+
 #### scheme
 
 ```scheme
@@ -255,6 +315,18 @@ var some = "swift"
 var some: string = "typescript";
 ```
 
+#### vbnet
+
+```vbnet
+Function ReadLine(Optional prompt As String = Nothing) As String
+```
+
+#### wasm
+
+```wasm
+(import "math" "exp" (func $exp (param f64) (result f64))
+```
+
 #### xml
 
 ```xml