all repos — NoPaste @ 3e3c433f026c49e04d0efa0f0f39fc688ed32bb1

Resurrected - The PussTheCat.org fork of NoPaste

scripts/CodeMirror/mode/gfm/index.html (view raw)

  1<!doctype html>
  2
  3<title>CodeMirror: GFM mode</title>
  4<meta charset="utf-8"/>
  5<link rel=stylesheet href="../../doc/docs.css">
  6
  7<link rel="stylesheet" href="../../lib/codemirror.css">
  8<script src="../../lib/codemirror.js"></script>
  9<script src="../../addon/mode/overlay.js"></script>
 10<script src="../xml/xml.js"></script>
 11<script src="../markdown/markdown.js"></script>
 12<script src="gfm.js"></script>
 13<script src="../javascript/javascript.js"></script>
 14<script src="../css/css.js"></script>
 15<script src="../htmlmixed/htmlmixed.js"></script>
 16<script src="../clike/clike.js"></script>
 17<script src="../meta.js"></script>
 18<style>
 19  .CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}
 20  .cm-s-default .cm-emoji {color: #009688;}
 21</style>
 22<div id=nav>
 23  <a href="https://codemirror.net"><h1>CodeMirror</h1><img id=logo src="../../doc/logo.png" alt=""></a>
 24
 25  <ul>
 26    <li><a href="../../index.html">Home</a>
 27    <li><a href="../../doc/manual.html">Manual</a>
 28    <li><a href="https://github.com/codemirror/codemirror">Code</a>
 29  </ul>
 30  <ul>
 31    <li><a href="../index.html">Language modes</a>
 32    <li><a class=active href="#">GFM</a>
 33  </ul>
 34</div>
 35
 36<article>
 37<h2>GFM mode</h2>
 38<form><textarea id="code" name="code">
 39GitHub Flavored Markdown
 40========================
 41
 42Everything from markdown plus GFM features:
 43
 44## URL autolinking
 45
 46Underscores_are_allowed_between_words.
 47
 48## Strikethrough text
 49
 50GFM adds syntax to strikethrough text, which is missing from standard Markdown.
 51
 52~~Mistaken text.~~
 53~~**works with other formatting**~~
 54
 55~~spans across
 56lines~~
 57
 58## Fenced code blocks (and syntax highlighting)
 59
 60```javascript
 61for (var i = 0; i &lt; items.length; i++) {
 62    console.log(items[i], i); // log them
 63}
 64```
 65
 66## Task Lists
 67
 68- [ ] Incomplete task list item
 69- [x] **Completed** task list item
 70
 71## A bit of GitHub spice
 72
 73See http://github.github.com/github-flavored-markdown/.
 74
 75(Set `gitHubSpice: false` in mode options to disable):
 76
 77* SHA: be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2
 78* User@SHA ref: mojombo@be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2
 79* User/Project@SHA: mojombo/god@be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2
 80* \#Num: #1
 81* User/#Num: mojombo#1
 82* User/Project#Num: mojombo/god#1
 83
 84(Set `emoji: false` in mode options to disable):
 85
 86* emoji: :smile:
 87
 88
 89</textarea></form>
 90
 91    <script>
 92      var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
 93        mode: {
 94          name: "gfm",
 95          tokenTypeOverrides: {
 96            emoji: "emoji"
 97          }
 98        },
 99        lineNumbers: true,
100        theme: "default"
101      });
102    </script>
103
104    <p>Optionally depends on other modes for properly highlighted code blocks.</p>
105
106    <p>Gfm mode supports these options (apart those from base Markdown mode):</p>
107    <ul>
108      <li>
109        <d1>
110          <dt><code>gitHubSpice: boolean</code></dt>
111          <dd>Hashes, issues... (default: <code>true</code>).</dd>
112        </d1>
113      </li>
114      <li>
115        <d1>
116          <dt><code>taskLists: boolean</code></dt>
117          <dd><code>- [ ]</code> syntax (default: <code>true</code>).</dd>
118        </d1>
119      </li>
120      <li>
121        <d1>
122          <dt><code>strikethrough: boolean</code></dt>
123          <dd><code>~~foo~~</code> syntax (default: <code>true</code>).</dd>
124        </d1>
125      </li>
126      <li>
127        <d1>
128          <dt><code>emoji: boolean</code></dt>
129          <dd><code>:emoji:</code> syntax (default: <code>true</code>).</dd>
130        </d1>
131      </li>
132    </ul>
133
134    <p><strong>Parsing/Highlighting Tests:</strong> <a href="../../test/index.html#gfm_*">normal</a>,  <a href="../../test/index.html#verbose,gfm_*">verbose</a>.</p>
135
136  </article>