GFM.md (2652B)
1 # Strikethrough 2 3 ~~This text should be parsed as _strikethroughed_.~~ 4 5 ~~There may be __bold__ or _italic_ text inside strikethroughed text.~~ 6 7 ~~There may be a keyboard shortcut like <kbd>Enter</kbd> inside strikethroughed text.~~ 8 9 __There may be ~~strikethroughed text~~ inside bold text.__ 10 _There may be ~~strikethroughed text~~ inside italic text._ 11 12 ~~ If there is a space in the beginning or end, it won't work as per the [GFM][GFM] docs ~~ 13 14 ~~Strikethrough can be applied to 15 multiple lines. Just keep in mind 16 not to put any space in the beginning or end.~~ 17 18 # Underscore In Words 19 20 The word `complicated` must be neither bold nor italic below: 21 22 perform_complicated_task 23 perform__complicated__task 24 25 But the first part below is italic and bold respectively: 26 27 _perform_complicated_task 28 __perform__complicated__task 29 30 # Keyboard Shortcuts 31 32 Keyboard shortcuts below should be highlighted: 33 34 --- 35 36 A keyboard shortcut <kbd>Enter</kbd> can be in paragraph. 37 38 * A keyboard shortcut <kbd>Enter</kbd> can be in list. 39 40 _A keyboard shortcut <kbd>Enter</kbd> can be in italic._ 41 __A keyboard shortcut <kbd>Enter</kbd> can be in bold.__ 42 43 ~~A keyboard shortcut <kbd>Enter</kbd> can be in deleted text.~~ 44 45 <p>A keyboard shortcut <kbd>Enter</kbd> can be in HTML.</p> 46 47 <div> 48 A keyboard shortcut <kbd>Enter</kbd> can be in block level tags. 49 </div> 50 51 # Fenced Code Blocks 52 53 ## In / Near List Items 54 55 Below fenced code blocks _should_ be highlighted. 56 57 --- 58 59 * List item 60 61 ```js 62 for (var i = 0; i < 10; i++) { 63 console.log(i); 64 } 65 ``` 66 67 * List item 68 69 ```js 70 for (var i = 0; i < 10; i++) { 71 console.log(i); 72 } 73 ``` 74 75 --- 76 77 Below are _not_ valid fenced code blocks according to the [GFM docs][GFM]. It says there must be a blank line before the code block. However, GitHub highlights them. So, they _should_ be highlighted. 78 79 --- 80 81 * List item 82 ```js 83 for (var i = 0; i < 10; i++) { 84 console.log(i); 85 } 86 ``` 87 88 * List item 89 ```js 90 for (var i = 0; i < 10; i++) { 91 console.log(i); 92 } 93 ``` 94 95 ## In / Near Paragraphs 96 97 Below is _not_ a _fenced_ code block, just a normal code block. 98 99 --- 100 101 Paragraph 102 103 ```js 104 for (var i = 0; i < 10; i++) { 105 console.log(i); 106 } 107 ``` 108 109 --- 110 111 Below 2 blocks are fenced code blocks. They _should_ be highlighted. 112 113 --- 114 115 Paragraph 116 117 ```js 118 for (var i = 0; i < 10; i++) { 119 console.log(i); 120 } 121 ``` 122 123 Paragraph 124 ```js 125 for (var i = 0; i < 10; i++) { 126 console.log(i); 127 } 128 ``` 129 130 --- 131 132 Below is not any type of code block. It _should not_ be highlighted. 133 134 --- 135 136 Paragraph 137 ```js 138 for (var i = 0; i < 10; i++) { 139 console.log(i); 140 } 141 ``` 142 143 [GFM]: https://help.github.com/articles/github-flavored-markdown