├── .editorconfig ├── .gitattributes ├── .gitignore ├── .npmrc ├── .stylelintrc.js ├── bg.jpg ├── codeImg.png ├── demo.png ├── editor.png ├── examples ├── fork-me-right-graphite@2x.png └── index.html ├── github-markdown.css ├── index.html ├── license ├── package.json ├── readme.md └── yarn-error.log /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = tab 5 | end_of_line = lf 6 | charset = utf-8 7 | trim_trailing_whitespace = true 8 | insert_final_newline = true 9 | 10 | [*.yml] 11 | indent_style = space 12 | indent_size = 2 13 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto eol=lf 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /dist 4 | 5 | # local env files 6 | .env.local 7 | .env.*.local 8 | 9 | # Log files 10 | npm-debug.log* 11 | yarn-debug.log* 12 | yarn-error.log* 13 | 14 | # Editor directories and files 15 | .idea 16 | .vscode 17 | *.suo 18 | *.ntvs* 19 | *.njsproj 20 | *.sln 21 | *.sw? 22 | -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | package-lock=false 2 | -------------------------------------------------------------------------------- /.stylelintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | extends: ['stylelint-config-standard','stylelint-config-rational-order'], 3 | rules: { 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nihaojob/markdown-css-smartisan/7dfacdd8548d14382e177b1fb99dc648e54614c3/bg.jpg -------------------------------------------------------------------------------- /codeImg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nihaojob/markdown-css-smartisan/7dfacdd8548d14382e177b1fb99dc648e54614c3/codeImg.png -------------------------------------------------------------------------------- /demo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nihaojob/markdown-css-smartisan/7dfacdd8548d14382e177b1fb99dc648e54614c3/demo.png -------------------------------------------------------------------------------- /editor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nihaojob/markdown-css-smartisan/7dfacdd8548d14382e177b1fb99dc648e54614c3/editor.png -------------------------------------------------------------------------------- /examples/fork-me-right-graphite@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nihaojob/markdown-css-smartisan/7dfacdd8548d14382e177b1fb99dc648e54614c3/examples/fork-me-right-graphite@2x.png -------------------------------------------------------------------------------- /examples/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Smartisan Markdown Editor 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 125 | 126 | 127 |
128 | 129 | 130 | 131 | 132 |
133 | 134 | 135 | 136 |
137 |
138 | 139 |
140 |
141 |
142 |
143 | 146 |
147 |
148 |
149 |
150 |
151 | 270 | Fork me on GitHub 271 | 272 | 273 | -------------------------------------------------------------------------------- /github-markdown.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding-bottom: 115px; 3 | color: rgb(67, 67, 67); 4 | font-size: 24px; 5 | font-family: "PingFang SC", "Helvetica Neue", Helvetica, Arial, "Hiragino Sans GB", "Microsoft Yahei", 微软雅黑, STHeiti, 华文细黑, sans-serif, "Apple Color Emoji"; 6 | line-height: 45px; 7 | background: #f0dab3 url(./bg.jpg); 8 | border-radius: 4px; 9 | } 10 | 11 | .markdown-body { 12 | position: relative; 13 | padding: 100px 62px 150px 62px; 14 | color: #645647; 15 | font-size: 16px; 16 | font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji; 17 | line-height: 1.5; 18 | word-wrap: break-word; 19 | background: #fffcf6; 20 | border-top: 1px solid #fffcf6; 21 | border-radius: 4px; 22 | box-shadow: 0 3px 8px rgb(69 18 10 / 40%); 23 | -ms-text-size-adjust: 100%; 24 | -webkit-text-size-adjust: 100%; 25 | } 26 | 27 | .markdown-body p { 28 | margin-top: 0; 29 | margin-bottom: 10px; 30 | font-size: 24px; 31 | line-height: 45px; 32 | } 33 | 34 | .markdown-body .octicon { 35 | display: inline-block; 36 | vertical-align: text-bottom; 37 | fill: currentColor; 38 | } 39 | 40 | .markdown-body .anchor { 41 | float: left; 42 | margin-left: -20px; 43 | padding-right: 4px; 44 | line-height: 1; 45 | } 46 | 47 | .markdown-body .anchor:focus { 48 | outline: none; 49 | } 50 | 51 | .markdown-body details { 52 | display: block; 53 | } 54 | 55 | .markdown-body summary { 56 | display: list-item; 57 | } 58 | 59 | .markdown-body a { 60 | color: #0366d6; 61 | text-decoration: none; 62 | background-color: initial; 63 | } 64 | 65 | .markdown-body a:active, 66 | .markdown-body a:hover { 67 | outline-width: 0; 68 | } 69 | 70 | .markdown-body strong { 71 | font-weight: inherit; 72 | font-weight: bolder; 73 | font-weight: 600; 74 | } 75 | 76 | .markdown-body img { 77 | position: relative; 78 | box-sizing: border-box; 79 | max-width: 100%; 80 | margin-top: 20px; 81 | padding: 9px; 82 | background: #fff; 83 | border: 1px #ebdfd5 solid; 84 | } 85 | 86 | .markdown-body code, 87 | .markdown-body kbd, 88 | .markdown-body pre { 89 | font-size: 1em; 90 | font-family: monospace; 91 | } 92 | 93 | .markdown-body hr { 94 | box-sizing: initial; 95 | height: 3px; 96 | margin: 2em 0; 97 | padding: 0; 98 | overflow: hidden; 99 | background: transparent; 100 | background-color: #ebdfd5; 101 | border: 0; 102 | } 103 | 104 | .markdown-body input { 105 | margin: 0; 106 | overflow: visible; 107 | font: inherit; 108 | font-size: inherit; 109 | font-family: inherit; 110 | line-height: inherit; 111 | } 112 | 113 | .markdown-body [type=checkbox] { 114 | box-sizing: border-box; 115 | padding: 0; 116 | } 117 | 118 | .markdown-body * { 119 | box-sizing: border-box; 120 | } 121 | 122 | .markdown-body a:hover { 123 | text-decoration: underline; 124 | } 125 | 126 | .markdown-body hr::after, 127 | .markdown-body hr::before { 128 | display: table; 129 | content: ""; 130 | } 131 | 132 | .markdown-body hr::after { 133 | clear: both; 134 | } 135 | 136 | .markdown-body table { 137 | display: block; 138 | width: 100%; 139 | overflow: auto; 140 | border-collapse: collapse; 141 | border-spacing: 0; 142 | } 143 | 144 | .markdown-body td, 145 | .markdown-body th { 146 | padding: 0; 147 | } 148 | 149 | .markdown-body details summary { 150 | cursor: pointer; 151 | } 152 | 153 | .markdown-body kbd { 154 | display: inline-block; 155 | padding: 3px 5px; 156 | font: 11px SFMono-Regular, Consolas, Liberation Mono, Menlo, monospace; 157 | line-height: 10px; 158 | vertical-align: middle; 159 | background-color: #fafbfc; 160 | border: 1px solid #d1d5da; 161 | border-radius: 3px; 162 | box-shadow: inset 0 -1px 0 #d1d5da; 163 | } 164 | 165 | /* --------------标题 Start------------- */ 166 | 167 | .markdown-body h1 .octicon-link, 168 | .markdown-body h2 .octicon-link, 169 | .markdown-body h3 .octicon-link, 170 | .markdown-body h4 .octicon-link, 171 | .markdown-body h5 .octicon-link, 172 | .markdown-body h6 .octicon-link { 173 | color: #1b1f23; 174 | vertical-align: middle; 175 | visibility: hidden; 176 | } 177 | 178 | .markdown-body h1:hover .anchor, 179 | .markdown-body h2:hover .anchor, 180 | .markdown-body h3:hover .anchor, 181 | .markdown-body h4:hover .anchor, 182 | .markdown-body h5:hover .anchor, 183 | .markdown-body h6:hover .anchor { 184 | text-decoration: none; 185 | } 186 | 187 | .markdown-body h1:hover .anchor .octicon-link, 188 | .markdown-body h2:hover .anchor .octicon-link, 189 | .markdown-body h3:hover .anchor .octicon-link, 190 | .markdown-body h4:hover .anchor .octicon-link, 191 | .markdown-body h5:hover .anchor .octicon-link, 192 | .markdown-body h6:hover .anchor .octicon-link { 193 | visibility: visible; 194 | } 195 | 196 | .markdown-body h1:hover .anchor .octicon-link::before, 197 | .markdown-body h2:hover .anchor .octicon-link::before, 198 | .markdown-body h3:hover .anchor .octicon-link::before, 199 | .markdown-body h4:hover .anchor .octicon-link::before, 200 | .markdown-body h5:hover .anchor .octicon-link::before, 201 | .markdown-body h6:hover .anchor .octicon-link::before { 202 | display: inline-block; 203 | width: 16px; 204 | height: 16px; 205 | background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' version='1.1' width='16' height='16' aria-hidden='true'%3E%3Cpath fill-rule='evenodd' d='M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z'%3E%3C/path%3E%3C/svg%3E"); 206 | content: ' '; 207 | } 208 | 209 | .markdown-body h1, 210 | .markdown-body h2, 211 | .markdown-body h3, 212 | .markdown-body h4, 213 | .markdown-body h5, 214 | .markdown-body h6 { 215 | margin-top: 24px; 216 | margin-bottom: 16px; 217 | color: #645647; 218 | font-weight: 600; 219 | line-height: 1em; 220 | } 221 | 222 | .markdown-body h1, 223 | .markdown-body h2 { 224 | padding-bottom: 0.3em; 225 | font-weight: 600; 226 | border-bottom: 1px solid #fff6f6; 227 | } 228 | 229 | .markdown-body h1 { 230 | margin: 0.67em 0; 231 | margin-bottom: 1em; 232 | font-size: 2.8em; 233 | border: none; 234 | } 235 | 236 | .markdown-body h2 { 237 | font-size: 1.8em; 238 | line-height: 2em; 239 | } 240 | 241 | .markdown-body h3 { 242 | font-size: 1.25em; 243 | } 244 | 245 | .markdown-body h3, 246 | .markdown-body h4 { 247 | font-weight: 600; 248 | } 249 | 250 | .markdown-body h4 { 251 | font-size: 1em; 252 | } 253 | 254 | .markdown-body h5 { 255 | font-size: 0.875em; 256 | } 257 | 258 | .markdown-body h5, 259 | .markdown-body h6 { 260 | font-weight: 600; 261 | } 262 | 263 | .markdown-body h6 { 264 | font-size: 0.85em; 265 | } 266 | 267 | /* --------------标题 end------------- */ 268 | 269 | .markdown-body blockquote { 270 | position: relative; 271 | min-height: 40px; 272 | margin: 0; 273 | margin-bottom: 20px; 274 | padding-left: 30px; 275 | color: #b4a08e; 276 | font-size: 23px; 277 | line-height: 40px; 278 | word-break: break-all; 279 | background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA4hpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTMyIDc5LjE1OTI4NCwgMjAxNi8wNC8xOS0xMzoxMzo0MCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDo4MTE5MThmNC1lYjM0LTRmMTAtOThlMS0wNGU5NTczZTVkOGQiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MTk1NTJCQzE4NTRGMTFFNkJCNjdCRTNENzMyQzJFNTkiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MTk1NTJCQzA4NTRGMTFFNkJCNjdCRTNENzMyQzJFNTkiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTUuNSAoTWFjaW50b3NoKSI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjQzMTkyM2NmLTYyZWEtNDAwNS1iNDg2LTdhYjllNDQ0MjM5OSIgc3RSZWY6ZG9jdW1lbnRJRD0iYWRvYmU6ZG9jaWQ6cGhvdG9zaG9wOjkzOTdhMDhkLWE2NjUtMTE3OS1hZWYxLWE1MjY4MTQ3ZGEyNyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PkOrP8kAAADUSURBVHjaYiwJ02CgJmCiUB4dsLDgMEQYirmA+BwBQ5iBWAyIhYCYA91AXiBWAGI2Il0kAMRyQMwKdyKSpBDUMEYiDQO5ShZXGHGTaBgvNsOQXYjNsF9A/AKLHkaoenTwE6QeZKAgKDDRJD8D8V0g/otFoxCWMP4IxPeA+B8T1EBk8Bcq+ReHd4XQ+H+A+D7IMFgY8qApeA9VhAtwYVH/FzlS0JPOFwIJHa96FiyR8Q+aWJGDADlCGPCpx5ZTlND4ZwkkIWVK8irFhcOogcPBQIAAAwA1ph0Za5PfQwAAAABJRU5ErkJggg==); 280 | background-repeat: no-repeat; 281 | background-position: 0 0; 282 | background-size: 13px; 283 | } 284 | 285 | .markdown-body ol, 286 | .markdown-body ul { 287 | margin-top: 0; 288 | margin-bottom: 0; 289 | padding-left: 0; 290 | } 291 | 292 | .markdown-body dd { 293 | margin-left: 0; 294 | } 295 | 296 | .markdown-body code, 297 | .markdown-body pre { 298 | font-size: 12px; 299 | font-family: SFMono-Regular, Consolas, Liberation Mono, Menlo, monospace; 300 | } 301 | 302 | .markdown-body pre { 303 | margin-top: 0; 304 | margin-bottom: 0; 305 | word-wrap: normal; 306 | } 307 | 308 | .markdown-body input::-webkit-inner-spin-button, 309 | .markdown-body input::-webkit-outer-spin-button { 310 | margin: 0; 311 | -webkit-appearance: none; 312 | appearance: none; 313 | } 314 | 315 | .markdown-body :checked + .radio-label { 316 | position: relative; 317 | z-index: 1; 318 | border-color: #0366d6; 319 | } 320 | 321 | .markdown-body .border { 322 | border: 1px solid #e1e4e8 !important; 323 | } 324 | 325 | .markdown-body .border-0 { 326 | border: 0 !important; 327 | } 328 | 329 | .markdown-body .border-bottom { 330 | border-bottom: 1px solid #e1e4e8 !important; 331 | } 332 | 333 | .markdown-body .rounded-1 { 334 | border-radius: 3px !important; 335 | } 336 | 337 | .markdown-body .bg-white { 338 | background-color: #fff !important; 339 | } 340 | 341 | .markdown-body .bg-gray-light { 342 | background-color: #fafbfc !important; 343 | } 344 | 345 | .markdown-body .text-gray-light { 346 | color: #6a737d !important; 347 | } 348 | 349 | .markdown-body .mb-0 { 350 | margin-bottom: 0 !important; 351 | } 352 | 353 | .markdown-body .my-2 { 354 | margin-top: 8px !important; 355 | margin-bottom: 8px !important; 356 | } 357 | 358 | .markdown-body .pl-0 { 359 | padding-left: 0 !important; 360 | } 361 | 362 | .markdown-body .py-0 { 363 | padding-top: 0 !important; 364 | padding-bottom: 0 !important; 365 | } 366 | 367 | .markdown-body .pl-1 { 368 | padding-left: 4px !important; 369 | } 370 | 371 | .markdown-body .pl-2 { 372 | padding-top: 8px !important; 373 | padding-bottom: 8px !important; 374 | padding-left: 8px !important; 375 | } 376 | 377 | .markdown-body .py-2 { 378 | padding-top: 8px !important; 379 | padding-bottom: 8px !important; 380 | } 381 | 382 | .markdown-body .pl-3, 383 | .markdown-body .px-3 { 384 | padding-left: 16px !important; 385 | } 386 | 387 | .markdown-body .px-3 { 388 | padding-right: 16px !important; 389 | } 390 | 391 | .markdown-body .pl-4 { 392 | padding-left: 24px !important; 393 | } 394 | 395 | .markdown-body .pl-5 { 396 | padding-left: 32px !important; 397 | } 398 | 399 | .markdown-body .pl-6 { 400 | padding-left: 40px !important; 401 | } 402 | 403 | .markdown-body .f6 { 404 | font-size: 12px !important; 405 | } 406 | 407 | .markdown-body .lh-condensed { 408 | line-height: 1.25 !important; 409 | } 410 | 411 | .markdown-body .text-bold { 412 | font-weight: 600 !important; 413 | } 414 | 415 | .markdown-body .pl-c { 416 | color: #6a737d; 417 | } 418 | 419 | .markdown-body .pl-smw, 420 | .markdown-body .pl-v { 421 | color: #e36209; 422 | } 423 | 424 | .markdown-body .pl-c1, 425 | .markdown-body .pl-s .pl-v { 426 | color: #005cc5; 427 | } 428 | 429 | .markdown-body .pl-e, 430 | .markdown-body .pl-en { 431 | color: #6f42c1; 432 | } 433 | 434 | .markdown-body .pl-s .pl-s1, 435 | .markdown-body .pl-smi { 436 | color: #24292e; 437 | } 438 | 439 | .markdown-body .pl-ent { 440 | color: #22863a; 441 | } 442 | 443 | .markdown-body .pl-k { 444 | color: #d73a49; 445 | } 446 | 447 | .markdown-body .pl-pds, 448 | .markdown-body .pl-s, 449 | .markdown-body .pl-s .pl-pse .pl-s1, 450 | .markdown-body .pl-sr, 451 | .markdown-body .pl-sr .pl-cce, 452 | .markdown-body .pl-sr .pl-sra, 453 | .markdown-body .pl-sr .pl-sre { 454 | color: #032f62; 455 | } 456 | 457 | .markdown-body .pl-bu { 458 | color: #b31d28; 459 | } 460 | 461 | .markdown-body .pl-ii { 462 | color: #fafbfc; 463 | background-color: #b31d28; 464 | } 465 | 466 | .markdown-body .pl-c2 { 467 | color: #fafbfc; 468 | background-color: #d73a49; 469 | } 470 | 471 | .markdown-body .pl-c2::before { 472 | content: "^M"; 473 | } 474 | 475 | .markdown-body .pl-sr .pl-cce { 476 | color: #22863a; 477 | font-weight: 700; 478 | } 479 | 480 | .markdown-body .pl-ml { 481 | color: #735c0f; 482 | } 483 | 484 | .markdown-body .pl-mh, 485 | .markdown-body .pl-mh .pl-en, 486 | .markdown-body .pl-ms { 487 | color: #005cc5; 488 | font-weight: 700; 489 | } 490 | 491 | .markdown-body .pl-mi { 492 | color: #24292e; 493 | font-style: italic; 494 | } 495 | 496 | .markdown-body .pl-mb { 497 | color: #24292e; 498 | font-weight: 700; 499 | } 500 | 501 | .markdown-body .pl-md { 502 | color: #b31d28; 503 | background-color: #ffeef0; 504 | } 505 | 506 | .markdown-body .pl-mi1 { 507 | color: #22863a; 508 | background-color: #f0fff4; 509 | } 510 | 511 | .markdown-body .pl-mc { 512 | color: #e36209; 513 | background-color: #ffebda; 514 | } 515 | 516 | .markdown-body .pl-mi2 { 517 | color: #f6f8fa; 518 | background-color: #005cc5; 519 | } 520 | 521 | .markdown-body .pl-mdr { 522 | color: #6f42c1; 523 | font-weight: 700; 524 | } 525 | 526 | .markdown-body .pl-ba { 527 | color: #586069; 528 | } 529 | 530 | .markdown-body .pl-sg { 531 | color: #959da5; 532 | } 533 | 534 | .markdown-body .pl-corl { 535 | color: #032f62; 536 | text-decoration: underline; 537 | } 538 | 539 | .markdown-body .pl-3 { 540 | padding-left: 16px !important; 541 | } 542 | 543 | .markdown-body .pl-7 { 544 | padding-left: 48px !important; 545 | } 546 | 547 | .markdown-body .pl-8 { 548 | padding-left: 64px !important; 549 | } 550 | 551 | .markdown-body .pl-9 { 552 | padding-left: 80px !important; 553 | } 554 | 555 | .markdown-body .pl-10 { 556 | padding-left: 96px !important; 557 | } 558 | 559 | .markdown-body .pl-11 { 560 | padding-left: 112px !important; 561 | } 562 | 563 | .markdown-body .pl-12 { 564 | padding-left: 128px !important; 565 | } 566 | 567 | .markdown-body::after, 568 | .markdown-body::before { 569 | position: absolute; 570 | top: 23px; 571 | right: 23px; 572 | bottom: 115px; 573 | left: 23px; 574 | display: block; 575 | text-align: bottom; 576 | border: 2px solid #e9e5d9; 577 | content: ""; 578 | pointer-events: none; 579 | } 580 | 581 | .markdown-body::after { 582 | top: 28px; 583 | right: 28px; 584 | bottom: 120px; 585 | left: 28px; 586 | clear: both; 587 | } 588 | 589 | .markdown-body > :first-child { 590 | margin-top: 0 !important; 591 | } 592 | 593 | .markdown-body > :last-child { 594 | margin-bottom: 0 !important; 595 | } 596 | 597 | .markdown-body a:not([href]) { 598 | color: inherit; 599 | text-decoration: none; 600 | } 601 | 602 | .markdown-body blockquote > :first-child { 603 | margin-top: 0; 604 | } 605 | 606 | .markdown-body blockquote > :last-child { 607 | margin-bottom: 0; 608 | } 609 | 610 | .markdown-body table th { 611 | font-weight: 600; 612 | } 613 | 614 | .markdown-body table td, 615 | .markdown-body table th { 616 | padding: 6px 13px; 617 | border: 1px solid #dfe2e5; 618 | } 619 | 620 | .markdown-body table tr { 621 | background-color: #fff; 622 | border-top: 1px solid #ebdfd5; 623 | } 624 | 625 | .markdown-body table tr:nth-child(2n) { 626 | background-color: #f6f8fa; 627 | } 628 | 629 | .markdown-body img[align=right] { 630 | padding-left: 20px; 631 | } 632 | 633 | .markdown-body img[align=left] { 634 | padding-right: 20px; 635 | } 636 | 637 | .markdown-body code { 638 | margin: 0; 639 | padding: 0.2em 0.4em; 640 | font-size: 85%; 641 | background-color: rgba(27, 31, 35, 0.05); 642 | border-radius: 3px; 643 | } 644 | 645 | .markdown-body pre > code { 646 | margin: 0; 647 | padding: 0; 648 | font-size: 100%; 649 | white-space: pre; 650 | word-break: normal; 651 | background: transparent; 652 | border: 0; 653 | } 654 | 655 | .markdown-body .highlight { 656 | margin-bottom: 16px; 657 | } 658 | 659 | .markdown-body pre code { 660 | display: inline; 661 | max-width: auto; 662 | margin: 0; 663 | padding: 0; 664 | overflow: visible; 665 | line-height: inherit; 666 | word-wrap: normal; 667 | background-color: initial; 668 | border: 0; 669 | } 670 | 671 | .markdown-body .commit-tease-sha { 672 | display: inline-block; 673 | color: #444d56; 674 | font-size: 90%; 675 | font-family: SFMono-Regular, Consolas, Liberation Mono, Menlo, monospace; 676 | } 677 | 678 | .markdown-body .full-commit .btn-outline:not(:disabled):hover { 679 | color: #005cc5; 680 | border-color: #005cc5; 681 | } 682 | 683 | .markdown-body .blob-wrapper { 684 | overflow-x: auto; 685 | overflow-y: hidden; 686 | } 687 | 688 | .markdown-body .blob-wrapper-embedded { 689 | max-height: 240px; 690 | overflow-y: auto; 691 | } 692 | 693 | .markdown-body .blob-num { 694 | width: 1%; 695 | min-width: 50px; 696 | padding-right: 10px; 697 | padding-left: 10px; 698 | color: rgba(27, 31, 35, 0.3); 699 | font-size: 12px; 700 | font-family: SFMono-Regular, Consolas, Liberation Mono, Menlo, monospace; 701 | line-height: 20px; 702 | white-space: nowrap; 703 | text-align: right; 704 | vertical-align: top; 705 | cursor: pointer; 706 | -webkit-user-select: none; 707 | -moz-user-select: none; 708 | -ms-user-select: none; 709 | user-select: none; 710 | } 711 | 712 | .markdown-body .blob-num:hover { 713 | color: rgba(27, 31, 35, 0.6); 714 | } 715 | 716 | .markdown-body .blob-num::before { 717 | content: attr(data-line-number); 718 | } 719 | 720 | .markdown-body .blob-code { 721 | position: relative; 722 | padding-right: 10px; 723 | padding-left: 10px; 724 | line-height: 20px; 725 | vertical-align: top; 726 | } 727 | 728 | .markdown-body .blob-code-inner { 729 | overflow: visible; 730 | color: #24292e; 731 | font-size: 12px; 732 | font-family: SFMono-Regular, Consolas, Liberation Mono, Menlo, monospace; 733 | white-space: pre; 734 | word-wrap: normal; 735 | } 736 | 737 | .markdown-body .pl-token.active, 738 | .markdown-body .pl-token:hover { 739 | background: #ffea7f; 740 | cursor: pointer; 741 | } 742 | 743 | .markdown-body .tab-size[data-tab-size="1"] { 744 | -moz-tab-size: 1; 745 | tab-size: 1; 746 | } 747 | 748 | .markdown-body .tab-size[data-tab-size="2"] { 749 | -moz-tab-size: 2; 750 | tab-size: 2; 751 | } 752 | 753 | .markdown-body .tab-size[data-tab-size="3"] { 754 | -moz-tab-size: 3; 755 | tab-size: 3; 756 | } 757 | 758 | .markdown-body .tab-size[data-tab-size="4"] { 759 | -moz-tab-size: 4; 760 | tab-size: 4; 761 | } 762 | 763 | .markdown-body .tab-size[data-tab-size="5"] { 764 | -moz-tab-size: 5; 765 | tab-size: 5; 766 | } 767 | 768 | .markdown-body .tab-size[data-tab-size="6"] { 769 | -moz-tab-size: 6; 770 | tab-size: 6; 771 | } 772 | 773 | .markdown-body .tab-size[data-tab-size="7"] { 774 | -moz-tab-size: 7; 775 | tab-size: 7; 776 | } 777 | 778 | .markdown-body .tab-size[data-tab-size="8"] { 779 | -moz-tab-size: 8; 780 | tab-size: 8; 781 | } 782 | 783 | .markdown-body .tab-size[data-tab-size="9"] { 784 | -moz-tab-size: 9; 785 | tab-size: 9; 786 | } 787 | 788 | .markdown-body .tab-size[data-tab-size="10"] { 789 | -moz-tab-size: 10; 790 | tab-size: 10; 791 | } 792 | 793 | .markdown-body .tab-size[data-tab-size="11"] { 794 | -moz-tab-size: 11; 795 | tab-size: 11; 796 | } 797 | 798 | .markdown-body .tab-size[data-tab-size="12"] { 799 | -moz-tab-size: 12; 800 | tab-size: 12; 801 | } 802 | 803 | .markdown-body .task-list-item { 804 | list-style-type: none; 805 | } 806 | 807 | .markdown-body > ul.task-list { 808 | padding-left: 1.6em; 809 | } 810 | 811 | .markdown-body .task-list-item::after { 812 | display: none; 813 | } 814 | 815 | .markdown-body .task-list-item + .task-list-item { 816 | margin-top: 3px; 817 | } 818 | 819 | .markdown-body .task-list-item input { 820 | position: relative; 821 | width: 16px; 822 | height: 16px; 823 | margin: 0 0.2em 0.25em -1.6em; 824 | vertical-align: middle; 825 | } 826 | 827 | .markdown-body .task-list-item input::after { 828 | position: absolute; 829 | top: 0; 830 | left: 0; 831 | display: block; 832 | width: 16px; 833 | height: 16px; 834 | background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyNpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDE0IDc5LjE1MTQ4MSwgMjAxMy8wMy8xMy0xMjowOToxNSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIChNYWNpbnRvc2gpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjM4MUIxNEVDRkJFRjExRTZCQUE0QUE4RkZEQTZCMTg5IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjM4MUIxNEVERkJFRjExRTZCQUE0QUE4RkZEQTZCMTg5Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6MTg5QkQ0ODlGQkVGMTFFNkJBQTRBQThGRkRBNkIxODkiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6MTg5QkQ0OEFGQkVGMTFFNkJBQTRBQThGRkRBNkIxODkiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz7+vS7vAAADqklEQVR42sRX204TURTd5zJnOqVKyqVQQPTFRKMJ6IP6DeoPmPjs5Yv0A0z4AX/AJ+XFAMHwgAJyEco1mtr7Oce9z/RKaSm2lNNOms7MmbXX3mtfhhWzR0DLWqOOUztvfp+kXhSymfvGmBj0cHHO0yqILg/Gx+aGxibfM8YLdJ6RAcVCfnJ79dtHXSrMCs/DmyUwxnqJjwQtGFMCXSyCkGph6va9557yd1ghc6B+rizMG21mPT8CjPMQvMcGoAXOCGsMFPM5YIIv3roz+1ie7O++NlrPepEocCEQl/ecfb0XLDfgsQCKuczMycHuK/Zj6dNnNOuJ8HyKE0UFLndRKAyGIo9Q/Iss5bIP/WgMODG/dHAnO4cFwoN8Jv1AIm3FuHCx79eiEDMrKDV8lDsvC45BX5cTOgfJy4JnV4BP2DJk3jsPWK1BGw2CwopZ1U4LTg9V+j04CFiDgZHkFIpM4P/SuXuqidftYXURANknktPgBwOQmJgGgTG2utRyD3cH7545lVhjkfnkTaBq6mo/emBwZAw0ng8Rz9iL2JJB7dO6gqFjtcGHUsQa42qQIZXX0WQNnFYhl4XDX5sgpcKUa1Z5BZND2xhYjCM1Dw/iiXH0MDHV1esh8xLGfPoUeAZSm6sYXxSiFNASg1e+LSygkkkMhsYmXFyHEpNgSghqyCPa/Y6MN4PvbX5HbyksdqrssdYWcKpKnCpT0wHOtbHBuGtQtPwgisaERljH/EYT+P7WGhrtu/NcSNdf2BnPr2DKmh7Z6Z7hrD/a3YZhTKtINFZnxARQ+fZUY8z3t9YR1AeplLvevqvycl9oJW7qF6hk4Uk43NmAXCZd3UrhUPXM8wi+veZc7vnKZQDnrKMk4m0rFd4hsGtJ5cPBznqDEQ3g6HacckB6nTBv8kNrEbrhBMczIcmtARqx2WBECL4RXsd5grlR7iKlDZvRea0gHM8EFgzlXHaAuU2lloAO97aAZsj/YV7B7KgZsXLVEjIUx3Fq150n1hSiC4PXWSA77YUEYBGIVCsRtNJTu5khaZe86CTj0sPWHtDtICEbcqJDu3syvFTaMbIqwBUtnEPTHN9OvlIr7fciTE96yzyIXpvDrkKND1i/PqQhxAwGrs/hq9mhf5TanseePcOl1x/2pSLq2C4Nj089Ig3k46PJZ2jYgqYL5vLCQc8mDMRajCeSTwmb1V7Prcqm/7zNZTMv8aa7+H+gV5O6DVP4Lw42K5Eg+iGIXX9XEf8/AQYAU4ZbKIbtTqYAAAAASUVORK5CYII=); 835 | background-size: contain; 836 | content: ''; 837 | } 838 | 839 | .markdown-body .task-list-item input:checked::after { 840 | position: absolute; 841 | top: 0; 842 | left: 0; 843 | display: block; 844 | width: 16px; 845 | height: 16px; 846 | background-color: #fffcf6; 847 | background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyNpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDE0IDc5LjE1MTQ4MSwgMjAxMy8wMy8xMy0xMjowOToxNSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIChNYWNpbnRvc2gpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjM4MUIxNEY0RkJFRjExRTZCQUE0QUE4RkZEQTZCMTg5IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjM4MUIxNEY1RkJFRjExRTZCQUE0QUE4RkZEQTZCMTg5Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6MzgxQjE0RjJGQkVGMTFFNkJBQTRBQThGRkRBNkIxODkiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6MzgxQjE0RjNGQkVGMTFFNkJBQTRBQThGRkRBNkIxODkiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz4afmUJAAAC2ElEQVR42mL8//8/AwhsTJNhAVKeQGwPxPJAzMFAXfADiB8C8UEg3u4/68kfkCAjyAFAy4WB7DpxFfV/svpGj0SUVD6xc3H/oabtP799ZXlz7w7f44vn5F7euckEFGoCOuIt44ZUaZDPe2X1DL8ZBYbdYKADOLd+lcbjS+e5gcxikEs8QT43CgBaDooNOmCQXUA7/wJ5HiAH2MvqGz5ioJftUAyxk8Ee5ABlCTX1D/R2gLiqGtBOBiVQ/LMws7L+g0jQD7CwsQHtZGAFOYABlhUHArBAqIF2wACGABMiBKiDn127IrmlvWna5R1bzQirh0fBP6r45tm1q5Jn169rAqYp1vtnTmWCLNH18DxFOARAUUAhBvkcZjnUbMaH58/F49VHrUT47Po1oOXrkS1nYGRk/G3k799CyGxoCPzDi0+tWum1pbNj8scXz3nR5SDBjmm5cUBAnZSGxnO8ZhOTCE+tWe314vbtsH9//vAeXrCg8+OrlzzwBAfy+YYNWCz3r5PSBFpORCIkmAZe37vvATP839+/XIfnL+j6+PIlz7NrIMs3Ylru7wf1ORFpBxEC/3Bim/iYKiZm5m8ojliwsOvsps1YLPcF+lz9OT7zUDHUAaCiGBfmExX9YhsfW4buiP///qEmOD+fOkkN9ef4zELHRBdEfGIiQEfEoDgC3XKIz0ktuEgoB/hEgY6Ii0ZxBMRyb2Ccqz0nq/wgJg0gYz4xYaAjIsuYWFg+gxxi5OcFtFyVhDjHTAMkF0Sg6PAuzslFiPwf2rXhaHsA5IA/f3//ZIK0C+kHfn37DrL7BygX3H1x94EAvX3++tETPlBXDeSAg0+u3JCjRpuAFAy2E2g3yAE7Xt1/xHx+2x4NevUJQHYB7QRFwQ6UzqmYktxfWR2Nx8Iykp/YuDj/UDvO3z55zvf4yg3ZV/fAljeCO6do3XMvIHYAYlkadc8fA/EBIN4G654DBBgAe8wcWwmLGDkAAAAASUVORK5CYII=); 848 | background-size: contain; 849 | content: ''; 850 | } 851 | 852 | .markdown-body blockquote, 853 | .markdown-body details, 854 | .markdown-body dl, 855 | .markdown-body ol, 856 | .markdown-body p, 857 | .markdown-body pre, 858 | .markdown-body table, 859 | .markdown-body ul { 860 | margin-top: 0; 861 | margin-bottom: 1.8em; 862 | } 863 | 864 | .markdown-body pre, 865 | .markdown-body .highlight pre { 866 | position: relative; 867 | padding: 16px; 868 | overflow: auto; 869 | font-size: 85%; 870 | font-size: 18px; 871 | line-height: 1.4; 872 | background: #fff; 873 | border: 1px #ebdfd5 solid; 874 | } 875 | 876 | /* --------------列表 Start------------- */ 877 | 878 | .markdown-body li { 879 | word-wrap: break-all; 880 | } 881 | 882 | .markdown-body ul li { 883 | position: relative; 884 | min-height: 45px; 885 | color: #645647; 886 | font-size: 24px; 887 | line-height: 45px; 888 | text-indent: 18px; 889 | word-break: break-all; 890 | list-style: none; 891 | } 892 | 893 | .markdown-body ol li { 894 | position: relative; 895 | min-height: 45px; 896 | color: #645647; 897 | font-size: 24px; 898 | line-height: 45px; 899 | } 900 | 901 | .markdown-body ul li::after { 902 | position: absolute; 903 | top: 18px; 904 | left: 1px; 905 | width: 8px; 906 | height: 8px; 907 | overflow: hidden; 908 | background: #dfd6c5; 909 | border-radius: 4px; 910 | content: '.'; 911 | } 912 | 913 | .markdown-body li + li { 914 | margin-top: 0.25em; 915 | } 916 | 917 | .markdown-body dl { 918 | padding: 0; 919 | } 920 | 921 | .markdown-body dl dt { 922 | margin-top: 16px; 923 | padding: 0; 924 | font-weight: 600; 925 | font-size: 1em; 926 | font-style: italic; 927 | } 928 | 929 | .markdown-body dl dd { 930 | margin-bottom: 16px; 931 | padding: 0 16px; 932 | } 933 | 934 | .markdown-body > ol { 935 | padding-left: 1.6em; 936 | } 937 | 938 | .markdown-body ol ol, 939 | .markdown-body ul ol { 940 | list-style-type: lower-roman; 941 | } 942 | 943 | .markdown-body ol ol, 944 | .markdown-body ol ul, 945 | .markdown-body ul ol, 946 | .markdown-body ul ul { 947 | margin-top: 0; 948 | margin-bottom: 0; 949 | margin-left: 1em; 950 | } 951 | 952 | .markdown-body ol ol ol, 953 | .markdown-body ol ul ol, 954 | .markdown-body ul ol ol, 955 | .markdown-body ul ul ol { 956 | list-style-type: lower-alpha; 957 | } 958 | 959 | .markdown-body li > p { 960 | margin-top: 16px; 961 | } 962 | 963 | /* --------------列表 End------------- */ 964 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | GitHub Markdown CSS Smartisan 7 | 8 | 17 | 18 | 19 |
20 |

GitHub Markdown CSS Smartisan

21 | 22 |

23 | 24 |

Headers

25 | 26 |
27 |

Skip a line and 28 | indent the >'s four spaces.

29 |
30 |
var gulp = require('gulp');
  31 |     var myth = require('gulp-myth');
  32 |     gulp.task('default', function () {
  33 |         return gulp.src('src/app.css')
  34 |             .pipe(myth())
  35 |             .pipe(gulp.dest('dist'));
  36 |     });
37 |
38 | 39 |
    40 |
  1. First ordered list item
  2. 41 |
  3. Another item
  4. 42 |
  5. Unordered sub-list.
  6. 43 |
  7. Actual numbers don't matter, just that it's a number
  8. 44 |
45 | 46 | 47 |

H1

48 | 49 |

H2

50 | 51 |

H3

52 | 53 |

H4

54 | 55 |
H5
56 | 57 |
H6
58 | 59 | 60 |
# H1
  61 |     ## H2
  62 |     ### H3
  63 |     #### H4
  64 |     ##### H5
  65 |     ###### H6
  66 |     
  67 |     Alternatively, for H1 and H2, an underline-ish style:
  68 |     
  69 |     Alt-H1
  70 |     ======
  71 |     
  72 |     Alt-H2
  73 |     ------
  74 |     
75 | 76 | 77 |

Alternatively, for H1 and H2, an underline-ish style:

78 | 79 |

Alt-H1

80 | 81 |

Alt-H2

82 |

83 |

Emphasis

84 | 85 |
Emphasis, aka italics, with *asterisks* or _underscores_.
  86 | 
  87 | Strong emphasis, aka bold, with **asterisks** or __underscores__.
  88 | 
  89 | Combined emphasis with **asterisks and _underscores_**.
  90 | 
  91 | Strikethrough uses two tildes. ~~Scratch this.~~
  92 | 
93 | 94 |

Emphasis, aka italics, with asterisks or underscores.

95 | 96 |

Strong emphasis, aka bold, with asterisks or underscores.

97 | 98 |

Combined emphasis with asterisks and underscores.

99 | 100 |

Strikethrough uses two tildes. Scratch this.

101 | 102 |

103 | 104 |

Lists

105 | 106 |

(In this example, leading and trailing spaces are shown with with dots: ⋅)

107 | 108 |
1. First ordered list item
 109 | 2. Another item
 110 | ⋅⋅* Unordered sub-list.
 111 | 1. Actual numbers don't matter, just that it's a number
 112 | ⋅⋅1. Ordered sub-list
 113 | 4. And another item.
 114 | 
 115 | ⋅⋅⋅You can have properly indented paragraphs within list items. Notice the blank line above, and the leading spaces (at least one, but we'll use three here to also align the raw Markdown).
 116 | 
 117 | ⋅⋅⋅To have a line break without a paragraph, you will need to use two trailing spaces.⋅⋅
 118 | ⋅⋅⋅Note that this line is separate, but within the same paragraph.⋅⋅
 119 | ⋅⋅⋅(This is contrary to the typical GFM line break behaviour, where trailing spaces are not required.)
 120 | 
 121 | * Unordered list can use asterisks
 122 | - Or minuses
 123 | + Or pluses
 124 | 
125 | 126 |
    127 |
  1. First ordered list item
  2. 128 |
  3. Another item 129 | 130 |
      131 |
    • Unordered sub-list.
    • 132 |
  4. 133 |
  5. Actual numbers don't matter, just that it's a number 134 | 135 |
      136 |
    1. Ordered sub-list
    2. 137 |
  6. 138 |
  7. And another item.

    139 | 140 |

    You can have properly indented paragraphs within list items. Notice the blank line above, and the leading spaces (at least one, but we'll use three here to also align the raw Markdown).

    141 | 142 |

    To have a line break without a paragraph, you will need to use two trailing spaces. 143 | Note that this line is separate, but within the same paragraph. 144 | (This is contrary to the typical GFM line break behaviour, where trailing spaces are not required.)

  8. 145 |
146 | 147 | 152 | 153 |
    154 |
  1. foo 155 | 156 |
      157 |
    1. bar 158 | 159 |
        160 |
      1. baz 161 | 162 |
          163 |
        1. faz
        2. 164 |
      2. 165 |
    2. 166 |
  2. 167 |
  3. foo2

  4. 168 |
169 | 170 | 186 | 187 |
    188 |
  1. foo

    189 | 190 |
      191 |
    • bar 192 | 193 |
        194 |
      1. baz 195 | 196 |
          197 |
        • faz
        • 198 |
      2. 199 |
    • 200 |
  2. 201 |
202 | 203 | 218 | 219 |
    220 |
  1. Lists in a list item: 221 | 222 |
      223 |
    • Indented four spaces. 224 | 225 |
        226 |
      • indented eight spaces.
      • 227 |
    • 228 |
    • Four spaces again.
    • 229 |
  2. 230 |
  3. Multiple paragraphs in a list items: 231 | It's best to indent the paragraphs four spaces 232 | You can get away with three, but it can get 233 | confusing when you nest other things. 234 | Stick to four.

    235 | 236 |

    We indented the first line an extra space to align 237 | it with these paragraphs. In real use, we might do 238 | that to the entire list so that all items line up.

    239 | 240 |

    This paragraph is still part of the list item, but it looks messy to humans. So it's a good idea to wrap your nested paragraphs manually, as we did with the first two.

  4. 241 |
  5. Blockquotes in a list item:

    242 | 243 |
    244 |

    Skip a line and 245 | indent the >'s four spaces.

    246 |
  6. 247 |
  7. Preformatted text in a list item:

    248 | 249 |
    Skip a line and indent eight spaces.
     250 | That's four spaces for the list
     251 | and four to trigger the code block.
     252 | 
  8. 253 |
254 | 255 |

Inline HTML

256 | 257 |

To reboot your computer, press ctrl+alt+del.

258 | 259 |

260 | 261 |

Links

262 | 263 |

There are two ways to create links.

264 | 265 |
[I'm an inline-style link](https://www.google.com)
 266 | 
 267 | [I'm an inline-style link with title](https://www.google.com "Google's Homepage")
 268 | 
 269 | [I'm a reference-style link][Arbitrary case-insensitive reference text]
 270 | 
 271 | [I'm a relative reference to a repository file](../blob/master/LICENSE)
 272 | 
 273 | [You can use numbers for reference-style link definitions][1]
 274 | 
 275 | Or leave it empty and use the [link text itself]
 276 | 
 277 | Some text to show that the reference links can follow later.
 278 | 
 279 | [arbitrary case-insensitive reference text]: https://www.mozilla.org
 280 | [1]: http://slashdot.org
 281 | [link text itself]: http://www.reddit.com
 282 | 
283 | 284 |

I'm an inline-style link

285 | 286 |

I'm an inline-style link with title

287 | 288 |

I'm a reference-style link

289 | 290 |

I'm a relative reference to a repository file

291 | 292 |

You can use numbers for reference-style link definitions

293 | 294 |

Or leave it empty and use the link text itself

295 | 296 |

Some text to show that the reference links can follow later.

297 | 298 |

299 | 300 |

Images

301 | 302 |
Here's our logo (hover to see the title text):
 303 | 
 304 | Inline-style:
 305 | ![alt text](https://github.com/adam-p/markdown-here/raw/master/src/common/images/icon48.png "Logo Title Text 1")
 306 | 
 307 | Reference-style:
 308 | ![alt text][logo]
 309 | 
 310 | [logo]: https://github.com/adam-p/markdown-here/raw/master/src/common/images/icon48.png "Logo Title Text 2"
 311 | 
312 | 313 |

Here's our logo (hover to see the title text):

314 | 315 |

Inline-style: 316 | alt text

317 | 318 |

Reference-style: 319 | alt text

320 | 321 |

322 | 323 |

Code and Syntax Highlighting

324 | 325 |

Code blocks are part of the Markdown spec, but syntax highlighting isn't. However, many renderers -- like Github's and Markdown Here -- support syntax highlighting. Which languages are supported and how those language names should be written will vary from renderer to renderer. Markdown Here supports highlighting for dozens of languages (and not-really-languages, like diffs and HTTP headers); to see the complete list, and how to write the language names, see the highlight.js demo page.

326 | 327 |
Inline `code` has `back-ticks around` it.
 328 | 
329 | 330 |

Inline code has back-ticks around it.

331 | 332 |

Blocks of code are either fenced by lines with three back-ticks ```, or are indented with four spaces. I recommend only using the fenced code blocks -- they're easier and only they support syntax highlighting.

333 | 334 |
```javascript
 335 | var s = "JavaScript syntax highlighting";
 336 | alert(s);
 337 | ```
 338 | 
 339 | ```python
 340 | s = "Python syntax highlighting"
 341 | print s
 342 | ```
 343 | 
 344 | ```
 345 | No language indicated, so no syntax highlighting.
 346 | But let's throw in a <b>tag</b>.
 347 | ```
 348 | 
349 | 350 |
var s = "JavaScript syntax highlighting";
 351 | alert(s);
352 | 353 |
s = "Python syntax highlighting"
 354 | print s
355 | 356 |
No language indicated, so no syntax highlighting in Markdown Here (varies on Github).
 357 | But let's throw in a <b>tag</b>.
 358 | 
359 | 360 |

361 | 362 |

Tables

363 | 364 |

Tables aren't part of the core Markdown spec, but they are part of GFM and Markdown Here supports them. They are an easy way of adding tables to your email -- a task that would otherwise require copy-pasting from another application.

365 | 366 |
Colons can be used to align columns.
 367 | 
 368 | | Tables        | Are           | Cool  |
 369 | | ------------- |:-------------:| -----:|
 370 | | col 3 is      | right-aligned |  |
 371 | | col 2 is      | centered      |    |
 372 | | zebra stripes | are neat      |     |
 373 | 
 374 | The outer pipes (|) are optional, and you don't need to make the raw Markdown line up prettily. You can also use inline Markdown.
 375 | 
 376 | Markdown | Less | Pretty
 377 | --- | --- | ---
 378 | *Still* | `renders` | **nicely**
 379 | 1 | 2 | 3
 380 | 
381 | 382 |

Colons can be used to align columns.

383 | 384 | 385 | 386 | 387 | 388 | 389 | 390 | 391 | 392 | 393 | 394 | 395 | 396 | 397 | 398 | 399 | 400 | 401 | 402 | 403 | 404 | 405 | 406 |
TablesAreCool
col 3 isright-aligned
col 2 iscentered
zebra stripesare neat
407 | 408 |

The outer pipes (|) are optional, and you don't need to make the raw Markdown line up prettily. You can also use inline Markdown.

409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 427 |
MarkdownLessPretty
Stillrendersnicely
123
428 | 429 |

430 | 431 |

Blockquotes

432 | 433 |
> Blockquotes are very handy in email to emulate reply text.
 434 | > This line is part of the same quote.
 435 | 
 436 | Quote break.
 437 | 
 438 | > This is a very long line that will still be quoted properly when it wraps. Oh boy let's keep writing to make sure this is long enough to actually wrap for everyone. Oh, you can *put* **Markdown** into a blockquote.
 439 | 
440 | 441 |
442 |

Blockquotes are very handy in email to emulate reply text. 443 | This line is part of the same quote.

444 |
445 | 446 |

Quote break.

447 | 448 |
449 |

This is a very long line that will still be quoted properly when it wraps. Oh boy let's keep writing to make sure this is long enough to actually wrap for everyone. Oh, you can put Markdown into a blockquote.

450 |
451 | 452 |

453 | 454 |

Inline HTML

455 | 456 |

You can also use raw HTML in your Markdown, and it'll mostly work pretty well.

457 | 458 |
<dl>
 459 |     <dt>Definition list</dt>
 460 |     <dd>Is something people use sometimes.</dd>
 461 | 
 462 |     <dt>Markdown in HTML</dt>
 463 |     <dd>Does *not* work **very** well. Use HTML <em>tags</em>.</dd>
 464 | </dl>
 465 | 
466 | 467 |
468 |
Definition list
469 |
Is something people use sometimes.
470 | 471 |
Markdown in HTML
472 |
Does *not* work **very** well. Use HTML tags.
473 |
474 | 475 |

476 | 477 |

Horizontal Rule

478 | 479 |
Three or more...
 480 | 
 481 | ---
 482 | 
 483 | Hyphens
 484 | 
 485 | ***
 486 | 
 487 | Asterisks
 488 | 
 489 | ___
 490 | 
 491 | Underscores
 492 | 
493 | 494 |

Three or more...

495 | 496 |
497 | 498 |

Hyphens

499 | 500 |
501 | 502 |

Asterisks

503 | 504 |
505 | 506 |

Underscores

507 | 508 |

509 | 510 |

Line Breaks

511 | 512 |

My basic recommendation for learning how line breaks work is to experiment and discover -- hit <Enter> once (i.e., insert one newline), then hit it twice (i.e., insert two newlines), see what happens. You'll soon learn to get what you want. "Markdown Toggle" is your friend.

513 | 514 |

Here are some things to try out:

515 | 516 |
Here's a line for us to start with.
 517 | 
 518 | This line is separated from the one above by two newlines, so it will be a *separate paragraph*.
 519 | 
 520 | This line is also a separate paragraph, but...
 521 | This line is only separated by a single newline, so it's a separate line in the *same paragraph*.
 522 | 
523 | 524 |

Here's a line for us to start with.

525 | 526 |

This line is separated from the one above by two newlines, so it will be a separate paragraph.

527 | 528 |

This line is also begins a separate paragraph, but... 529 | This line is only separated by a single newline, so it's a separate line in the same paragraph.

530 | 531 |

(Technical note: Markdown Here uses GFM line breaks, so there's no need to use MD's two-space line breaks.)

532 | 533 |

534 | 535 |

Youtube videos

536 | 537 |

They can't be added directly but you can add an image with a link to the video like this:

538 | 539 |
<a href="http://www.youtube.com/watch?feature=player_embedded&v=YOUTUBE_VIDEO_ID_HERE
 540 | " target="_blank"><img src="http://img.youtube.com/vi/YOUTUBE_VIDEO_ID_HERE/0.jpg"
 541 | alt="IMAGE ALT TEXT HERE" width="240" height="180" border="10" /></a>
 542 | 
543 | 544 |

Or, in pure Markdown, but losing the image sizing and border:

545 | 546 |
[![IMAGE ALT TEXT HERE](http://img.youtube.com/vi/YOUTUBE_VIDEO_ID_HERE/0.jpg)](http://www.youtube.com/watch?v=YOUTUBE_VIDEO_ID_HERE)
 547 | 
548 | 549 |

Referencing a bug by #bugID in your git commit links it to the slip. For example #1.

550 | 551 |

Task List

552 | 553 | 562 | 563 |

[test]: http://google.com/ "Google"

564 | 565 |

A heading

566 | 567 |

Just a note, I've found that I can't test my markdown parser vs others. 568 | For example, both markdown.js and showdown code blocks in lists wrong. They're 569 | also completely [inconsistent][test] with regards to paragraphs in list items.

570 | 571 |

A link. Not anymore.

572 | 573 |

This will make me fail the test because 574 | markdown.js doesnt acknowledge arbitrary html blocks =/

575 | 576 | 595 | 596 |

Paragraph.

597 | 598 |
599 | 609 |
610 | 611 |
612 | 613 |
614 |

Another blockquote! 615 | I really need to get 616 | more creative with 617 | mockup text.. 618 | markdown.js breaks here again

619 |
620 | 621 |

Another Heading

622 | 623 |

Hello world. Here is a link. 624 | And an image alt.

625 | 626 |
Code goes here.
 627 | Lots of it...
 628 | 
629 | 630 |
631 |

A list within a blockquote:

632 | 633 | 638 |
639 | 640 |

This is strong and em.

641 | 642 |

So is this word.

643 | 644 |

This is strong and em.

645 | 646 |

So is this word.

647 | 648 |

Unordered

649 | 650 |

Asterisks tight:

651 | 652 | 657 | 658 |

Asterisks loose:

659 | 660 | 665 | 666 |
667 | 668 |

Pluses tight:

669 | 670 | 675 | 676 |

Pluses loose:

677 | 678 | 683 | 684 |
685 | 686 |

Minuses tight:

687 | 688 | 693 | 694 |

Minuses loose:

695 | 696 | 701 | 702 |

Ordered

703 | 704 |

Tight:

705 | 706 |
    707 |
  1. First
  2. 708 |
  3. Second
  4. 709 |
  5. Third
  6. 710 |
711 | 712 |

and:

713 | 714 |
    715 |
  1. One
  2. 716 |
  3. Two
  4. 717 |
  5. Three
  6. 718 |
719 | 720 |

Loose using tabs:

721 | 722 |
    723 |
  1. First

  2. 724 |
  3. Second

  4. 725 |
  5. Third

  6. 726 |
727 | 728 |

and using spaces:

729 | 730 |
    731 |
  1. One

  2. 732 |
  3. Two

  4. 733 |
  5. Three

  6. 734 |
735 | 736 |

Multiple paragraphs:

737 | 738 |
    739 |
  1. Item 1, graf one.

    740 | 741 |

    Item 2. graf two. The quick brown fox jumped over the lazy dog's 742 | back.

  2. 743 |
  3. Item 2.

  4. 744 |
  5. Item 3.

  6. 745 |
746 | 747 |

Nested

748 | 749 | 760 | 761 |

Here's another:

762 | 763 |
    764 |
  1. First
  2. 765 |
  3. Second: 766 | 767 |
      768 |
    • Fee
    • 769 |
    • Fie
    • 770 |
    • Foe
    • 771 |
  4. 772 |
  5. Third
  6. 773 |
774 | 775 |

Same thing but with paragraphs:

776 | 777 |
    778 |
  1. First

  2. 779 |
  3. Second:

    780 | 781 |
      782 |
    • Fee
    • 783 |
    • Fie
    • 784 |
    • Foe
    • 785 |
  4. 786 |
  5. Third

  6. 787 |
788 | 789 |

This was an error in Markdown 1.0.1:

790 | 791 | 800 | 801 |
802 |

foo

803 | 804 |
805 |

bar

806 |
807 | 808 |

foo

809 |
810 | 811 |

Markdown: Syntax

812 | 813 | 820 | 821 | 854 | 855 |

Note: This document is itself written using Markdown; you 856 | can [see the source for it by adding '.text' to the URL][src].

857 | 858 |

[src]: /projects/markdown/syntax.text

859 | 860 |
861 | 862 |

Overview

863 | 864 |

Philosophy

865 | 866 |

Markdown is intended to be as easy-to-read and easy-to-write as is feasible.

867 | 868 |

Readability, however, is emphasized above all else. A Markdown-formatted 869 | document should be publishable as-is, as plain text, without looking 870 | like it's been marked up with tags or formatting instructions. While 871 | Markdown's syntax has been influenced by several existing text-to-HTML 872 | filters -- including Setext, [atx] [2], [Textile] [3], [reStructuredText] [4], 873 | [Grutatext] [5], and [EtText] [6] -- the single biggest source of 874 | inspiration for Markdown's syntax is the format of plain text email.

875 | 876 |

1: http://docutils.sourceforge.net/mirror/setext.html 877 | [2]: http://www.aaronsw.com/2002/atx/ 878 | [3]: http://textism.com/tools/textile/ 879 | [4]: http://docutils.sourceforge.net/rst.html 880 | [5]: http://www.triptico.com/software/grutatxt.html 881 | [6]: http://ettext.taint.org/doc/

882 | 883 |

To this end, Markdown's syntax is comprised entirely of punctuation 884 | characters, which punctuation characters have been carefully chosen so 885 | as to look like what they mean. E.g., asterisks around a word actually 886 | look like *emphasis*. Markdown lists look like, well, lists. Even 887 | blockquotes look like quoted passages of text, assuming you've ever 888 | used email.

889 | 890 |

Inline HTML

891 | 892 |

Markdown's syntax is intended for one purpose: to be used as a 893 | format for writing for the web.

894 | 895 |

Markdown is not a replacement for HTML, or even close to it. Its 896 | syntax is very small, corresponding only to a very small subset of 897 | HTML tags. The idea is not to create a syntax that makes it easier 898 | to insert HTML tags. In my opinion, HTML tags are already easy to 899 | insert. The idea for Markdown is to make it easy to read, write, and 900 | edit prose. HTML is a publishing format; Markdown is a writing 901 | format. Thus, Markdown's formatting syntax only addresses issues that 902 | can be conveyed in plain text.

903 | 904 |

For any markup that is not covered by Markdown's syntax, you simply 905 | use HTML itself. There's no need to preface it or delimit it to 906 | indicate that you're switching from Markdown to HTML; you just use 907 | the tags.

908 | 909 |

The only restrictions are that block-level HTML elements -- e.g. <div>, 910 | <table>, <pre>, <p>, etc. -- must be separated from surrounding 911 | content by blank lines, and the start and end tags of the block should 912 | not be indented with tabs or spaces. Markdown is smart enough not 913 | to add extra (unwanted) <p> tags around HTML block-level tags.

914 | 915 |

For example, to add an HTML table to a Markdown article:

916 | 917 |
This is a regular paragraph.
 918 | 
 919 | <table>
 920 |     <tr>
 921 |         <td>Foo</td>
 922 |     </tr>
 923 | </table>
 924 | 
 925 | This is another regular paragraph.
 926 | 
927 | 928 |

Note that Markdown formatting syntax is not processed within block-level 929 | HTML tags. E.g., you can't use Markdown-style *emphasis* inside an 930 | HTML block.

931 | 932 |

Span-level HTML tags -- e.g. <span>, <cite>, or <del> -- can be 933 | used anywhere in a Markdown paragraph, list item, or header. If you 934 | want, you can even use HTML tags instead of Markdown formatting; e.g. if 935 | you'd prefer to use HTML <a> or <img> tags instead of Markdown's 936 | link or image syntax, go right ahead.

937 | 938 |

Unlike block-level HTML tags, Markdown syntax is processed within 939 | span-level tags.

940 | 941 |

Automatic Escaping for Special Characters

942 | 943 |

In HTML, there are two characters that demand special treatment: < 944 | and &. Left angle brackets are used to start tags; ampersands are 945 | used to denote HTML entities. If you want to use them as literal 946 | characters, you must escape them as entities, e.g. &lt;, and 947 | &amp;.

948 | 949 |

Ampersands in particular are bedeviling for web writers. If you want to 950 | write about 'AT&T', you need to write 'AT&amp;T'. You even need to 951 | escape ampersands within URLs. Thus, if you want to link to:

952 | 953 |
http://images.google.com/images?num=30&q=larry+bird
 954 | 
955 | 956 |

you need to encode the URL as:

957 | 958 |
http://images.google.com/images?num=30&amp;q=larry+bird
 959 | 
960 | 961 |

in your anchor tag href attribute. Needless to say, this is easy to 962 | forget, and is probably the single most common source of HTML validation 963 | errors in otherwise well-marked-up web sites.

964 | 965 |

Markdown allows you to use these characters naturally, taking care of 966 | all the necessary escaping for you. If you use an ampersand as part of 967 | an HTML entity, it remains unchanged; otherwise it will be translated 968 | into &amp;.

969 | 970 |

So, if you want to include a copyright symbol in your article, you can write:

971 | 972 |
&copy;
 973 | 
974 | 975 |

and Markdown will leave it alone. But if you write:

976 | 977 |
AT&T
 978 | 
979 | 980 |

Markdown will translate it to:

981 | 982 |
AT&amp;T
 983 | 
984 | 985 |

Similarly, because Markdown supports inline HTML, if you use 986 | angle brackets as delimiters for HTML tags, Markdown will treat them as 987 | such. But if you write:

988 | 989 |
4 < 5
 990 | 
991 | 992 |

Markdown will translate it to:

993 | 994 |
4 &lt; 5
 995 | 
996 | 997 |

However, inside Markdown code spans and blocks, angle brackets and 998 | ampersands are always encoded automatically. This makes it easy to use 999 | Markdown to write about HTML code. (As opposed to raw HTML, which is a 1000 | terrible format for writing about HTML syntax, because every single < 1001 | and & in your example code needs to be escaped.)

1002 | 1003 |
1004 | 1005 |

Block Elements

1006 | 1007 |

Paragraphs and Line Breaks

1008 | 1009 |

A paragraph is simply one or more consecutive lines of text, separated 1010 | by one or more blank lines. (A blank line is any line that looks like a 1011 | blank line -- a line containing nothing but spaces or tabs is considered 1012 | blank.) Normal paragraphs should not be intended with spaces or tabs.

1013 | 1014 |

The implication of the "one or more consecutive lines of text" rule is 1015 | that Markdown supports "hard-wrapped" text paragraphs. This differs 1016 | significantly from most other text-to-HTML formatters (including Movable 1017 | Type's "Convert Line Breaks" option) which translate every line break 1018 | character in a paragraph into a <br /> tag.

1019 | 1020 |

When you do want to insert a <br /> break tag using Markdown, you 1021 | end a line with two or more spaces, then type return.

1022 | 1023 |

Yes, this takes a tad more effort to create a <br />, but a simplistic 1024 | "every line break is a <br />" rule wouldn't work for Markdown. 1025 | Markdown's email-style [blockquoting][bq] and multi-paragraph [list items][l] 1026 | work best -- and look better -- when you format them with hard breaks.

1027 | 1028 |

[bq]: #blockquote 1029 | [l]: #list

1030 | 1031 |

Headers

1032 | 1033 |

Markdown supports two styles of headers, Setext and [atx] [2].

1034 | 1035 |

Setext-style headers are "underlined" using equal signs (for first-level 1036 | headers) and dashes (for second-level headers). For example:

1037 | 1038 |
This is an H1
1039 | =============
1040 | 
1041 | This is an H2
1042 | -------------
1043 | 
1044 | 1045 |

Any number of underlining ='s or -'s will work.

1046 | 1047 |

Atx-style headers use 1-6 hash characters at the start of the line, 1048 | corresponding to header levels 1-6. For example:

1049 | 1050 |
# This is an H1
1051 | 
1052 | ## This is an H2
1053 | 
1054 | ###### This is an H6
1055 | 
1056 | 1057 |

Optionally, you may "close" atx-style headers. This is purely 1058 | cosmetic -- you can use this if you think it looks better. The 1059 | closing hashes don't even need to match the number of hashes 1060 | used to open the header. (The number of opening hashes 1061 | determines the header level.) :

1062 | 1063 |
# This is an H1 #
1064 | 
1065 | ## This is an H2 ##
1066 | 
1067 | ### This is an H3 ######
1068 | 
1069 | 1070 |

Blockquotes

1071 | 1072 |

Markdown uses email-style > characters for blockquoting. If you're 1073 | familiar with quoting passages of text in an email message, then you 1074 | know how to create a blockquote in Markdown. It looks best if you hard 1075 | wrap the text and put a > before every line:

1076 | 1077 |
> This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet,
1078 | > consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus.
1079 | > Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus.
1080 | >
1081 | > Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse
1082 | > id sem consectetuer libero luctus adipiscing.
1083 | 
1084 | 1085 |

Markdown allows you to be lazy and only put the > before the first 1086 | line of a hard-wrapped paragraph:

1087 | 1088 |
> This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet,
1089 | consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus.
1090 | Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus.
1091 | 
1092 | > Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse
1093 | id sem consectetuer libero luctus adipiscing.
1094 | 
1095 | 1096 |

Blockquotes can be nested (i.e. a blockquote-in-a-blockquote) by 1097 | adding additional levels of >:

1098 | 1099 |
> This is the first level of quoting.
1100 | >
1101 | > > This is nested blockquote.
1102 | >
1103 | > Back to the first level.
1104 | 
1105 | 1106 |

Blockquotes can contain other Markdown elements, including headers, lists, 1107 | and code blocks:

1108 | 1109 |
> ## This is a header.
1110 | >
1111 | > 1.   This is the first list item.
1112 | > 2.   This is the second list item.
1113 | >
1114 | > Here's some example code:
1115 | >
1116 | >     return shell_exec("echo $input | $markdown_script");
1117 | 
1118 | 1119 |

Any decent text editor should make email-style quoting easy. For 1120 | example, with BBEdit, you can make a selection and choose Increase 1121 | Quote Level from the Text menu.

1122 | 1123 |

Lists

1124 | 1125 |

Markdown supports ordered (numbered) and unordered (bulleted) lists.

1126 | 1127 |

Unordered lists use asterisks, pluses, and hyphens -- interchangably 1128 | -- as list markers:

1129 | 1130 |
*   Red
1131 | *   Green
1132 | *   Blue
1133 | 
1134 | 1135 |

is equivalent to:

1136 | 1137 |
+   Red
1138 | +   Green
1139 | +   Blue
1140 | 
1141 | 1142 |

and:

1143 | 1144 |
-   Red
1145 | -   Green
1146 | -   Blue
1147 | 
1148 | 1149 |

Ordered lists use numbers followed by periods:

1150 | 1151 |
1.  Bird
1152 | 2.  McHale
1153 | 3.  Parish
1154 | 
1155 | 1156 |

It's important to note that the actual numbers you use to mark the 1157 | list have no effect on the HTML output Markdown produces. The HTML 1158 | Markdown produces from the above list is:

1159 | 1160 |
<ol>
1161 | <li>Bird</li>
1162 | <li>McHale</li>
1163 | <li>Parish</li>
1164 | </ol>
1165 | 
1166 | 1167 |

If you instead wrote the list in Markdown like this:

1168 | 1169 |
1.  Bird
1170 | 1.  McHale
1171 | 1.  Parish
1172 | 
1173 | 1174 |

or even:

1175 | 1176 |
3. Bird
1177 | 1. McHale
1178 | 8. Parish
1179 | 
1180 | 1181 |

you'd get the exact same HTML output. The point is, if you want to, 1182 | you can use ordinal numbers in your ordered Markdown lists, so that 1183 | the numbers in your source match the numbers in your published HTML. 1184 | But if you want to be lazy, you don't have to.

1185 | 1186 |

If you do use lazy list numbering, however, you should still start the 1187 | list with the number 1. At some point in the future, Markdown may support 1188 | starting ordered lists at an arbitrary number.

1189 | 1190 |

List markers typically start at the left margin, but may be indented by 1191 | up to three spaces. List markers must be followed by one or more spaces 1192 | or a tab.

1193 | 1194 |

To make lists look nice, you can wrap items with hanging indents:

1195 | 1196 |
*   Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
1197 |     Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi,
1198 |     viverra nec, fringilla in, laoreet vitae, risus.
1199 | *   Donec sit amet nisl. Aliquam semper ipsum sit amet velit.
1200 |     Suspendisse id sem consectetuer libero luctus adipiscing.
1201 | 
1202 | 1203 |

But if you want to be lazy, you don't have to:

1204 | 1205 |
*   Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
1206 | Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi,
1207 | viverra nec, fringilla in, laoreet vitae, risus.
1208 | *   Donec sit amet nisl. Aliquam semper ipsum sit amet velit.
1209 | Suspendisse id sem consectetuer libero luctus adipiscing.
1210 | 
1211 | 1212 |

If list items are separated by blank lines, Markdown will wrap the 1213 | items in <p> tags in the HTML output. For example, this input:

1214 | 1215 |
*   Bird
1216 | *   Magic
1217 | 
1218 | 1219 |

will turn into:

1220 | 1221 |
<ul>
1222 | <li>Bird</li>
1223 | <li>Magic</li>
1224 | </ul>
1225 | 
1226 | 1227 |

But this:

1228 | 1229 |
*   Bird
1230 | 
1231 | *   Magic
1232 | 
1233 | 1234 |

will turn into:

1235 | 1236 |
<ul>
1237 | <li><p>Bird</p></li>
1238 | <li><p>Magic</p></li>
1239 | </ul>
1240 | 
1241 | 1242 |

List items may consist of multiple paragraphs. Each subsequent 1243 | paragraph in a list item must be intended by either 4 spaces 1244 | or one tab:

1245 | 1246 |
1.  This is a list item with two paragraphs. Lorem ipsum dolor
1247 |     sit amet, consectetuer adipiscing elit. Aliquam hendrerit
1248 |     mi posuere lectus.
1249 | 
1250 |     Vestibulum enim wisi, viverra nec, fringilla in, laoreet
1251 |     vitae, risus. Donec sit amet nisl. Aliquam semper ipsum
1252 |     sit amet velit.
1253 | 
1254 | 2.  Suspendisse id sem consectetuer libero luctus adipiscing.
1255 | 
1256 | 1257 |

It looks nice if you indent every line of the subsequent 1258 | paragraphs, but here again, Markdown will allow you to be 1259 | lazy:

1260 | 1261 |
*   This is a list item with two paragraphs.
1262 | 
1263 |     This is the second paragraph in the list item. You're
1264 | only required to indent the first line. Lorem ipsum dolor
1265 | sit amet, consectetuer adipiscing elit.
1266 | 
1267 | *   Another item in the same list.
1268 | 
1269 | 1270 |

To put a blockquote within a list item, the blockquote's > 1271 | delimiters need to be indented:

1272 | 1273 |
*   A list item with a blockquote:
1274 | 
1275 |     > This is a blockquote
1276 |     > inside a list item.
1277 | 
1278 | 1279 |

To put a code block within a list item, the code block needs 1280 | to be indented twice -- 8 spaces or two tabs:

1281 | 1282 |
*   A list item with a code block:
1283 | 
1284 |         <code goes here>
1285 | 
1286 | 1287 |

It's worth noting that it's possible to trigger an ordered list by 1288 | accident, by writing something like this:

1289 | 1290 |
1986. What a great season.
1291 | 
1292 | 1293 |

In other words, a number-period-space sequence at the beginning of a 1294 | line. To avoid this, you can backslash-escape the period:

1295 | 1296 |
1986\. What a great season.
1297 | 
1298 | 1299 |

Code Blocks

1300 | 1301 |

Pre-formatted code blocks are used for writing about programming or 1302 | markup source code. Rather than forming normal paragraphs, the lines 1303 | of a code block are interpreted literally. Markdown wraps a code block 1304 | in both <pre> and <code> tags.

1305 | 1306 |

To produce a code block in Markdown, simply indent every line of the 1307 | block by at least 4 spaces or 1 tab. For example, given this input:

1308 | 1309 |
This is a normal paragraph:
1310 | 
1311 |     This is a code block.
1312 | 
1313 | 1314 |

Markdown will generate:

1315 | 1316 |
<p>This is a normal paragraph:</p>
1317 | 
1318 | <pre><code>This is a code block.
1319 | </code></pre>
1320 | 
1321 | 1322 |

One level of indentation -- 4 spaces or 1 tab -- is removed from each 1323 | line of the code block. For example, this:

1324 | 1325 |
Here is an example of AppleScript:
1326 | 
1327 |     tell application "Foo"
1328 |         beep
1329 |     end tell
1330 | 
1331 | 1332 |

will turn into:

1333 | 1334 |
<p>Here is an example of AppleScript:</p>
1335 | 
1336 | <pre><code>tell application "Foo"
1337 |     beep
1338 | end tell
1339 | </code></pre>
1340 | 
1341 | 1342 |

A code block continues until it reaches a line that is not indented 1343 | (or the end of the article).

1344 | 1345 |

Within a code block, ampersands (&) and angle brackets (< and >) 1346 | are automatically converted into HTML entities. This makes it very 1347 | easy to include example HTML source code using Markdown -- just paste 1348 | it and indent it, and Markdown will handle the hassle of encoding the 1349 | ampersands and angle brackets. For example, this:

1350 | 1351 |
    <div class="footer">
1352 |         &copy; 2004 Foo Corporation
1353 |     </div>
1354 | 
1355 | 1356 |

will turn into:

1357 | 1358 |
<pre><code>&lt;div class="footer"&gt;
1359 |     &amp;copy; 2004 Foo Corporation
1360 | &lt;/div&gt;
1361 | </code></pre>
1362 | 
1363 | 1364 |

Regular Markdown syntax is not processed within code blocks. E.g., 1365 | asterisks are just literal asterisks within a code block. This means 1366 | it's also easy to use Markdown to write about Markdown's own syntax.

1367 | 1368 |

Horizontal Rules

1369 | 1370 |

You can produce a horizontal rule tag (<hr />) by placing three or 1371 | more hyphens, asterisks, or underscores on a line by themselves. If you 1372 | wish, you may use spaces between the hyphens or asterisks. Each of the 1373 | following lines will produce a horizontal rule:

1374 | 1375 |
* * *
1376 | 
1377 | ***
1378 | 
1379 | *****
1380 | 
1381 | - - -
1382 | 
1383 | ---------------------------------------
1384 | 
1385 | _ _ _
1386 | 
1387 | 1388 |
1389 | 1390 |

Span Elements

1391 | 1392 | 1393 | 1394 |

Markdown supports two style of links: inline and reference.

1395 | 1396 |

In both styles, the link text is delimited by [square brackets].

1397 | 1398 |

To create an inline link, use a set of regular parentheses immediately 1399 | after the link text's closing square bracket. Inside the parentheses, 1400 | put the URL where you want the link to point, along with an optional 1401 | title for the link, surrounded in quotes. For example:

1402 | 1403 |
This is [an example](http://example.com/ "Title") inline link.
1404 | 
1405 | [This link](http://example.net/) has no title attribute.
1406 | 
1407 | 1408 |

Will produce:

1409 | 1410 |
<p>This is <a href="http://example.com/" title="Title">
1411 | an example</a> inline link.</p>
1412 | 
1413 | <p><a href="http://example.net/">This link</a> has no
1414 | title attribute.</p>
1415 | 
1416 | 1417 |

If you're referring to a local resource on the same server, you can 1418 | use relative paths:

1419 | 1420 |
See my [About](/about/) page for details.
1421 | 
1422 | 1423 |

Reference-style links use a second set of square brackets, inside 1424 | which you place a label of your choosing to identify the link:

1425 | 1426 |
This is [an example][id] reference-style link.
1427 | 
1428 | 1429 |

You can optionally use a space to separate the sets of brackets:

1430 | 1431 |
This is [an example] [id] reference-style link.
1432 | 
1433 | 1434 |

Then, anywhere in the document, you define your link label like this, 1435 | on a line by itself:

1436 | 1437 |
[id]: http://example.com/  "Optional Title Here"
1438 | 
1439 | 1440 |

That is:

1441 | 1442 | 1451 | 1452 |

The link URL may, optionally, be surrounded by angle brackets:

1453 | 1454 |
[id]: <http://example.com/>  "Optional Title Here"
1455 | 
1456 | 1457 |

You can put the title attribute on the next line and use extra spaces 1458 | or tabs for padding, which tends to look better with longer URLs:

1459 | 1460 |
[id]: http://example.com/longish/path/to/resource/here
1461 |     "Optional Title Here"
1462 | 
1463 | 1464 |

Link definitions are only used for creating links during Markdown 1465 | processing, and are stripped from your document in the HTML output.

1466 | 1467 |

Link definition names may constist of letters, numbers, spaces, and punctuation -- but they are not case sensitive. E.g. these two links:

1468 | 1469 |
[link text][a]
1470 | [link text][A]
1471 | 
1472 | 1473 |

are equivalent.

1474 | 1475 |

The implicit link name shortcut allows you to omit the name of the 1476 | link, in which case the link text itself is used as the name. 1477 | Just use an empty set of square brackets -- e.g., to link the word 1478 | "Google" to the google.com web site, you could simply write:

1479 | 1480 |
[Google][]
1481 | 
1482 | 1483 |

And then define the link:

1484 | 1485 |
[Google]: http://google.com/
1486 | 
1487 | 1488 |

Because link names may contain spaces, this shortcut even works for 1489 | multiple words in the link text:

1490 | 1491 |
Visit [Daring Fireball][] for more information.
1492 | 
1493 | 1494 |

And then define the link:

1495 | 1496 |
[Daring Fireball]: http://daringfireball.net/
1497 | 
1498 | 1499 |

Link definitions can be placed anywhere in your Markdown document. I 1500 | tend to put them immediately after each paragraph in which they're 1501 | used, but if you want, you can put them all at the end of your 1502 | document, sort of like footnotes.

1503 | 1504 |

Here's an example of reference links in action:

1505 | 1506 |
I get 10 times more traffic from [Google] [1] than from
1507 | [Yahoo] [2] or [MSN] [3].
1508 | 
1509 |   [1]: http://google.com/        "Google"
1510 |   [2]: http://search.yahoo.com/  "Yahoo Search"
1511 |   [3]: http://search.msn.com/    "MSN Search"
1512 | 
1513 | 1514 |

Using the implicit link name shortcut, you could instead write:

1515 | 1516 |
I get 10 times more traffic from [Google][] than from
1517 | [Yahoo][] or [MSN][].
1518 | 
1519 |   [google]: http://google.com/        "Google"
1520 |   [yahoo]:  http://search.yahoo.com/  "Yahoo Search"
1521 |   [msn]:    http://search.msn.com/    "MSN Search"
1522 | 
1523 | 1524 |

Both of the above examples will produce the following HTML output:

1525 | 1526 |
<p>I get 10 times more traffic from <a href="http://google.com/"
1527 | title="Google">Google</a> than from
1528 | <a href="http://search.yahoo.com/" title="Yahoo Search">Yahoo</a>
1529 | or <a href="http://search.msn.com/" title="MSN Search">MSN</a>.</p>
1530 | 
1531 | 1532 |

For comparison, here is the same paragraph written using 1533 | Markdown's inline link style:

1534 | 1535 |
I get 10 times more traffic from [Google](http://google.com/ "Google")
1536 | than from [Yahoo](http://search.yahoo.com/ "Yahoo Search") or
1537 | [MSN](http://search.msn.com/ "MSN Search").
1538 | 
1539 | 1540 |

The point of reference-style links is not that they're easier to 1541 | write. The point is that with reference-style links, your document 1542 | source is vastly more readable. Compare the above examples: using 1543 | reference-style links, the paragraph itself is only 81 characters 1544 | long; with inline-style links, it's 176 characters; and as raw HTML, 1545 | it's 234 characters. In the raw HTML, there's more markup than there 1546 | is text.

1547 | 1548 |

With Markdown's reference-style links, a source document much more 1549 | closely resembles the final output, as rendered in a browser. By 1550 | allowing you to move the markup-related metadata out of the paragraph, 1551 | you can add links without interrupting the narrative flow of your 1552 | prose.

1553 | 1554 |

Emphasis

1555 | 1556 |

Markdown treats asterisks (*) and underscores (_) as indicators of 1557 | emphasis. Text wrapped with one * or _ will be wrapped with an 1558 | HTML <em> tag; double *'s or _'s will be wrapped with an HTML 1559 | <strong> tag. E.g., this input:

1560 | 1561 |
*single asterisks*
1562 | 
1563 | _single underscores_
1564 | 
1565 | **double asterisks**
1566 | 
1567 | __double underscores__
1568 | 
1569 | 1570 |

will produce:

1571 | 1572 |
<em>single asterisks</em>
1573 | 
1574 | <em>single underscores</em>
1575 | 
1576 | <strong>double asterisks</strong>
1577 | 
1578 | <strong>double underscores</strong>
1579 | 
1580 | 1581 |

You can use whichever style you prefer; the lone restriction is that 1582 | the same character must be used to open and close an emphasis span.

1583 | 1584 |

Emphasis can be used in the middle of a word:

1585 | 1586 |
un*fucking*believable
1587 | 
1588 | 1589 |

But if you surround an * or _ with spaces, it'll be treated as a 1590 | literal asterisk or underscore.

1591 | 1592 |

To produce a literal asterisk or underscore at a position where it 1593 | would otherwise be used as an emphasis delimiter, you can backslash 1594 | escape it:

1595 | 1596 |
\*this text is surrounded by literal asterisks\*
1597 | 
1598 | 1599 |

Code

1600 | 1601 |

To indicate a span of code, wrap it with backtick quotes (`). 1602 | Unlike a pre-formatted code block, a code span indicates code within a 1603 | normal paragraph. For example:

1604 | 1605 |
Use the `printf()` function.
1606 | 
1607 | 1608 |

will produce:

1609 | 1610 |
<p>Use the <code>printf()</code> function.</p>
1611 | 
1612 | 1613 |

To include a literal backtick character within a code span, you can use 1614 | multiple backticks as the opening and closing delimiters:

1615 | 1616 |
``There is a literal backtick (`) here.``
1617 | 
1618 | 1619 |

which will produce this:

1620 | 1621 |
<p><code>There is a literal backtick (`) here.</code></p>
1622 | 
1623 | 1624 |

The backtick delimiters surrounding a code span may include spaces -- 1625 | one after the opening, one before the closing. This allows you to place 1626 | literal backtick characters at the beginning or end of a code span:

1627 | 1628 |
A single backtick in a code span: `` ` ``
1629 | 
1630 | A backtick-delimited string in a code span: `` `foo` ``
1631 | 
1632 | 1633 |

will produce:

1634 | 1635 |
<p>A single backtick in a code span: <code>`</code></p>
1636 | 
1637 | <p>A backtick-delimited string in a code span: <code>`foo`</code></p>
1638 | 
1639 | 1640 |

With a code span, ampersands and angle brackets are encoded as HTML 1641 | entities automatically, which makes it easy to include example HTML 1642 | tags. Markdown will turn this:

1643 | 1644 |
Please don't use any `<blink>` tags.
1645 | 
1646 | 1647 |

into:

1648 | 1649 |
<p>Please don't use any <code>&lt;blink&gt;</code> tags.</p>
1650 | 
1651 | 1652 |

You can write this:

1653 | 1654 |
`&#8212;` is the decimal-encoded equivalent of `&mdash;`.
1655 | 
1656 | 1657 |

to produce:

1658 | 1659 |
<p><code>&amp;#8212;</code> is the decimal-encoded
1660 | equivalent of <code>&amp;mdash;</code>.</p>
1661 | 
1662 | 1663 |

Images

1664 | 1665 |

Admittedly, it's fairly difficult to devise a "natural" syntax for 1666 | placing images into a plain text document format.

1667 | 1668 |

Markdown uses an image syntax that is intended to resemble the syntax 1669 | for links, allowing for two styles: inline and reference.

1670 | 1671 |

Inline image syntax looks like this:

1672 | 1673 |
![Alt text](/path/to/img.jpg)
1674 | 
1675 | ![Alt text](/path/to/img.jpg "Optional title")
1676 | 
1677 | 1678 |

That is:

1679 | 1680 | 1688 | 1689 |

Reference-style image syntax looks like this:

1690 | 1691 |
![Alt text][id]
1692 | 
1693 | 1694 |

Where "id" is the name of a defined image reference. Image references 1695 | are defined using syntax identical to link references:

1696 | 1697 |
[id]: url/to/image  "Optional title attribute"
1698 | 
1699 | 1700 |

As of this writing, Markdown has no syntax for specifying the 1701 | dimensions of an image; if this is important to you, you can simply 1702 | use regular HTML <img> tags.

1703 | 1704 |
1705 | 1706 |

Miscellaneous

1707 | 1708 | 1709 | 1710 |

Markdown supports a shortcut style for creating "automatic" links for URLs and email addresses: simply surround the URL or email address with angle brackets. What this means is that if you want to show the actual text of a URL or email address, and also have it be a clickable link, you can do this:

1711 | 1712 |
<http://example.com/>
1713 | 
1714 | 1715 |

Markdown will turn this into:

1716 | 1717 |
<a href="http://example.com/">http://example.com/</a>
1718 | 
1719 | 1720 |

Automatic links for email addresses work similarly, except that 1721 | Markdown will also perform a bit of randomized decimal and hex 1722 | entity-encoding to help obscure your address from address-harvesting 1723 | spambots. For example, Markdown will turn this:

1724 | 1725 |
<address@example.com>
1726 | 
1727 | 1728 |

into something like this:

1729 | 1730 |
<a href="&#x6D;&#x61;i&#x6C;&#x74;&#x6F;:&#x61;&#x64;&#x64;&#x72;&#x65;
1731 | &#115;&#115;&#64;&#101;&#120;&#x61;&#109;&#x70;&#x6C;e&#x2E;&#99;&#111;
1732 | &#109;">&#x61;&#x64;&#x64;&#x72;&#x65;&#115;&#115;&#64;&#101;&#120;&#x61;
1733 | &#109;&#x70;&#x6C;e&#x2E;&#99;&#111;&#109;</a>
1734 | 
1735 | 1736 |

which will render in a browser as a clickable link to "address@example.com".

1737 | 1738 |

(This sort of entity-encoding trick will indeed fool many, if not 1739 | most, address-harvesting bots, but it definitely won't fool all of 1740 | them. It's better than nothing, but an address published in this way 1741 | will probably eventually start receiving spam.)

1742 | 1743 |

Backslash Escapes

1744 | 1745 |

Markdown allows you to use backslash escapes to generate literal 1746 | characters which would otherwise have special meaning in Markdown's 1747 | formatting syntax. For example, if you wanted to surround a word with 1748 | literal asterisks (instead of an HTML <em> tag), you can backslashes 1749 | before the asterisks, like this:

1750 | 1751 |
\*literal asterisks\*
1752 | 
1753 | 1754 |

Markdown provides backslash escapes for the following characters:

1755 | 1756 |
\   backslash
1757 | `   backtick
1758 | *   asterisk
1759 | _   underscore
1760 | {}  curly braces
1761 | []  square brackets
1762 | ()  parentheses
1763 | #   hash mark
1764 | +   plus sign
1765 | -   minus sign (hyphen)
1766 | .   dot
1767 | !   exclamation mark
1768 | 
1769 | 1770 |

Foo [bar][].

1771 | 1772 |

Foo bar.

1773 | 1774 |

[bar]: /url/ "Title with "quotes" inside"

1775 | 1776 |

This is the [simple case].

1777 | 1778 |

[simple case]: /simple

1779 | 1780 |

This one has a [line 1781 | break].

1782 | 1783 |

This one has a [line 1784 | break] with a line-ending space.

1785 | 1786 |

[line break]: /foo

1787 | 1788 |

[this] [that] and the [other]

1789 | 1790 |

[this]: /this 1791 | [that]: /that 1792 | [other]: /other

1793 | 1794 |

Here's a simple block:

1795 | 1796 |
1797 | foo 1798 |
1799 | 1800 |

This should be a code block, though:

1801 | 1802 |
<div>
1803 |     foo
1804 | </div>
1805 | 
1806 | 1807 |

As should this:

1808 | 1809 |
<div>foo</div>
1810 | 
1811 | 1812 |

Now, nested:

1813 | 1814 |
1815 |
1816 |
1817 | foo 1818 |
1819 |
1820 |
1821 | 1822 |

This should just be an HTML comment:

1823 | 1824 | 1825 | 1826 |

Multiline:

1827 | 1828 | 1829 | 1830 |

Code block:

1831 | 1832 |
<!-- Comment -->
1833 | 
1834 | 1835 |

Just plain comment, with trailing spaces on the line:

1836 | 1837 | 1838 | 1839 |

Code:

1840 | 1841 |
<hr />
1842 | 
1843 | 1844 |

Hr's:

1845 | 1846 |
1847 | 1848 |
1849 | 1850 |
1851 | 1852 |
1853 | 1854 |
1855 | 1856 |
1857 | 1858 |
1859 | 1860 |
1861 | 1862 |
1863 | 1864 |
var gulp = require('gulp');
1865 | var myth = require('gulp-myth');
1866 | 
1867 | gulp.task('default', function () {
1868 |     return gulp.src('src/app.css')
1869 |         .pipe(myth())
1870 |         .pipe(gulp.dest('dist'));
1871 | });
1872 |
1873 | Fork me on GitHub 1874 | 1875 | 1876 | -------------------------------------------------------------------------------- /license: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) Sindre Sorhus (https://sindresorhus.com) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | 7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 10 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "markdown-css-smartisan", 3 | "version": "0.0.2", 4 | "description": "Markdown theme style css for smartisan", 5 | "license": "MIT", 6 | "repository": "https://github.com/nihaojob/github-markdown-css-smartisan", 7 | "homepage": "https://github.com/nihaojob/github-markdown-css-smartisan", 8 | "funding": "", 9 | "gitHooks": { 10 | "pre-commit": "lint-staged" 11 | }, 12 | "lint-staged": { 13 | "*.{vue,css,less}": [ 14 | "stylelint --fix" 15 | ] 16 | }, 17 | "author": { 18 | "name": "秦少卫", 19 | "email": "nihaojob@163.dom", 20 | "url": "https://github.com/nihaojob" 21 | }, 22 | "main": "github-markdown.css", 23 | "scripts": { 24 | "make": "github-markdown-css > github-markdown.css" 25 | }, 26 | "files": [ 27 | "github-markdown.css", 28 | "bg.jpg" 29 | ], 30 | "keywords": [ 31 | "browser", 32 | "github", 33 | "markdown", 34 | "md", 35 | "css", 36 | "style", 37 | "stylesheet" 38 | ], 39 | "devDependencies": { 40 | "generate-github-markdown-css": "^4.0.0", 41 | "lint-staged": "^10.5.4", 42 | "stylelint": "^13.12.0", 43 | "stylelint-config-rational-order": "^0.1.2", 44 | "stylelint-config-standard": "^21.0.0" 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | # markdown-css-smartisan 2 | 3 | > 一个基于锤子便签的markdown主题。 4 | 5 | [体验编辑器](https://nihaojob.github.io/markdown-css-smartisan/examples/index.html) 6 | [](https://nihaojob.github.io/markdown-css-smartisan/examples/index.html) 7 | 8 | Markdown 主题 9 | [](https://nihaojob.github.io/markdown-css-smartisan) 10 | 11 | 12 | ## [Demo](https://nihaojob.github.io/markdown-css-smartisan) 13 | 可以[体验编辑器](https://nihaojob.github.io/markdown-css-smartisan/examples/index.html) 14 | , 或[预览](https://nihaojob.github.io/markdown-css-smartisan)我们的主题,和[锤子便签](https://yun.smartisan.com/apps/note/md.html)对比一下。 15 | 16 | ## Install 17 | 18 | Download [manually](https://github.com/nihaojob/https://nihaojob.github.io/markdown-css-smartisan/blob/main/github-markdown.css), from [CDNJS](https://cdn.jsdelivr.net/npm/markdown-css-smartisan/github-markdown.css), or with npm or yarn: 19 | 20 | ```shell 21 | # use npm 22 | $ npm install markdown-css-smartisan 23 | # use yarn 24 | $ yarn add markdown-css-smartisan 25 | ``` 26 | 27 | ## Usage 28 | 29 | 30 | 31 | ```bash 32 | import 'markdown-css-smartisan' 33 | ``` 34 | Import the `github-markdown.css` file and add a `markdown-body` class to the container of your rendered Markdown and set a width for it. 35 | 36 | ```html 37 | 38 | 39 | 46 |
47 |

Unicorns

48 |

All the things

49 |
50 | ``` 51 | 52 | If you want code syntax highlighted, use GitHub Flavored Markdown rendered from [GitHub's `/markdown` API](https://docs.github.com/en/free-pro-team@latest/rest/reference/markdown). 53 | 54 | ## How 55 | 56 | See [`generate-github-markdown-css`](https://github.com/sindresorhus/generate-github-markdown-css) for how it's generated and ability to generate your own. 57 | 58 | 61 | -------------------------------------------------------------------------------- /yarn-error.log: -------------------------------------------------------------------------------- 1 | Arguments: 2 | /usr/local/bin/node /usr/local/Cellar/yarn/1.22.10/libexec/bin/yarn.js 3 | 4 | PATH: 5 | /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin 6 | 7 | Yarn version: 8 | 1.22.10 9 | 10 | Node version: 11 | 14.14.0 12 | 13 | Platform: 14 | darwin x64 15 | 16 | Trace: 17 | Error: connect EADDRNOTAVAIL 10.0.0.165:80 - Local (10.5.240.116:59993) 18 | at internalConnect (net.js:921:16) 19 | at defaultTriggerAsyncIdScope (internal/async_hooks.js:429:12) 20 | at emitLookup (net.js:1064:9) 21 | at /usr/local/Cellar/yarn/1.22.10/libexec/lib/cli.js:107543:29 22 | at /usr/local/Cellar/yarn/1.22.10/libexec/lib/cli.js:107389:25 23 | at RawTask.module.exports.RawTask.call (/usr/local/Cellar/yarn/1.22.10/libexec/lib/cli.js:83614:19) 24 | at flush (/usr/local/Cellar/yarn/1.22.10/libexec/lib/cli.js:83696:29) 25 | at processTicksAndRejections (internal/process/task_queues.js:75:11) 26 | 27 | npm manifest: 28 | { 29 | "name": "github-markdown-css", 30 | "version": "4.0.0", 31 | "description": "The minimal amount of CSS to replicate the GitHub Markdown style", 32 | "license": "MIT", 33 | "repository": "sindresorhus/github-markdown-css", 34 | "funding": "https://github.com/sponsors/sindresorhus", 35 | "author": { 36 | "name": "Sindre Sorhus", 37 | "email": "sindresorhus@gmail.com", 38 | "url": "https://sindresorhus.com" 39 | }, 40 | "main": "github-markdown.css", 41 | "scripts": { 42 | "make": "github-markdown-css > github-markdown.css" 43 | }, 44 | "files": [ 45 | "github-markdown.css" 46 | ], 47 | "keywords": [ 48 | "browser", 49 | "github", 50 | "markdown", 51 | "md", 52 | "css", 53 | "style", 54 | "stylesheet" 55 | ], 56 | "devDependencies": { 57 | "generate-github-markdown-css": "^4.0.0" 58 | } 59 | } 60 | 61 | yarn manifest: 62 | No manifest 63 | 64 | Lockfile: 65 | No lockfile 66 | --------------------------------------------------------------------------------