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