index.html 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. <!doctype html>
  2. <title>CodeMirror: GFM mode</title>
  3. <meta charset="utf-8"/>
  4. <link rel=stylesheet href="../../doc/docs.css">
  5. <link rel="stylesheet" href="../../lib/codemirror.css">
  6. <script src="../../lib/codemirror.js"></script>
  7. <script src="../../lib/overlay.js"></script>
  8. <script src="../../addon/mode/overlay.js"></script>
  9. <script src="../xml/xml.js"></script>
  10. <script src="../markdown/markdown.js"></script>
  11. <script src="gfm.js"></script>
  12. <script src="../javascript/javascript.js"></script>
  13. <script src="../css/css.js"></script>
  14. <script src="../htmlmixed/htmlmixed.js"></script>
  15. <script src="../clike/clike.js"></script>
  16. <script src="../meta.js"></script>
  17. <style type="text/css">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>
  18. <div id=nav>
  19. <a href="http://codemirror.net"><h1>CodeMirror</h1><img id=logo src="../../doc/logo.png"></a>
  20. <ul>
  21. <li><a href="../../index.html">Home</a>
  22. <li><a href="../../doc/manual.html">Manual</a>
  23. <li><a href="https://github.com/codemirror/codemirror">Code</a>
  24. </ul>
  25. <ul>
  26. <li><a href="../index.html">Language modes</a>
  27. <li><a class=active href="#">GFM</a>
  28. </ul>
  29. </div>
  30. <article>
  31. <h2>GFM mode</h2>
  32. <form><textarea id="code" name="code">
  33. GitHub Flavored Markdown
  34. ========================
  35. Everything from markdown plus GFM features:
  36. ## URL autolinking
  37. Underscores_are_allowed_between_words.
  38. ## Strikethrough text
  39. GFM adds syntax to strikethrough text, which is missing from standard Markdown.
  40. ~~Mistaken text.~~
  41. ~~**works with other fomatting**~~
  42. ~~spans across
  43. lines~~
  44. ## Fenced code blocks (and syntax highlighting)
  45. ```javascript
  46. for (var i = 0; i &lt; items.length; i++) {
  47. console.log(items[i], i); // log them
  48. }
  49. ```
  50. ## Task Lists
  51. - [ ] Incomplete task list item
  52. - [x] **Completed** task list item
  53. ## A bit of GitHub spice
  54. * SHA: be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2
  55. * User@SHA ref: mojombo@be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2
  56. * User/Project@SHA: mojombo/god@be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2
  57. * \#Num: #1
  58. * User/#Num: mojombo#1
  59. * User/Project#Num: mojombo/god#1
  60. See http://github.github.com/github-flavored-markdown/.
  61. </textarea></form>
  62. <script>
  63. var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
  64. mode: 'gfm',
  65. lineNumbers: true,
  66. theme: "default"
  67. });
  68. </script>
  69. <p>Optionally depends on other modes for properly highlighted code blocks.</p>
  70. <p><strong>Parsing/Highlighting Tests:</strong> <a href="../../test/index.html#gfm_*">normal</a>, <a href="../../test/index.html#verbose,gfm_*">verbose</a>.</p>
  71. </article>