| 1 |
--- |
| 2 |
layout: default |
| 3 |
title: Markdown kitchen sink |
| 4 |
nav_exclude: true |
| 5 |
--- |
| 6 |
|
| 7 |
<button class="btn js-toggle-dark-mode">Preview dark color scheme</button> |
| 8 |
|
| 9 |
<script> |
| 10 |
const toggleDarkMode = document.querySelector('.js-toggle-dark-mode'); |
| 11 |
|
| 12 |
jtd.addEvent(toggleDarkMode, 'click', function(){ |
| 13 |
if (jtd.getTheme() === 'dark') { |
| 14 |
jtd.setTheme('light'); |
| 15 |
toggleDarkMode.textContent = 'Preview dark color scheme'; |
| 16 |
} else { |
| 17 |
jtd.setTheme('dark'); |
| 18 |
toggleDarkMode.textContent = 'Return to the light side'; |
| 19 |
} |
| 20 |
}); |
| 21 |
</script> |
| 22 |
|
| 23 |
Text can be **bold**, _italic_, or ~~strikethrough~~. |
| 24 |
|
| 25 |
[Link to another page](another-page). |
| 26 |
|
| 27 |
There should be whitespace between paragraphs. |
| 28 |
|
| 29 |
There should be whitespace between paragraphs. We recommend including a README, or a file with information about your project. |
| 30 |
|
| 31 |
# [](#header-1)Header 1 |
| 32 |
|
| 33 |
This is a normal paragraph following a header. GitHub is a code hosting platform for version control and collaboration. It lets you and others work together on projects from anywhere. |
| 34 |
|
| 35 |
## [](#header-2)Header 2 |
| 36 |
|
| 37 |
> This is a blockquote following a header. |
| 38 |
> |
| 39 |
> When something is important enough, you do it even if the odds are not in your favor. |
| 40 |
|
| 41 |
### [](#header-3)Header 3 |
| 42 |
|
| 43 |
```js |
| 44 |
// Javascript code with syntax highlighting. |
| 45 |
var fun = function lang(l) { |
| 46 |
dateformat.i18n = require('./lang/' + l) |
| 47 |
return true; |
| 48 |
} |
| 49 |
``` |
| 50 |
|
| 51 |
```ruby |
| 52 |
# Ruby code with syntax highlighting |
| 53 |
GitHubPages::Dependencies.gems.each do |gem, version| |
| 54 |
s.add_dependency(gem, "= #{version}") |
| 55 |
end |
| 56 |
``` |
| 57 |
|
| 58 |
#### [](#header-4)Header 4 `with code not transformed` |
| 59 |
|
| 60 |
* This is an unordered list following a header. |
| 61 |
* This is an unordered list following a header. |
| 62 |
* This is an unordered list following a header. |
| 63 |
|
| 64 |
##### [](#header-5)Header 5 |
| 65 |
|
| 66 |
1. This is an ordered list following a header. |
| 67 |
2. This is an ordered list following a header. |
| 68 |
3. This is an ordered list following a header. |
| 69 |
|
| 70 |
###### [](#header-6)Header 6 |
| 71 |
|
| 72 |
[This is a very long link which wraps and therefore doesn't overflow |
| 73 |
even when it comes at the beginning](.) of the line. |
| 74 |
|
| 75 |
- [This is a very long link which wraps and therefore doesn't overflow the line |
| 76 |
when used first in an item ](.) in a list. |
| 77 |
|
| 78 |
| head1 | head two | three | |
| 79 |
|:-------------|:------------------|:------| |
| 80 |
| ok | good swedish fish | nice | |
| 81 |
| out of stock | good and plenty | nice | |
| 82 |
| ok | good `oreos` | hmm | |
| 83 |
| ok | good `zoute` drop | yumm | |
| 84 |
|
| 85 |
### There's a horizontal rule below this. |
| 86 |
|
| 87 |
* * * |
| 88 |
|
| 89 |
### Here is an unordered list: |
| 90 |
|
| 91 |
* Item foo |
| 92 |
* Item bar |
| 93 |
* Item baz |
| 94 |
* Item zip |
| 95 |
|
| 96 |
### And an ordered list: |
| 97 |
|
| 98 |
1. Item one |
| 99 |
1. Item two |
| 100 |
1. Item three |
| 101 |
1. Item four |
| 102 |
|
| 103 |
### And an ordered list, continued: |
| 104 |
|
| 105 |
1. Item one |
| 106 |
1. Item two |
| 107 |
|
| 108 |
Some text |
| 109 |
|
| 110 |
{:style="counter-reset:none"} |
| 111 |
1. Item three |
| 112 |
1. Item four |
| 113 |
|
| 114 |
### And an ordered list starting from 42: |
| 115 |
|
| 116 |
{:style="counter-reset:step-counter 41"} |
| 117 |
1. Item 42 |
| 118 |
1. Item 43 |
| 119 |
1. Item 44 |
| 120 |
|
| 121 |
### And a nested list: |
| 122 |
|
| 123 |
- level 1 item |
| 124 |
- level 2 item |
| 125 |
- level 2 item |
| 126 |
- level 3 item |
| 127 |
- level 3 item |
| 128 |
- level 1 item |
| 129 |
- level 2 item |
| 130 |
- level 2 item |
| 131 |
- level 2 item |
| 132 |
- level 1 item |
| 133 |
- level 2 item |
| 134 |
- level 2 item |
| 135 |
- level 1 item |
| 136 |
|
| 137 |
### Nesting an ol in ul in an ol |
| 138 |
|
| 139 |
- level 1 item (ul) |
| 140 |
1. level 2 item (ol) |
| 141 |
1. level 2 item (ol) |
| 142 |
- level 3 item (ul) |
| 143 |
- level 3 item (ul) |
| 144 |
- level 1 item (ul) |
| 145 |
1. level 2 item (ol) |
| 146 |
1. level 2 item (ol) |
| 147 |
- level 3 item (ul) |
| 148 |
- level 3 item (ul) |
| 149 |
1. level 4 item (ol) |
| 150 |
1. level 4 item (ol) |
| 151 |
- level 3 item (ul) |
| 152 |
- level 3 item (ul) |
| 153 |
- level 1 item (ul) |
| 154 |
|
| 155 |
### And a task list |
| 156 |
|
| 157 |
- [ ] Hello, this is a TODO item |
| 158 |
- [ ] Hello, this is another TODO item |
| 159 |
- [x] Goodbye, this item is done |
| 160 |
|
| 161 |
### Nesting task lists |
| 162 |
|
| 163 |
- [ ] level 1 item (task) |
| 164 |
- [ ] level 2 item (task) |
| 165 |
- [ ] level 2 item (task) |
| 166 |
- [ ] level 1 item (task) |
| 167 |
- [ ] level 1 item (task) |
| 168 |
|
| 169 |
### Nesting a ul in a task list |
| 170 |
|
| 171 |
- [ ] level 1 item (task) |
| 172 |
- level 2 item (ul) |
| 173 |
- level 2 item (ul) |
| 174 |
- [ ] level 1 item (task) |
| 175 |
- [ ] level 1 item (task) |
| 176 |
|
| 177 |
### Nesting a task list in a ul |
| 178 |
|
| 179 |
- level 1 item (ul) |
| 180 |
- [ ] level 2 item (task) |
| 181 |
- [ ] level 2 item (task) |
| 182 |
- level 1 item (ul) |
| 183 |
- level 1 item (ul) |
| 184 |
|
| 185 |
### Small image |
| 186 |
|
| 187 |
 |
| 188 |
|
| 189 |
### Large image |
| 190 |
|
| 191 |
 |
| 192 |
|
| 193 |
"[Wroclaw University Library digitizing rare archival texts](https://www.flickr.com/photos/97810305@N08/9401451269)" by [j_cadmus](https://www.flickr.com/photos/97810305@N08) is marked with [CC BY 2.0](https://creativecommons.org/licenses/by/2.0/?ref=openverse). |
| 194 |
|
| 195 |
### Labels |
| 196 |
|
| 197 |
I'm a label |
| 198 |
{: .label } |
| 199 |
|
| 200 |
blue |
| 201 |
{: .label .label-blue } |
| 202 |
green |
| 203 |
{: .label .label-green } |
| 204 |
purple |
| 205 |
{: .label .label-purple } |
| 206 |
yellow |
| 207 |
{: .label .label-yellow } |
| 208 |
red |
| 209 |
{: .label .label-red } |
| 210 |
|
| 211 |
**bold** |
| 212 |
{: .label } |
| 213 |
*italic* |
| 214 |
{: .label } |
| 215 |
***bold + italic*** |
| 216 |
{: .label } |
| 217 |
|
| 218 |
### Definition lists can be used with HTML syntax. |
| 219 |
|
| 220 |
<dl> |
| 221 |
<dt>Name</dt> |
| 222 |
<dd>Godzilla</dd> |
| 223 |
<dt>Born</dt> |
| 224 |
<dd>1952</dd> |
| 225 |
<dt>Birthplace</dt> |
| 226 |
<dd>Japan</dd> |
| 227 |
<dt>Color</dt> |
| 228 |
<dd>Green</dd> |
| 229 |
</dl> |
| 230 |
|
| 231 |
#### Multiple description terms and values |
| 232 |
|
| 233 |
Term |
| 234 |
: Brief description of Term |
| 235 |
|
| 236 |
Longer Term |
| 237 |
: Longer description of Term, |
| 238 |
possibly more than one line |
| 239 |
|
| 240 |
Term |
| 241 |
: First description of Term, |
| 242 |
possibly more than one line |
| 243 |
|
| 244 |
: Second description of Term, |
| 245 |
possibly more than one line |
| 246 |
|
| 247 |
Term1 |
| 248 |
Term2 |
| 249 |
: Single description of Term1 and Term2, |
| 250 |
possibly more than one line |
| 251 |
|
| 252 |
Term1 |
| 253 |
Term2 |
| 254 |
: First description of Term1 and Term2, |
| 255 |
possibly more than one line |
| 256 |
|
| 257 |
: Second description of Term1 and Term2, |
| 258 |
possibly more than one line |
| 259 |
|
| 260 |
### More code |
| 261 |
|
| 262 |
```python{% raw %} |
| 263 |
def dump_args(func): |
| 264 |
"This decorator dumps out the arguments passed to a function before calling it" |
| 265 |
argnames = func.func_code.co_varnames[:func.func_code.co_argcount] |
| 266 |
fname = func.func_name |
| 267 |
def echo_func(*args,**kwargs): |
| 268 |
print fname, ":", ', '.join( |
| 269 |
'%s=%r' % entry |
| 270 |
for entry in zip(argnames,args) + kwargs.items()) |
| 271 |
return func(*args, **kwargs) |
| 272 |
return echo_func |
| 273 |
|
| 274 |
@dump_args |
| 275 |
def f1(a,b,c): |
| 276 |
print a + b + c |
| 277 |
|
| 278 |
f1(1, 2, 3) |
| 279 |
|
| 280 |
def precondition(precondition, use_conditions=DEFAULT_ON): |
| 281 |
return conditions(precondition, None, use_conditions) |
| 282 |
|
| 283 |
def postcondition(postcondition, use_conditions=DEFAULT_ON): |
| 284 |
return conditions(None, postcondition, use_conditions) |
| 285 |
|
| 286 |
class conditions(object): |
| 287 |
__slots__ = ('__precondition', '__postcondition') |
| 288 |
|
| 289 |
def __init__(self, pre, post, use_conditions=DEFAULT_ON): |
| 290 |
if not use_conditions: |
| 291 |
pre, post = None, None |
| 292 |
|
| 293 |
self.__precondition = pre |
| 294 |
self.__postcondition = post |
| 295 |
{% endraw %}``` |
| 296 |
|
| 297 |
``` |
| 298 |
Long, single-line code blocks should not wrap. They should horizontally scroll if they are too long. This line should be long enough to demonstrate this. |
| 299 |
``` |
| 300 |
|
| 301 |
### Mermaid Diagrams |
| 302 |
|
| 303 |
The following code is displayed as a diagram only when a `mermaid` key supplied in `_config.yml`. |
| 304 |
|
| 305 |
```mermaid |
| 306 |
graph TD; |
| 307 |
A-->B; |
| 308 |
A-->C; |
| 309 |
B-->D; |
| 310 |
C-->D; |
| 311 |
``` |
| 312 |
|
| 313 |
|
| 314 |
``` |
| 315 |
The final element. |
| 316 |
``` |