Selaa lähdekoodia

Add diff syntax syntax highlighting to docs (#3771)

Felipe Marcos 6 vuotta sitten
vanhempi
commit
ac2aef2b34
1 muutettua tiedostoa jossa 16 lisäystä ja 0 poistoa
  1. 16
    0
      docs/index.html

+ 16
- 0
docs/index.html Näytä tiedosto

@@ -11,6 +11,21 @@
11 11
   <link rel="icon" href="_images/favicon.ico" type="image/x-icon">
12 12
   <link rel="stylesheet" href="//unpkg.com/docsify/themes/vue.css">
13 13
   <link rel="stylesheet" href="//unpkg.com/docsify-copy-code/styles.css">
14
+
15
+  <style>
16
+    /* diff syntax highlighting */
17
+    .token.inserted {
18
+      color: #42b983;
19
+      background-color: #f0fff4;
20
+      border-bottom: none;
21
+    }
22
+
23
+    .token.deleted {
24
+      color: #f66;
25
+      background-color: #ffeef0;
26
+      text-decoration: none;
27
+    }
28
+  </style>
14 29
 </head>
15 30
 
16 31
 <body>
@@ -41,6 +56,7 @@
41 56
   <script src="//unpkg.com/prismjs/components/prism-java.min.js"></script>
42 57
   <script src="//unpkg.com/prismjs/components/prism-c.min.js"></script>
43 58
   <script src="//unpkg.com/prismjs/components/prism-objectivec.min.js"></script>
59
+  <script src="//unpkg.com/prismjs/components/prism-diff.min.js"></script>
44 60
 
45 61
   <!-- this allows us to re-run docs even when offline -->
46 62
   <script>