|
21 | 21 | // @include https://gist.github.com/* |
22 | 22 | // ==/UserScript== |
23 | 23 |
|
| 24 | +// cSpell:ignore gollum, tooltipped, jssuggester, tabnav, facebox, msie |
24 | 25 | /* global unsafeWindow */ |
25 | 26 |
|
26 | 27 | (function(unsafeWindow) { |
|
570 | 571 | } |
571 | 572 |
|
572 | 573 | var codeSyntaxTop = ["JavaScript", "Java", "Ruby", "PHP", "Python", "CSS", "C++", "C#", "C", "HTML"]; // https://github.com/blog/2047-language-trends-on-github |
| 574 | + /* cSpell: disable */ |
573 | 575 | var codeSyntaxList = ["ABAP", "abl", "aconf", "ActionScript", "actionscript 3", |
574 | 576 | "actionscript3", "Ada", "ada2005", "ada95", "advpl", "Agda", "ags", |
575 | 577 | "AGS Script", "ahk", "Alloy", "AMPL", "Ant Build System", "ANTLR", |
|
656 | 658 | "XS", "xsd", "xsl", "XSLT", "xten", "Xtend", "Yacc", "YAML", "yml", |
657 | 659 | "Zephir", "Zimpl", "zsh" |
658 | 660 | ]; // https://github.com/jerone/UserScripts/issues/18 |
| 661 | + /* cSpell: enable */ |
659 | 662 | var codeSyntaxes = [].concat(codeSyntaxTop, codeSyntaxList).filter(function(a, b, c) { |
660 | 663 | return c.indexOf(a) === b; |
661 | 664 | }); |
|
1011 | 1014 | /* |
1012 | 1015 | * to-markdown - an HTML to Markdown converter |
1013 | 1016 | * Copyright 2011, Dom Christie |
1014 | | - * Licenced under the MIT licence |
| 1017 | + * Licensed under the MIT license |
1015 | 1018 | * Source: https://github.com/domchristie/to-markdown |
1016 | 1019 | * |
1017 | 1020 | * Code is altered: |
1018 | 1021 | * - Added task list support: https://github.com/domchristie/to-markdown/pull/62 |
1019 | | - * - He dependecy is removed |
| 1022 | + * - He dependency is removed |
1020 | 1023 | */ |
1021 | 1024 | var toMarkdown = function(string) { |
1022 | 1025 |
|
|
1181 | 1184 | function cleanUp(string) { |
1182 | 1185 | string = string.replace(/^[\t\r\n]+|[\t\r\n]+$/g, ''); // trim leading/trailing whitespace |
1183 | 1186 | string = string.replace(/\n\s+\n/g, '\n\n'); |
1184 | | - string = string.replace(/\n{3,}/g, '\n\n'); // limit consecutive linebreaks to 2 |
| 1187 | + string = string.replace(/\n{3,}/g, '\n\n'); // limit consecutive line-breaks to 2 |
1185 | 1188 | return string; |
1186 | 1189 | } |
1187 | 1190 |
|
|
0 commit comments