├── wrap-fix.css ├── README.md ├── line-number-wrap-fix.js ├── themes ├── prism-hopscotch.css ├── prism-okaidia.css ├── prism-atom-dark.css ├── prism-ghcolors.css ├── prism-default.css ├── prism-base16-ateliersulphurpool.light.css ├── prism-cb.css ├── prism-xonokai.css ├── prism-pojoaque.css └── prism-coy.css ├── Plugin.php └── prism.js /wrap-fix.css: -------------------------------------------------------------------------------- 1 | pre[class*="language-"] code 2 | { 3 | white-space: pre-wrap; 4 | word-wrap: break-word; 5 | } 6 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## 注意 ## 2 | 插件文件夹名称必须是Prismjs,否则不能生效。 3 | 4 | ## 用法 ## 5 | 使用方法很簡單,只要在\`\`\`或者\`之後輸入相應的語言即可,例如: 6 |
 7 | ```c#
 8 | Console.Write("Hello World!");
 9 | ```
10 | 
11 | 或者行內代碼: 12 |
13 | `js console.log("Hi!");`
14 | 
15 | 16 | ## 效果 ## 17 | ![block.png][1] 18 | ![inline.png][2] 19 | 20 | ## 後台參數 ## 21 | 後台可以修改的參數如下: 22 | 23 | ![settings.png][3] 24 | 25 | [1]: http://i.imgur.com/UslS8xP.png 26 | [2]: http://i.imgur.com/X7NDEHh.png 27 | [3]: http://i.imgur.com/4Tnrm9v.png 28 | -------------------------------------------------------------------------------- /line-number-wrap-fix.js: -------------------------------------------------------------------------------- 1 | function sizeLinebox(codebox) 2 | { 3 | var lines = codebox.innerHTML.split('\n'); 4 | codebox.innerHTML = codebox.innerHTML + '
'; 5 | var lnbox = codebox.getElementsByClassName('line-numbers-rows')[0]; 6 | var lnboxList = lnbox.children; 7 | var lnfix = document.getElementById('lnfix'); 8 | for (var j = 0; j < lines.length - 1; j++) 9 | { 10 | lnfix.innerHTML = lines[j]; 11 | if (lnfix.innerText == '') 12 | lnfix.innerHTML = ' '; 13 | var lnheight = lnfix.clientHeight; 14 | lnboxList[j].style.height = lnheight + 'px'; 15 | }; 16 | var node = document.getElementById('lnfix'); 17 | node.parentNode.removeChild(node); 18 | } 19 | 20 | function resizeBox() 21 | { 22 | var pres = document.getElementsByTagName('pre'); 23 | for (var i = 0; i < pres.length; i++) 24 | { 25 | if (pres[i].className.indexOf('language-') > -1) 26 | { 27 | var codes = pres[i].getElementsByTagName('code'); 28 | for (var j = 0; j < codes.length; j++) 29 | { 30 | sizeLinebox(codes[j]); 31 | }; 32 | } 33 | }; 34 | } 35 | 36 | window.addEventListener('resize', function() 37 | { 38 | resizeBox(); 39 | }); 40 | 41 | Prism.hooks.add('complete', function (env) 42 | { 43 | if (env.code.split('\n').length > 1) 44 | { 45 | for (var i = 0; i < Prism.hooks.all.complete.length - 1; i++) 46 | Prism.hooks.all.complete[i](env); 47 | sizeLinebox(env.element); 48 | } 49 | }); 50 | -------------------------------------------------------------------------------- /themes/prism-hopscotch.css: -------------------------------------------------------------------------------- 1 | @import url(http://fonts.googleapis.com/css?family=Fira+Mono); 2 | /* 3 | * Hopscotch 4 | * by Jan T. Sott 5 | * https://github.com/idleberg/Hopscotch 6 | * 7 | * This work is licensed under the Creative Commons CC0 1.0 Universal License 8 | */ 9 | 10 | code[class*="language-"], 11 | pre[class*="language-"] { 12 | color: #ffffff; 13 | font-family: "Fira Mono", Menlo, Monaco, "Lucida Console","Courier New", Courier, monospace; 14 | font-size: 16px; 15 | line-height: 1.375; 16 | direction: ltr; 17 | text-align: left; 18 | word-spacing: normal; 19 | 20 | -moz-tab-size: 4; 21 | -o-tab-size: 4; 22 | tab-size: 4; 23 | 24 | -webkit-hyphens: none; 25 | -moz-hyphens: none; 26 | -ms-hyphens: none; 27 | hyphens: none; 28 | white-space: pre; 29 | white-space: pre-wrap; 30 | word-break: break-all; 31 | word-wrap: break-word; 32 | background: #322931; 33 | color: #b9b5b8; 34 | } 35 | 36 | /* Code blocks */ 37 | pre[class*="language-"] { 38 | padding: 1em; 39 | margin: .5em 0; 40 | overflow: auto; 41 | } 42 | 43 | /* Inline code */ 44 | :not(pre) > code[class*="language-"] { 45 | padding: .1em; 46 | border-radius: .3em; 47 | } 48 | 49 | .token.comment, 50 | .token.prolog, 51 | .token.doctype, 52 | .token.cdata { 53 | color: #797379; 54 | } 55 | 56 | .token.punctuation { 57 | color: #b9b5b8; 58 | } 59 | 60 | .namespace { 61 | opacity: .7; 62 | } 63 | 64 | .token.null, 65 | .token.operator, 66 | .token.boolean, 67 | .token.number { 68 | color: #fd8b19; 69 | } 70 | .token.property { 71 | color: #fdcc59; 72 | } 73 | .token.tag { 74 | color: #1290bf; 75 | } 76 | .token.string { 77 | color: #149b93; 78 | } 79 | .token.selector { 80 | color: #c85e7c; 81 | } 82 | .token.attr-name { 83 | color: #fd8b19; 84 | } 85 | .token.entity, 86 | .token.url, 87 | .language-css .token.string, 88 | .style .token.string { 89 | color: #149b93; 90 | } 91 | 92 | .token.attr-value, 93 | .token.keyword, 94 | .token.control, 95 | .token.directive, 96 | .token.unit { 97 | color: #8fc13e; 98 | } 99 | 100 | .token.statement, 101 | .token.regex, 102 | .token.atrule { 103 | color: #149b93; 104 | } 105 | 106 | .token.placeholder, 107 | .token.variable { 108 | color: #1290bf; 109 | } 110 | 111 | .token.important { 112 | color: #dd464c; 113 | font-weight: bold; 114 | } 115 | 116 | .token.entity { 117 | cursor: help; 118 | } 119 | 120 | pre > code.highlight { 121 | outline: .4em solid red; 122 | outline-offset: .4em; 123 | } 124 | 125 | pre.line-numbers { 126 | position: relative; 127 | padding-left: 3.8em; 128 | counter-reset: linenumber; 129 | } 130 | 131 | pre.line-numbers > code { 132 | position: relative; 133 | } 134 | 135 | .line-numbers .line-numbers-rows { 136 | position: absolute; 137 | pointer-events: none; 138 | top: 0; 139 | font-size: 100%; 140 | left: -3.8em; 141 | width: 3em; /* works for line-numbers below 1000 lines */ 142 | letter-spacing: -1px; 143 | border-right: 1px solid #999; 144 | 145 | -webkit-user-select: none; 146 | -moz-user-select: none; 147 | -ms-user-select: none; 148 | user-select: none; 149 | 150 | } 151 | 152 | .line-numbers-rows > span { 153 | pointer-events: none; 154 | display: block; 155 | counter-increment: linenumber; 156 | } 157 | 158 | .line-numbers-rows > span:before { 159 | content: counter(linenumber); 160 | color: #999; 161 | display: block; 162 | padding-right: 0.8em; 163 | text-align: right; 164 | } 165 | 166 | div.prism-show-language { 167 | position: relative; 168 | } 169 | 170 | div.prism-show-language > div.prism-show-language-label[data-language] { 171 | color: black; 172 | background-color: #CFCFCF; 173 | display: inline-block; 174 | position: absolute; 175 | bottom: auto; 176 | left: auto; 177 | top: 0; 178 | right: 0; 179 | width: auto; 180 | height: auto; 181 | font-size: 0.9em; 182 | border-radius: 0 0 0 5px; 183 | padding: 0 0.5em; 184 | text-shadow: none; 185 | z-index: 1; 186 | -webkit-box-shadow: none; 187 | -moz-box-shadow: none; 188 | box-shadow: none; 189 | -webkit-transform: none; 190 | -moz-transform: none; 191 | -ms-transform: none; 192 | -o-transform: none; 193 | transform: none; 194 | } 195 | 196 | -------------------------------------------------------------------------------- /themes/prism-okaidia.css: -------------------------------------------------------------------------------- 1 | /* http://prismjs.com/download.html?themes=prism-okaidia&languages=markup+css+clike+javascript+actionscript+applescript+aspnet+bash+basic+batch+c+csharp+cpp+coffeescript+ruby+css-extras+go+groovy+java+latex+lua+markdown+objectivec+php+php-extras+powershell+python+sass+scss+sql+swift+yaml&plugins=line-numbers+show-language */ 2 | /** 3 | * okaidia theme for JavaScript, CSS and HTML 4 | * Loosely based on Monokai textmate theme by http://www.monokai.nl/ 5 | * @author ocodia 6 | */ 7 | 8 | code[class*="language-"], 9 | pre[class*="language-"] { 10 | color: #f8f8f2; 11 | text-shadow: 0 1px rgba(0, 0, 0, 0.3); 12 | font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; 13 | direction: ltr; 14 | text-align: left; 15 | white-space: pre; 16 | word-spacing: normal; 17 | word-break: normal; 18 | word-wrap: normal; 19 | line-height: 1.5; 20 | 21 | -moz-tab-size: 4; 22 | -o-tab-size: 4; 23 | tab-size: 4; 24 | 25 | -webkit-hyphens: none; 26 | -moz-hyphens: none; 27 | -ms-hyphens: none; 28 | hyphens: none; 29 | } 30 | 31 | /* Code blocks */ 32 | pre[class*="language-"] { 33 | padding: 1em; 34 | margin: .5em 0; 35 | overflow: auto; 36 | border-radius: 0.3em; 37 | } 38 | 39 | :not(pre) > code[class*="language-"], 40 | pre[class*="language-"] { 41 | background: #272822; 42 | } 43 | 44 | /* Inline code */ 45 | :not(pre) > code[class*="language-"] { 46 | padding: .1em; 47 | border-radius: .3em; 48 | white-space: normal; 49 | } 50 | 51 | .token.comment, 52 | .token.prolog, 53 | .token.doctype, 54 | .token.cdata { 55 | color: slategray; 56 | } 57 | 58 | .token.punctuation { 59 | color: #f8f8f2; 60 | } 61 | 62 | .namespace { 63 | opacity: .7; 64 | } 65 | 66 | .token.property, 67 | .token.tag, 68 | .token.constant, 69 | .token.symbol, 70 | .token.deleted { 71 | color: #f92672; 72 | } 73 | 74 | .token.boolean, 75 | .token.number { 76 | color: #ae81ff; 77 | } 78 | 79 | .token.selector, 80 | .token.attr-name, 81 | .token.string, 82 | .token.char, 83 | .token.builtin, 84 | .token.inserted { 85 | color: #a6e22e; 86 | } 87 | 88 | .token.operator, 89 | .token.entity, 90 | .token.url, 91 | .language-css .token.string, 92 | .style .token.string, 93 | .token.variable { 94 | color: #f8f8f2; 95 | } 96 | 97 | .token.atrule, 98 | .token.attr-value, 99 | .token.function { 100 | color: #e6db74; 101 | } 102 | 103 | .token.keyword { 104 | color: #66d9ef; 105 | } 106 | 107 | .token.regex, 108 | .token.important { 109 | color: #fd971f; 110 | } 111 | 112 | .token.important, 113 | .token.bold { 114 | font-weight: bold; 115 | } 116 | .token.italic { 117 | font-style: italic; 118 | } 119 | 120 | .token.entity { 121 | cursor: help; 122 | } 123 | 124 | pre.line-numbers { 125 | position: relative; 126 | padding-left: 3.8em; 127 | counter-reset: linenumber; 128 | } 129 | 130 | pre.line-numbers > code { 131 | position: relative; 132 | } 133 | 134 | .line-numbers .line-numbers-rows { 135 | position: absolute; 136 | pointer-events: none; 137 | top: 0; 138 | font-size: 100%; 139 | left: -3.8em; 140 | width: 3em; /* works for line-numbers below 1000 lines */ 141 | letter-spacing: -1px; 142 | border-right: 1px solid #999; 143 | 144 | -webkit-user-select: none; 145 | -moz-user-select: none; 146 | -ms-user-select: none; 147 | user-select: none; 148 | 149 | } 150 | 151 | .line-numbers-rows > span { 152 | pointer-events: none; 153 | display: block; 154 | counter-increment: linenumber; 155 | } 156 | 157 | .line-numbers-rows > span:before { 158 | content: counter(linenumber); 159 | color: #999; 160 | display: block; 161 | padding-right: 0.8em; 162 | text-align: right; 163 | } 164 | 165 | div.prism-show-language { 166 | position: relative; 167 | } 168 | 169 | div.prism-show-language > div.prism-show-language-label[data-language] { 170 | color: black; 171 | background-color: #CFCFCF; 172 | display: inline-block; 173 | position: absolute; 174 | bottom: auto; 175 | left: auto; 176 | top: 0; 177 | right: 0; 178 | width: auto; 179 | height: auto; 180 | font-size: 0.9em; 181 | border-radius: 0 0 0 5px; 182 | padding: 0 0.5em; 183 | text-shadow: none; 184 | z-index: 1; 185 | -webkit-box-shadow: none; 186 | -moz-box-shadow: none; 187 | box-shadow: none; 188 | -webkit-transform: none; 189 | -moz-transform: none; 190 | -ms-transform: none; 191 | -o-transform: none; 192 | transform: none; 193 | } 194 | 195 | -------------------------------------------------------------------------------- /themes/prism-atom-dark.css: -------------------------------------------------------------------------------- 1 | /** 2 | * atom-dark theme for `prism.js` 3 | * Based on Atom's `atom-dark` theme: https://github.com/atom/atom-dark-syntax 4 | * @author Joe Gibson (@gibsjose) 5 | */ 6 | 7 | code[class*="language-"], 8 | pre[class*="language-"] { 9 | color: #c5c8c6; 10 | text-shadow: 0 1px rgba(0, 0, 0, 0.3); 11 | font-family: Inconsolata, Monaco, Consolas, 'Courier New', Courier, monospace; 12 | direction: ltr; 13 | text-align: left; 14 | white-space: pre; 15 | word-spacing: normal; 16 | word-break: normal; 17 | line-height: 1.5; 18 | 19 | -moz-tab-size: 4; 20 | -o-tab-size: 4; 21 | tab-size: 4; 22 | 23 | -webkit-hyphens: none; 24 | -moz-hyphens: none; 25 | -ms-hyphens: none; 26 | hyphens: none; 27 | } 28 | 29 | /* Code blocks */ 30 | pre[class*="language-"] { 31 | padding: 1em; 32 | margin: .5em 0; 33 | overflow: auto; 34 | border-radius: 0.3em; 35 | } 36 | 37 | :not(pre) > code[class*="language-"], 38 | pre[class*="language-"] { 39 | background: #1d1f21; 40 | } 41 | 42 | /* Inline code */ 43 | :not(pre) > code[class*="language-"] { 44 | padding: .1em; 45 | border-radius: .3em; 46 | } 47 | 48 | .token.comment, 49 | .token.prolog, 50 | .token.doctype, 51 | .token.cdata { 52 | color: #7C7C7C; 53 | } 54 | 55 | .token.punctuation { 56 | color: #c5c8c6; 57 | } 58 | 59 | .namespace { 60 | opacity: .7; 61 | } 62 | 63 | .token.property, 64 | .token.keyword, 65 | .token.tag { 66 | color: #96CBFE; 67 | } 68 | 69 | .token.class-name { 70 | color: #FFFFB6; 71 | text-decoration: underline; 72 | } 73 | 74 | .token.boolean, 75 | .token.constant { 76 | color: #99CC99; 77 | } 78 | 79 | .token.symbol, 80 | .token.deleted { 81 | color: #f92672; 82 | } 83 | 84 | .token.number { 85 | color: #FF73FD; 86 | } 87 | 88 | .token.selector, 89 | .token.attr-name, 90 | .token.string, 91 | .token.char, 92 | .token.builtin, 93 | .token.inserted { 94 | color: #A8FF60; 95 | } 96 | 97 | .token.variable { 98 | color: #C6C5FE; 99 | } 100 | 101 | .token.operator { 102 | color: #EDEDED; 103 | } 104 | 105 | .token.entity { 106 | color: #FFFFB6; 107 | /* text-decoration: underline; */ 108 | } 109 | 110 | .token.url { 111 | color: #96CBFE; 112 | } 113 | 114 | .language-css .token.string, 115 | .style .token.string { 116 | color: #87C38A; 117 | } 118 | 119 | .token.atrule, 120 | .token.attr-value { 121 | color: #F9EE98; 122 | } 123 | 124 | .token.function { 125 | color: #DAD085; 126 | } 127 | 128 | .token.regex { 129 | color: #E9C062; 130 | } 131 | 132 | .token.important { 133 | color: #fd971f; 134 | } 135 | 136 | .token.important, 137 | .token.bold { 138 | font-weight: bold; 139 | } 140 | .token.italic { 141 | font-style: italic; 142 | } 143 | 144 | .token.entity { 145 | cursor: help; 146 | } 147 | 148 | pre.line-numbers { 149 | position: relative; 150 | padding-left: 3.8em; 151 | counter-reset: linenumber; 152 | } 153 | 154 | pre.line-numbers > code { 155 | position: relative; 156 | } 157 | 158 | .line-numbers .line-numbers-rows { 159 | position: absolute; 160 | pointer-events: none; 161 | top: 0; 162 | font-size: 100%; 163 | left: -3.8em; 164 | width: 3em; /* works for line-numbers below 1000 lines */ 165 | letter-spacing: -1px; 166 | border-right: 1px solid #999; 167 | 168 | -webkit-user-select: none; 169 | -moz-user-select: none; 170 | -ms-user-select: none; 171 | user-select: none; 172 | 173 | } 174 | 175 | .line-numbers-rows > span { 176 | pointer-events: none; 177 | display: block; 178 | counter-increment: linenumber; 179 | } 180 | 181 | .line-numbers-rows > span:before { 182 | content: counter(linenumber); 183 | color: #999; 184 | display: block; 185 | padding-right: 0.8em; 186 | text-align: right; 187 | } 188 | 189 | div.prism-show-language { 190 | position: relative; 191 | } 192 | 193 | div.prism-show-language > div.prism-show-language-label[data-language] { 194 | color: black; 195 | background-color: #CFCFCF; 196 | display: inline-block; 197 | position: absolute; 198 | bottom: auto; 199 | left: auto; 200 | top: 0; 201 | right: 0; 202 | width: auto; 203 | height: auto; 204 | font-size: 0.9em; 205 | border-radius: 0 0 0 5px; 206 | padding: 0 0.5em; 207 | text-shadow: none; 208 | z-index: 1; 209 | -webkit-box-shadow: none; 210 | -moz-box-shadow: none; 211 | box-shadow: none; 212 | -webkit-transform: none; 213 | -moz-transform: none; 214 | -ms-transform: none; 215 | -o-transform: none; 216 | transform: none; 217 | } 218 | -------------------------------------------------------------------------------- /themes/prism-ghcolors.css: -------------------------------------------------------------------------------- 1 | /** 2 | * GHColors theme by Avi Aryan (http://aviaryan.in) 3 | * Inspired by Github syntax coloring 4 | */ 5 | 6 | code[class*="language-"], 7 | pre[class*="language-"] { 8 | color: #393A34; 9 | font-family: "Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace; 10 | direction: ltr; 11 | text-align: left; 12 | white-space: pre; 13 | word-spacing: normal; 14 | word-break: normal; 15 | font-size: 0.95em; 16 | line-height: 1.2em; 17 | 18 | -moz-tab-size: 4; 19 | -o-tab-size: 4; 20 | tab-size: 4; 21 | 22 | -webkit-hyphens: none; 23 | -moz-hyphens: none; 24 | -ms-hyphens: none; 25 | hyphens: none; 26 | } 27 | 28 | pre[class*="language-"]::-moz-selection, pre[class*="language-"] ::-moz-selection, 29 | code[class*="language-"]::-moz-selection, code[class*="language-"] ::-moz-selection { 30 | background: #b3d4fc; 31 | } 32 | 33 | pre[class*="language-"]::selection, pre[class*="language-"] ::selection, 34 | code[class*="language-"]::selection, code[class*="language-"] ::selection { 35 | background: #b3d4fc; 36 | } 37 | 38 | /* Code blocks */ 39 | pre[class*="language-"] { 40 | padding: 1em; 41 | margin: .5em 0; 42 | overflow: auto; 43 | border: 1px solid #dddddd; 44 | background-color: white; 45 | } 46 | 47 | :not(pre) > code[class*="language-"], 48 | pre[class*="language-"] { 49 | } 50 | 51 | /* Inline code */ 52 | :not(pre) > code[class*="language-"] { 53 | padding: .2em; 54 | padding-top: 1px; padding-bottom: 1px; 55 | background: #f8f8f8; 56 | border: 1px solid #dddddd; 57 | } 58 | 59 | .token.comment, 60 | .token.prolog, 61 | .token.doctype, 62 | .token.cdata { 63 | color: #999988; font-style: italic; 64 | } 65 | 66 | .token.namespace { 67 | opacity: .7; 68 | } 69 | 70 | .token.string, 71 | .token.attr-value { 72 | color: #e3116c; 73 | } 74 | .token.punctuation, 75 | .token.operator { 76 | color: #393A34; /* no highlight */ 77 | } 78 | 79 | .token.entity, 80 | .token.url, 81 | .token.symbol, 82 | .token.number, 83 | .token.boolean, 84 | .token.variable, 85 | .token.constant, 86 | .token.property, 87 | .token.regex, 88 | .token.inserted { 89 | color: #36acaa; 90 | } 91 | 92 | .token.atrule, 93 | .token.keyword, 94 | .token.attr-name, 95 | .language-autohotkey .token.selector { 96 | color: #00a4db; 97 | } 98 | 99 | .token.function, 100 | .token.deleted, 101 | .language-autohotkey .token.tag { 102 | color: #9a050f; 103 | } 104 | 105 | .token.tag, 106 | .token.selector, 107 | .language-autohotkey .token.keyword { 108 | color: #00009f; 109 | } 110 | 111 | .token.important, 112 | .token.function, 113 | .token.bold { 114 | font-weight: bold; 115 | } 116 | 117 | .token.italic { 118 | font-style: italic; 119 | } 120 | 121 | pre.line-numbers { 122 | position: relative; 123 | padding-left: 3.8em; 124 | counter-reset: linenumber; 125 | } 126 | 127 | pre.line-numbers > code { 128 | position: relative; 129 | } 130 | 131 | .line-numbers .line-numbers-rows { 132 | position: absolute; 133 | pointer-events: none; 134 | top: 0; 135 | font-size: 100%; 136 | left: -3.8em; 137 | width: 3em; /* works for line-numbers below 1000 lines */ 138 | letter-spacing: -1px; 139 | border-right: 1px solid #999; 140 | 141 | -webkit-user-select: none; 142 | -moz-user-select: none; 143 | -ms-user-select: none; 144 | user-select: none; 145 | 146 | } 147 | 148 | .line-numbers-rows > span { 149 | pointer-events: none; 150 | display: block; 151 | counter-increment: linenumber; 152 | } 153 | 154 | .line-numbers-rows > span:before { 155 | content: counter(linenumber); 156 | color: #999; 157 | display: block; 158 | padding-right: 0.8em; 159 | text-align: right; 160 | } 161 | 162 | div.prism-show-language { 163 | position: relative; 164 | } 165 | 166 | div.prism-show-language > div.prism-show-language-label[data-language] { 167 | color: black; 168 | background-color: #CFCFCF; 169 | display: inline-block; 170 | position: absolute; 171 | bottom: auto; 172 | left: auto; 173 | top: 0; 174 | right: 0; 175 | width: auto; 176 | height: auto; 177 | font-size: 0.9em; 178 | border-radius: 0 0 0 5px; 179 | padding: 0 0.5em; 180 | text-shadow: none; 181 | z-index: 1; 182 | -webkit-box-shadow: none; 183 | -moz-box-shadow: none; 184 | box-shadow: none; 185 | -webkit-transform: none; 186 | -moz-transform: none; 187 | -ms-transform: none; 188 | -o-transform: none; 189 | transform: none; 190 | } -------------------------------------------------------------------------------- /Plugin.php: -------------------------------------------------------------------------------- 1 | contentEx = array('Prismjs_Plugin', 'parse'); 15 | Typecho_Plugin::factory('Widget_Abstract_Comments')->contentEx = array('Prismjs_Plugin', 'parse'); 16 | Typecho_Plugin::factory('Widget_Archive')->header = array('Prismjs_Plugin', 'header'); 17 | Typecho_Plugin::factory('Widget_Archive')->footer = array('Prismjs_Plugin', 'footer'); 18 | } 19 | 20 | public static function deactivate() {} 21 | public static function personalConfig(Typecho_Widget_Helper_Form $form) {} 22 | 23 | public static function config(Typecho_Widget_Helper_Form $form) 24 | { 25 | $help = new Typecho_Widget_Helper_Layout('div', array('style' => 'color: #999; background-color: #eee; border-radius: 10px; padding: 10px;')); 26 | $help->html("使用方法
```c#\nConsole.Write(\"Hello World!\");\n```\n或行内代码\n`js console.log(\"Hi!\");`
"); 27 | $form->addItem($help); 28 | 29 | $themes = array_map('basename', glob(dirname(__FILE__) . '/themes/*.css')); 30 | $themes = array_combine($themes, $themes); 31 | $theme = new Typecho_Widget_Helper_Form_Element_Select('theme', $themes, 'prism-coy.css', _t('代码样式')); 32 | $form->addInput($theme->addRule('enum', _t('必须选择样式'), $themes)); 33 | 34 | $showLineNumber = new Typecho_Widget_Helper_Form_Element_Checkbox('showln', array('showln' => _t('显示行号')), array('showln'), _t('是否在大段代码左侧显示行号')); 35 | $form->addInput($showLineNumber); 36 | 37 | $forceWrap = new Typecho_Widget_Helper_Form_Element_Checkbox('forceWrap', array('forceWrap' => _t('强制换行')), array('forceWrap'), _t('是否强制换行')); 38 | $form->addInput($forceWrap); 39 | 40 | $showLang = new Typecho_Widget_Helper_Form_Element_Checkbox('showlang', array('showlang' => _t('显示语言标签')), array('showlang'), _t('是否在大段代码右上角显示语言')); 41 | $form->addInput($showLang); 42 | } 43 | 44 | public static function header() 45 | { 46 | $themeUrl = Helper::options()->pluginUrl . '/Prismjs/themes/' . Helper::options()->plugin('Prismjs')->theme; 47 | echo ''; 48 | if (!Helper::options()->plugin('Prismjs')->showlang) 49 | echo ""; 50 | if (Helper::options()->plugin('Prismjs')->forceWrap) 51 | echo ''; 52 | } 53 | 54 | public static function footer() 55 | { 56 | if (Helper::options()->plugin('Prismjs')->showln) 57 | echo ""; 62 | $jsUrl = Helper::options()->pluginUrl . '/Prismjs/prism.js'; 63 | echo ''; 64 | if (Helper::options()->plugin('Prismjs')->forceWrap && Helper::options()->plugin('Prismjs')->showln) 65 | echo ''; 66 | } 67 | 68 | public static function parse($text, $widget, $lastResult) 69 | { 70 | $text = empty($lastResult) ? $text : $lastResult; 71 | 72 | $text = preg_replace('/(c#|py|yml|c\+\+|bat|as|js|markup|css|clike|javascript|actionscript|applescript|aspnet|bash|basic|batch|cpp|csharp|c|coffeescript|ruby|css-extras|go|groovy|java|latex|lua|markdown|objectivec|php|php-extras|powershell|python|sass|scss|sql|swift|yaml)\s/i', '', $text); 73 | $text = preg_replace_callback('//i', function($m) { return ''; }, $text); 74 | $text = str_replace('language-c#', 'language-csharp', $text); 75 | $text = str_replace('language-yml', 'language-yaml', $text); 76 | $text = str_replace('language-bat"', 'language-batch"', $text); 77 | $text = str_replace('language-c++', 'language-cpp', $text); 78 | $text = str_replace('language-as"', 'language-actionscript"', $text); 79 | $text = str_replace('language-js', 'language-javascript', $text); 80 | $text = str_replace('language-py"', 'language-python"', $text); 81 | $text = str_replace('', '', $text); 82 | 83 | return $text; 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /themes/prism-default.css: -------------------------------------------------------------------------------- 1 | /* http://prismjs.com/download.html?themes=prism&languages=markup+css+clike+javascript+actionscript+applescript+aspnet+bash+basic+batch+c+csharp+cpp+coffeescript+ruby+css-extras+go+groovy+java+latex+lua+markdown+objectivec+php+php-extras+powershell+python+sass+scss+sql+swift+yaml&plugins=line-numbers+show-language */ 2 | /** 3 | * prism.js default theme for JavaScript, CSS and HTML 4 | * Based on dabblet (http://dabblet.com) 5 | * @author Lea Verou 6 | */ 7 | 8 | code[class*="language-"], 9 | pre[class*="language-"] { 10 | color: black; 11 | text-shadow: 0 1px white; 12 | font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; 13 | direction: ltr; 14 | text-align: left; 15 | white-space: pre; 16 | word-spacing: normal; 17 | word-break: normal; 18 | word-wrap: normal; 19 | line-height: 1.5; 20 | 21 | -moz-tab-size: 4; 22 | -o-tab-size: 4; 23 | tab-size: 4; 24 | 25 | -webkit-hyphens: none; 26 | -moz-hyphens: none; 27 | -ms-hyphens: none; 28 | hyphens: none; 29 | } 30 | 31 | pre[class*="language-"]::-moz-selection, pre[class*="language-"] ::-moz-selection, 32 | code[class*="language-"]::-moz-selection, code[class*="language-"] ::-moz-selection { 33 | text-shadow: none; 34 | background: #b3d4fc; 35 | } 36 | 37 | pre[class*="language-"]::selection, pre[class*="language-"] ::selection, 38 | code[class*="language-"]::selection, code[class*="language-"] ::selection { 39 | text-shadow: none; 40 | background: #b3d4fc; 41 | } 42 | 43 | @media print { 44 | code[class*="language-"], 45 | pre[class*="language-"] { 46 | text-shadow: none; 47 | } 48 | } 49 | 50 | /* Code blocks */ 51 | pre[class*="language-"] { 52 | padding: 1em; 53 | margin: .5em 0; 54 | overflow: auto; 55 | } 56 | 57 | :not(pre) > code[class*="language-"], 58 | pre[class*="language-"] { 59 | background: #f5f2f0; 60 | } 61 | 62 | /* Inline code */ 63 | :not(pre) > code[class*="language-"] { 64 | padding: .1em; 65 | border-radius: .3em; 66 | white-space: normal; 67 | } 68 | 69 | .token.comment, 70 | .token.prolog, 71 | .token.doctype, 72 | .token.cdata { 73 | color: slategray; 74 | } 75 | 76 | .token.punctuation { 77 | color: #999; 78 | } 79 | 80 | .namespace { 81 | opacity: .7; 82 | } 83 | 84 | .token.property, 85 | .token.tag, 86 | .token.boolean, 87 | .token.number, 88 | .token.constant, 89 | .token.symbol, 90 | .token.deleted { 91 | color: #905; 92 | } 93 | 94 | .token.selector, 95 | .token.attr-name, 96 | .token.string, 97 | .token.char, 98 | .token.builtin, 99 | .token.inserted { 100 | color: #690; 101 | } 102 | 103 | .token.operator, 104 | .token.entity, 105 | .token.url, 106 | .language-css .token.string, 107 | .style .token.string { 108 | color: #a67f59; 109 | background: hsla(0, 0%, 100%, .5); 110 | } 111 | 112 | .token.atrule, 113 | .token.attr-value, 114 | .token.keyword { 115 | color: #07a; 116 | } 117 | 118 | .token.function { 119 | color: #DD4A68; 120 | } 121 | 122 | .token.regex, 123 | .token.important, 124 | .token.variable { 125 | color: #e90; 126 | } 127 | 128 | .token.important, 129 | .token.bold { 130 | font-weight: bold; 131 | } 132 | .token.italic { 133 | font-style: italic; 134 | } 135 | 136 | .token.entity { 137 | cursor: help; 138 | } 139 | 140 | pre.line-numbers { 141 | position: relative; 142 | padding-left: 3.8em; 143 | counter-reset: linenumber; 144 | } 145 | 146 | pre.line-numbers > code { 147 | position: relative; 148 | } 149 | 150 | .line-numbers .line-numbers-rows { 151 | position: absolute; 152 | pointer-events: none; 153 | top: 0; 154 | font-size: 100%; 155 | left: -3.8em; 156 | width: 3em; /* works for line-numbers below 1000 lines */ 157 | letter-spacing: -1px; 158 | border-right: 1px solid #999; 159 | 160 | -webkit-user-select: none; 161 | -moz-user-select: none; 162 | -ms-user-select: none; 163 | user-select: none; 164 | 165 | } 166 | 167 | .line-numbers-rows > span { 168 | pointer-events: none; 169 | display: block; 170 | counter-increment: linenumber; 171 | } 172 | 173 | .line-numbers-rows > span:before { 174 | content: counter(linenumber); 175 | color: #999; 176 | display: block; 177 | padding-right: 0.8em; 178 | text-align: right; 179 | } 180 | div.prism-show-language { 181 | position: relative; 182 | } 183 | 184 | div.prism-show-language > div.prism-show-language-label[data-language] { 185 | color: black; 186 | background-color: #CFCFCF; 187 | display: inline-block; 188 | position: absolute; 189 | bottom: auto; 190 | left: auto; 191 | top: 0; 192 | right: 0; 193 | width: auto; 194 | height: auto; 195 | font-size: 0.9em; 196 | border-radius: 0 0 0 5px; 197 | padding: 0 0.5em; 198 | text-shadow: none; 199 | z-index: 1; 200 | -webkit-box-shadow: none; 201 | -moz-box-shadow: none; 202 | box-shadow: none; 203 | -webkit-transform: none; 204 | -moz-transform: none; 205 | -ms-transform: none; 206 | -o-transform: none; 207 | transform: none; 208 | } 209 | 210 | -------------------------------------------------------------------------------- /themes/prism-base16-ateliersulphurpool.light.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Name: Base16 Atelier Sulphurpool Light 4 | Author: Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/sulphurpool) 5 | 6 | Prism template by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/prism/) 7 | Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) 8 | 9 | */ 10 | code[class*="language-"], 11 | pre[class*="language-"] { 12 | font-family: Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", "Courier New", Courier, monospace; 13 | font-size: 14px; 14 | line-height: 1.375; 15 | direction: ltr; 16 | text-align: left; 17 | white-space: pre; 18 | word-spacing: normal; 19 | word-break: normal; 20 | -moz-tab-size: 4; 21 | -o-tab-size: 4; 22 | tab-size: 4; 23 | -webkit-hyphens: none; 24 | -moz-hyphens: none; 25 | -ms-hyphens: none; 26 | hyphens: none; 27 | background: #f5f7ff; 28 | color: #5e6687; 29 | } 30 | 31 | pre[class*="language-"]::-moz-selection, pre[class*="language-"] ::-moz-selection, 32 | code[class*="language-"]::-moz-selection, code[class*="language-"] ::-moz-selection { 33 | text-shadow: none; 34 | background: #dfe2f1; 35 | } 36 | 37 | pre[class*="language-"]::selection, pre[class*="language-"] ::selection, 38 | code[class*="language-"]::selection, code[class*="language-"] ::selection { 39 | text-shadow: none; 40 | background: #dfe2f1; 41 | } 42 | 43 | /* Code blocks */ 44 | pre[class*="language-"] { 45 | padding: 1em; 46 | margin: .5em 0; 47 | overflow: auto; 48 | } 49 | 50 | /* Inline code */ 51 | :not(pre) > code[class*="language-"] { 52 | padding: .1em; 53 | border-radius: .3em; 54 | } 55 | 56 | .token.comment, 57 | .token.prolog, 58 | .token.doctype, 59 | .token.cdata { 60 | color: #898ea4; 61 | } 62 | 63 | .token.punctuation { 64 | color: #5e6687; 65 | } 66 | 67 | .token.namespace { 68 | opacity: .7; 69 | } 70 | 71 | .token.operator, 72 | .token.boolean, 73 | .token.number { 74 | color: #c76b29; 75 | } 76 | 77 | .token.property { 78 | color: #c08b30; 79 | } 80 | 81 | .token.tag { 82 | color: #3d8fd1; 83 | } 84 | 85 | .token.string { 86 | color: #22a2c9; 87 | } 88 | 89 | .token.selector { 90 | color: #6679cc; 91 | } 92 | 93 | .token.attr-name { 94 | color: #c76b29; 95 | } 96 | 97 | .token.entity, 98 | .token.url, 99 | .language-css .token.string, 100 | .style .token.string { 101 | color: #22a2c9; 102 | } 103 | 104 | .token.attr-value, 105 | .token.keyword, 106 | .token.control, 107 | .token.directive, 108 | .token.unit { 109 | color: #ac9739; 110 | } 111 | 112 | .token.statement, 113 | .token.regex, 114 | .token.atrule { 115 | color: #22a2c9; 116 | } 117 | 118 | .token.placeholder, 119 | .token.variable { 120 | color: #3d8fd1; 121 | } 122 | 123 | .token.deleted { 124 | text-decoration: line-through; 125 | } 126 | 127 | .token.inserted { 128 | border-bottom: 1px dotted #202746; 129 | text-decoration: none; 130 | } 131 | 132 | .token.italic { 133 | font-style: italic; 134 | } 135 | 136 | .token.important, 137 | .token.bold { 138 | font-weight: bold; 139 | } 140 | 141 | .token.important { 142 | color: #c94922; 143 | } 144 | 145 | .token.entity { 146 | cursor: help; 147 | } 148 | 149 | pre > code.highlight { 150 | outline: 0.4em solid #c94922; 151 | outline-offset: .4em; 152 | } 153 | 154 | pre.line-numbers { 155 | position: relative; 156 | padding-left: 3.8em; 157 | counter-reset: linenumber; 158 | } 159 | 160 | pre.line-numbers > code { 161 | position: relative; 162 | } 163 | 164 | .line-numbers .line-numbers-rows { 165 | position: absolute; 166 | pointer-events: none; 167 | top: 0; 168 | font-size: 100%; 169 | left: -3.8em; 170 | width: 3em; /* works for line-numbers below 1000 lines */ 171 | letter-spacing: -1px; 172 | border-right: 1px solid #999; 173 | 174 | -webkit-user-select: none; 175 | -moz-user-select: none; 176 | -ms-user-select: none; 177 | user-select: none; 178 | 179 | } 180 | 181 | .line-numbers-rows > span { 182 | pointer-events: none; 183 | display: block; 184 | counter-increment: linenumber; 185 | } 186 | 187 | .line-numbers-rows > span:before { 188 | content: counter(linenumber); 189 | color: #999; 190 | display: block; 191 | padding-right: 0.8em; 192 | text-align: right; 193 | } 194 | 195 | div.prism-show-language { 196 | position: relative; 197 | } 198 | 199 | div.prism-show-language > div.prism-show-language-label[data-language] { 200 | color: black; 201 | background-color: #CFCFCF; 202 | display: inline-block; 203 | position: absolute; 204 | bottom: auto; 205 | left: auto; 206 | top: 0; 207 | right: 0; 208 | width: auto; 209 | height: auto; 210 | font-size: 0.9em; 211 | border-radius: 0 0 0 5px; 212 | padding: 0 0.5em; 213 | text-shadow: none; 214 | z-index: 1; 215 | -webkit-box-shadow: none; 216 | -moz-box-shadow: none; 217 | box-shadow: none; 218 | -webkit-transform: none; 219 | -moz-transform: none; 220 | -ms-transform: none; 221 | -o-transform: none; 222 | transform: none; 223 | } 224 | -------------------------------------------------------------------------------- /themes/prism-cb.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Based on Plugin: Syntax Highlighter CB 3 | * Plugin URI: http://wp.tutsplus.com/tutorials/plugins/adding-a-syntax-highlighter-shortcode-using-prism-js 4 | * Description: Highlight your code snippets with an easy to use shortcode based on Lea Verou's Prism.js. 5 | * Version: 1.0.0 6 | * Author: c.bavota 7 | * Author URI: http://bavotasan.comhttp://wp.tutsplus.com/tutorials/plugins/adding-a-syntax-highlighter-shortcode-using-prism-js/ */ 8 | /* http://cbavota.bitbucket.org/syntax-highlighter/ */ 9 | 10 | /* ===== ===== */ 11 | code[class*="language-"], 12 | pre[class*="language-"] { 13 | color: #fff; 14 | text-shadow: 0 1px 1px #000; 15 | font-family: Menlo, Monaco, "Courier New", monospace; 16 | direction: ltr; 17 | text-align: left; 18 | word-spacing: normal; 19 | white-space: pre; 20 | word-wrap: normal; 21 | line-height: 1.4; 22 | background: none; 23 | border: 0; 24 | 25 | -moz-tab-size: 4; 26 | -o-tab-size: 4; 27 | tab-size: 4; 28 | 29 | -webkit-hyphens: none; 30 | -moz-hyphens: none; 31 | -ms-hyphens: none; 32 | hyphens: none; 33 | } 34 | 35 | pre[class*="language-"] code { 36 | float: left; 37 | padding: 0 15px 0 0; 38 | } 39 | 40 | pre[class*="language-"], 41 | :not(pre) > code[class*="language-"] { 42 | background: #222; 43 | } 44 | 45 | /* Code blocks */ 46 | pre[class*="language-"] { 47 | padding: 15px; 48 | margin: 1em 0; 49 | overflow: auto; 50 | -moz-border-radius: 8px; 51 | -webkit-border-radius: 8px; 52 | border-radius: 8px; 53 | } 54 | 55 | /* Inline code */ 56 | :not(pre) > code[class*="language-"] { 57 | padding: 5px 10px; 58 | line-height: 1; 59 | -moz-border-radius: 3px; 60 | -webkit-border-radius: 3px; 61 | border-radius: 3px; 62 | } 63 | 64 | .token.comment, 65 | .token.prolog, 66 | .token.doctype, 67 | .token.cdata { 68 | color: #797979; 69 | } 70 | 71 | .token.selector, 72 | .token.operator, 73 | .token.punctuation { 74 | color: #fff; 75 | } 76 | 77 | .token.namespace { 78 | opacity: .7; 79 | } 80 | 81 | .token.tag, 82 | .token.boolean { 83 | color: #ffd893; 84 | } 85 | 86 | .token.atrule, 87 | .token.attr-value, 88 | .token.hex, 89 | .token.string { 90 | color: #B0C975; 91 | } 92 | 93 | .token.property, 94 | .token.entity, 95 | .token.url, 96 | .token.attr-name, 97 | .token.keyword { 98 | color: #c27628; 99 | } 100 | 101 | .token.regex { 102 | color: #9B71C6; 103 | } 104 | 105 | .token.entity { 106 | cursor: help; 107 | } 108 | 109 | .token.function, 110 | .token.constant { 111 | color: #e5a638; 112 | } 113 | 114 | .token.variable { 115 | color: #fdfba8; 116 | } 117 | 118 | .token.number { 119 | color: #8799B0; 120 | } 121 | 122 | .token.important, 123 | .token.deliminator { 124 | color: #E45734; 125 | } 126 | 127 | /* Line highlight plugin */ 128 | pre[data-line] { 129 | position: relative; 130 | padding: 1em 0 1em 3em; 131 | } 132 | 133 | .line-highlight { 134 | position: absolute; 135 | left: 0; 136 | right: 0; 137 | margin-top: 1em; /* Same as .prism's padding-top */ 138 | background: rgba(255,255,255,.2); 139 | pointer-events: none; 140 | line-height: inherit; 141 | white-space: pre; 142 | } 143 | 144 | .line-highlight:before, 145 | .line-highlight[data-end]:after { 146 | content: attr(data-start); 147 | position: absolute; 148 | top: .3em; 149 | left: .6em; 150 | min-width: 1em; 151 | padding: 0 .5em; 152 | background-color: rgba(255,255,255,.3); 153 | color: #fff; 154 | font: bold 65%/1.5 sans-serif; 155 | text-align: center; 156 | -moz-border-radius: 8px; 157 | -webkit-border-radius: 8px; 158 | border-radius: 8px; 159 | text-shadow: none; 160 | } 161 | 162 | .line-highlight[data-end]:after { 163 | content: attr(data-end); 164 | top: auto; 165 | bottom: .4em; 166 | } 167 | 168 | /* for line numbers */ 169 | .line-numbers-rows { 170 | margin: 0; 171 | } 172 | 173 | .line-numbers-rows span { 174 | padding-right: 10px; 175 | border-right: 3px #d9d336 solid; 176 | } 177 | 178 | pre.line-numbers { 179 | position: relative; 180 | padding-left: 3.8em; 181 | counter-reset: linenumber; 182 | } 183 | 184 | pre.line-numbers > code { 185 | position: relative; 186 | } 187 | 188 | .line-numbers .line-numbers-rows { 189 | position: absolute; 190 | pointer-events: none; 191 | top: 0; 192 | font-size: 100%; 193 | left: -3.8em; 194 | width: 3em; /* works for line-numbers below 1000 lines */ 195 | letter-spacing: -1px; 196 | border-right: 1px solid #999; 197 | 198 | -webkit-user-select: none; 199 | -moz-user-select: none; 200 | -ms-user-select: none; 201 | user-select: none; 202 | 203 | } 204 | 205 | .line-numbers-rows > span { 206 | pointer-events: none; 207 | display: block; 208 | counter-increment: linenumber; 209 | } 210 | 211 | .line-numbers-rows > span:before { 212 | content: counter(linenumber); 213 | color: #999; 214 | display: block; 215 | padding-right: 0.8em; 216 | text-align: right; 217 | } 218 | 219 | div.prism-show-language { 220 | position: relative; 221 | } 222 | 223 | div.prism-show-language > div.prism-show-language-label[data-language] { 224 | color: black; 225 | background-color: #CFCFCF; 226 | display: inline-block; 227 | position: absolute; 228 | bottom: auto; 229 | left: auto; 230 | top: 0; 231 | right: 0; 232 | width: auto; 233 | height: auto; 234 | font-size: 0.9em; 235 | border-radius: 0 0 0 5px; 236 | padding: 0 0.5em; 237 | text-shadow: none; 238 | z-index: 1; 239 | -webkit-box-shadow: none; 240 | -moz-box-shadow: none; 241 | box-shadow: none; 242 | -webkit-transform: none; 243 | -moz-transform: none; 244 | -ms-transform: none; 245 | -o-transform: none; 246 | transform: none; 247 | } 248 | -------------------------------------------------------------------------------- /themes/prism-xonokai.css: -------------------------------------------------------------------------------- 1 | /** 2 | * xonokai theme for JavaScript, CSS and HTML 3 | * based on: https://github.com/MoOx/sass-prism-theme-base by Maxime Thirouin ~ MoOx --> http://moox.fr/ , which is Loosely based on Monokai textmate theme by http://www.monokai.nl/ 4 | * license: MIT; http://moox.mit-license.org/ 5 | */ 6 | code[class*="language-"], 7 | pre[class*="language-"] { 8 | -moz-tab-size: 2; 9 | -o-tab-size: 2; 10 | tab-size: 2; 11 | -webkit-hyphens: none; 12 | -moz-hyphens: none; 13 | -ms-hyphens: none; 14 | hyphens: none; 15 | white-space: pre; 16 | white-space: pre-wrap; 17 | word-wrap: normal; 18 | font-family: Menlo, Monaco, "Courier New", monospace; 19 | font-size: 14px; 20 | color: #76d9e6; 21 | text-shadow: none; 22 | } 23 | pre[class*="language-"], 24 | :not(pre)>code[class*="language-"] { 25 | background: #2a2a2a; 26 | } 27 | pre[class*="language-"] { 28 | padding: 15px; 29 | border-radius: 4px; 30 | border: 1px solid #e1e1e8; 31 | overflow: auto; 32 | } 33 | 34 | pre[class*="language-"] { 35 | position: relative; 36 | } 37 | pre[class*="language-"] code { 38 | white-space: pre; 39 | display: block; 40 | } 41 | 42 | :not(pre)>code[class*="language-"] { 43 | padding: 0.15em 0.2em 0.05em; 44 | border-radius: .3em; 45 | border: 0.13em solid #7a6652; 46 | box-shadow: 1px 1px 0.3em -0.1em #000 inset; 47 | } 48 | .token.namespace { 49 | opacity: .7; 50 | } 51 | .token.comment, 52 | .token.prolog, 53 | .token.doctype, 54 | .token.cdata { 55 | color: #6f705e; 56 | } 57 | .token.operator, 58 | .token.boolean, 59 | .token.number { 60 | color: #a77afe; 61 | } 62 | .token.attr-name, 63 | .token.string { 64 | color: #e6d06c; 65 | } 66 | .token.entity, 67 | .token.url, 68 | .language-css .token.string, 69 | .style .token.string { 70 | color: #e6d06c; 71 | } 72 | .token.selector, 73 | .token.inserted { 74 | color: #a6e22d; 75 | } 76 | .token.atrule, 77 | .token.attr-value, 78 | .token.keyword, 79 | .token.important, 80 | .token.deleted { 81 | color: #ef3b7d; 82 | } 83 | .token.regex, 84 | .token.statement { 85 | color: #76d9e6; 86 | } 87 | .token.placeholder, 88 | .token.variable { 89 | color: #fff; 90 | } 91 | .token.important, 92 | .token.statement, 93 | .token.bold { 94 | font-weight: bold; 95 | } 96 | .token.punctuation { 97 | color: #bebec5; 98 | } 99 | .token.entity { 100 | cursor: help; 101 | } 102 | .token.italic { 103 | font-style: italic; 104 | } 105 | 106 | code.language-markup { 107 | color: #f9f9f9; 108 | } 109 | code.language-markup .token.tag { 110 | color: #ef3b7d; 111 | } 112 | code.language-markup .token.attr-name { 113 | color: #a6e22d; 114 | } 115 | code.language-markup .token.attr-value { 116 | color: #e6d06c; 117 | } 118 | code.language-markup .token.style, 119 | code.language-markup .token.script { 120 | color: #76d9e6; 121 | } 122 | code.language-markup .token.script .token.keyword { 123 | color: #76d9e6; 124 | } 125 | 126 | /* Line highlight plugin */ 127 | pre[class*="language-"][data-line] { 128 | position: relative; 129 | padding: 1em 0 1em 3em; 130 | } 131 | pre[data-line] .line-highlight { 132 | position: absolute; 133 | left: 0; 134 | right: 0; 135 | padding: 0; 136 | margin-top: 1em; 137 | background: rgba(255, 255, 255, 0.08); 138 | pointer-events: none; 139 | line-height: inherit; 140 | white-space: pre; 141 | } 142 | pre[data-line] .line-highlight:before, 143 | pre[data-line] .line-highlight[data-end]:after { 144 | content: attr(data-start); 145 | position: absolute; 146 | top: .4em; 147 | left: .6em; 148 | min-width: 1em; 149 | padding: 0.2em 0.5em; 150 | background-color: rgba(255, 255, 255, 0.4); 151 | color: black; 152 | font: bold 65%/1 sans-serif; 153 | height: 1em; 154 | line-height: 1em; 155 | text-align: center; 156 | border-radius: 999px; 157 | text-shadow: none; 158 | box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7); 159 | } 160 | pre[data-line] .line-highlight[data-end]:after { 161 | content: attr(data-end); 162 | top: auto; 163 | bottom: .4em; 164 | } 165 | 166 | pre.line-numbers { 167 | position: relative; 168 | padding-left: 3.8em; 169 | counter-reset: linenumber; 170 | } 171 | 172 | pre.line-numbers > code { 173 | position: relative; 174 | } 175 | 176 | .line-numbers .line-numbers-rows { 177 | position: absolute; 178 | pointer-events: none; 179 | top: 0; 180 | font-size: 100%; 181 | left: -3.8em; 182 | width: 3em; /* works for line-numbers below 1000 lines */ 183 | letter-spacing: -1px; 184 | border-right: 1px solid #999; 185 | 186 | -webkit-user-select: none; 187 | -moz-user-select: none; 188 | -ms-user-select: none; 189 | user-select: none; 190 | 191 | } 192 | 193 | .line-numbers-rows > span { 194 | pointer-events: none; 195 | display: block; 196 | counter-increment: linenumber; 197 | } 198 | 199 | .line-numbers-rows > span:before { 200 | content: counter(linenumber); 201 | color: #999; 202 | display: block; 203 | padding-right: 0.8em; 204 | text-align: right; 205 | } 206 | 207 | div.prism-show-language { 208 | position: relative; 209 | } 210 | 211 | div.prism-show-language > div.prism-show-language-label[data-language] { 212 | color: black; 213 | background-color: #CFCFCF; 214 | display: inline-block; 215 | position: absolute; 216 | bottom: auto; 217 | left: auto; 218 | top: 0; 219 | right: 0; 220 | width: auto; 221 | height: auto; 222 | font-size: 0.9em; 223 | border-radius: 0 0 0 5px; 224 | padding: 0 0.5em; 225 | text-shadow: none; 226 | z-index: 1; 227 | -webkit-box-shadow: none; 228 | -moz-box-shadow: none; 229 | box-shadow: none; 230 | -webkit-transform: none; 231 | -moz-transform: none; 232 | -ms-transform: none; 233 | -o-transform: none; 234 | transform: none; 235 | } -------------------------------------------------------------------------------- /themes/prism-pojoaque.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Pojoaque Style by Jason Tate 3 | * http://web-cms-designs.com/ftopict-10-pojoaque-style-for-highlight-js-code-highlighter.html 4 | * Based on Solarized Style from http://ethanschoonover.com/solarized 5 | * http://softwaremaniacs.org/media/soft/highlight/test.html 6 | */ 7 | 8 | code[class*="language-"], 9 | pre[class*="language-"] { 10 | -moz-tab-size: 4; 11 | -o-tab-size: 4; 12 | tab-size: 4; 13 | -webkit-hyphens: none; 14 | -moz-hyphens: none; 15 | -ms-hyphens: none; 16 | hyphens: none; 17 | white-space: pre; 18 | white-space: pre-wrap; 19 | word-break: break-all; 20 | word-wrap: break-word; 21 | font-family: Menlo, Monaco, "Courier New", monospace; 22 | font-size: 15px; 23 | line-height: 1.5; 24 | color: #dccf8f; 25 | text-shadow: 0; 26 | } 27 | 28 | pre[class*="language-"], 29 | :not(pre) > code[class*="language-"] { 30 | border-radius: 5px; 31 | border: 1px solid #000; 32 | color: #DCCF8F; 33 | background: #181914 url('data:image/jpeg;base64,/9j/4AAQSkZJRgABAgAAZABkAAD/7AARRHVja3kAAQAEAAAAMAAA/+4ADkFkb2JlAGTAAAAAAf/bAIQACQYGBgcGCQcHCQ0IBwgNDwsJCQsPEQ4ODw4OERENDg4ODg0RERQUFhQUERoaHBwaGiYmJiYmKysrKysrKysrKwEJCAgJCgkMCgoMDwwODA8TDg4ODhMVDg4PDg4VGhMRERERExoXGhYWFhoXHR0aGh0dJCQjJCQrKysrKysrKysr/8AAEQgAjACMAwEiAAIRAQMRAf/EAF4AAQEBAAAAAAAAAAAAAAAAAAABBwEBAQAAAAAAAAAAAAAAAAAAAAIQAAEDAwIHAQEAAAAAAAAAAADwAREhYaExkUFRcYGxwdHh8REBAAAAAAAAAAAAAAAAAAAAAP/aAAwDAQACEQMRAD8AyGFEjHaBS2fDDs2zkhKmBKktb7km+ZwwCnXPkLVmCTMItj6AXFxRS465/BTnkAJvkLkJe+7AKKoi2AtRS2zuAWsCb5GOlBN8gKfmuGHZ8MFqIth3ALmFoFwbwKWyAlTAp17uKqBvgBD8sM4fTjhvAhkzhaRkBMKBrfs7jGPIpzy7gFrAqnC0C0gB0EWwBDW2cBVQwm+QtPpa3wBO3sVvszCnLAhkzgL5/RLf13cLQd8/AGlu0Cb5HTx9KuAEieGJEdcehS3eRTp2ATdt3CpIm+QtZwAhROXFeb7swp/ahaM3kBE/jSIUBc/AWrgBN8uNFAl+b7sAXFxFn2YLUU5Ns7gFX8C4ib+hN8gFWXwK3bZglxEJm+gKdciLPsFV/TClsgJUwKJ5FVA7tvIFrfZhVfGJDcsCKaYgAqv6YRbE+RWOWBtu7+AL3yRalXLyKqAIIfk+zARbDgFyEsncYwJvlgFRW+GEWntIi2P0BooyFxcNr8Ep3+ANLbMO+QyhvbiqdgC0kVvgUUiLYgBS2QtPbiVI1/sgOmG9uO+Y8DW+7jS2zAOnj6O2BndwuIAUtkdRN8gFoK3wwXMQyZwHVbClsuNLd4E3yAUR6FVDBR+BafQGt93LVMxJTv8ABts4CVLhcfYWsCb5kC9/BHdU8CLYFY5bMAd+eX9MGthhpbA1vu4B7+RKkaW2Yq4AQtVBBFsAJU/AuIXBhN8gGWnstefhiZyWvLAEnbYS1uzSFP6Jvn4Baxx70JKkQojLib5AVTey1jjgkKJGO0AKWyOm7N7cSpgSpAdPH0Tfd/gp1z5C1ZgKqN9J2wFxcUUuAFLZAm+QC0Fb4YUVRFsAOvj4KW2dwtYE3yAWk/wS/PLMKfmuGHZ8MAXF/Ja32Yi5haAKWz4Ydm2cSpgU693Atb7km+Zwwh+WGcPpxw3gAkzCLY+iYUDW/Z3Adc/gpzyFrAqnALkJe+7DoItgAtRS2zuKqGE3yAx0oJvkdvYrfZmALURbDuL5/RLf13cAuDeBS2RpbtAm+QFVA3wR+3fUtFHoBDJnC0jIXH0HWsgMY8inPLuOkd9chp4z20ALQLSA8cI9jYAIa2zjzjBd8gRafS1vgiUho/kAKcsCGTOGWvoOpkAtB3z8Hm8x2Ff5ADp4+lXAlIvcmwH/2Q==') repeat left top; 34 | } 35 | 36 | pre[class*="language-"] { 37 | padding: 12px; 38 | overflow: auto; 39 | } 40 | 41 | :not(pre) > code[class*="language-"] { 42 | padding: 2px 6px; 43 | } 44 | 45 | .token.namespace { 46 | opacity: .7; 47 | } 48 | .token.comment, 49 | .token.prolog, 50 | .token.doctype, 51 | .token.cdata { 52 | color: #586e75; 53 | font-style: italic; 54 | } 55 | .token.number, 56 | .token.string, 57 | .token.char, 58 | .token.builtin, 59 | .token.inserted { 60 | color: #468966; 61 | } 62 | 63 | .token.attr-name { 64 | color: #b89859; 65 | } 66 | .token.operator, 67 | .token.entity, 68 | .token.url, 69 | .language-css .token.string, 70 | .style .token.string { 71 | color: #dccf8f; 72 | } 73 | .token.selector, 74 | .token.regex { 75 | color: #859900; 76 | } 77 | .token.atrule, 78 | .token.keyword { 79 | color: #cb4b16; 80 | } 81 | 82 | .token.attr-value { 83 | color: #468966; 84 | } 85 | .token.function, 86 | .token.variable, 87 | .token.placeholder { 88 | color: #b58900; 89 | } 90 | .token.property, 91 | .token.tag, 92 | .token.boolean, 93 | .token.number, 94 | .token.constant, 95 | .token.symbol { 96 | color: #b89859; 97 | } 98 | .token.tag { 99 | color: #ffb03b; 100 | } 101 | .token.important, 102 | .token.statement, 103 | .token.deleted { 104 | color: #dc322f; 105 | } 106 | .token.punctuation { 107 | color: #dccf8f; 108 | } 109 | .token.entity { 110 | cursor: help; 111 | } 112 | .token.bold { 113 | font-weight: bold; 114 | } 115 | .token.italic { 116 | font-style: italic; 117 | } 118 | 119 | /* 120 | .pojoaque-colors { 121 | color: #586e75; 122 | color: #b64926; 123 | color: #468966; 124 | color: #ffb03b; 125 | color: #b58900; 126 | color: #b89859; 127 | color: #dccf8f; 128 | color: #d3a60c; 129 | color: #cb4b16; 130 | color: #dc322f; 131 | color: #073642; 132 | color: #181914; 133 | } 134 | */ 135 | 136 | pre.line-numbers { 137 | position: relative; 138 | padding-left: 3.8em; 139 | counter-reset: linenumber; 140 | } 141 | 142 | pre.line-numbers > code { 143 | position: relative; 144 | } 145 | 146 | .line-numbers .line-numbers-rows { 147 | position: absolute; 148 | pointer-events: none; 149 | top: 0; 150 | font-size: 100%; 151 | left: -3.8em; 152 | width: 3em; /* works for line-numbers below 1000 lines */ 153 | letter-spacing: -1px; 154 | border-right: 1px solid #999; 155 | 156 | -webkit-user-select: none; 157 | -moz-user-select: none; 158 | -ms-user-select: none; 159 | user-select: none; 160 | 161 | } 162 | 163 | .line-numbers-rows > span { 164 | pointer-events: none; 165 | display: block; 166 | counter-increment: linenumber; 167 | } 168 | 169 | .line-numbers-rows > span:before { 170 | content: counter(linenumber); 171 | color: #999; 172 | display: block; 173 | padding-right: 0.8em; 174 | text-align: right; 175 | } 176 | 177 | div.prism-show-language { 178 | position: relative; 179 | } 180 | 181 | div.prism-show-language > div.prism-show-language-label[data-language] { 182 | color: black; 183 | background-color: #CFCFCF; 184 | display: inline-block; 185 | position: absolute; 186 | bottom: auto; 187 | left: auto; 188 | top: 0; 189 | right: 0; 190 | width: auto; 191 | height: auto; 192 | font-size: 0.9em; 193 | border-radius: 0 0 0 5px; 194 | padding: 0 0.5em; 195 | text-shadow: none; 196 | z-index: 1; 197 | -webkit-box-shadow: none; 198 | -moz-box-shadow: none; 199 | box-shadow: none; 200 | -webkit-transform: none; 201 | -moz-transform: none; 202 | -ms-transform: none; 203 | -o-transform: none; 204 | transform: none; 205 | } 206 | -------------------------------------------------------------------------------- /themes/prism-coy.css: -------------------------------------------------------------------------------- 1 | /* http://prismjs.com/download.html?themes=prism-coy&languages=markup+css+clike+javascript+actionscript+applescript+aspnet+bash+basic+batch+c+csharp+cpp+coffeescript+ruby+css-extras+go+groovy+java+latex+lua+markdown+objectivec+php+php-extras+powershell+python+sass+scss+sql+swift+yaml&plugins=line-numbers+show-language */ 2 | /** 3 | * prism.js Coy theme for JavaScript, CoffeeScript, CSS and HTML 4 | * Based on https://github.com/tshedor/workshop-wp-theme (Example: http://workshop.kansan.com/category/sessions/basics or http://workshop.timshedor.com/category/sessions/basics); 5 | * @author Tim Shedor 6 | */ 7 | 8 | code[class*="language-"], 9 | pre[class*="language-"] { 10 | color: black; 11 | font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; 12 | direction: ltr; 13 | text-align: left; 14 | white-space: pre; 15 | word-spacing: normal; 16 | word-break: normal; 17 | word-wrap: normal; 18 | line-height: 1.5; 19 | 20 | -moz-tab-size: 4; 21 | -o-tab-size: 4; 22 | tab-size: 4; 23 | 24 | -webkit-hyphens: none; 25 | -moz-hyphens: none; 26 | -ms-hyphens: none; 27 | hyphens: none; 28 | } 29 | 30 | /* Code blocks */ 31 | pre[class*="language-"] { 32 | position: relative; 33 | margin: .5em 0; 34 | /* 358ccb */ 35 | -webkit-box-shadow: -1px 0px 0px 0px #AAA, 0px 0px 0px 1px #dfdfdf; 36 | -moz-box-shadow: -1px 0px 0px 0px #AAA, 0px 0px 0px 1px #dfdfdf; 37 | box-shadow: -1px 0px 0px 0px #AAA, 0px 0px 0px 1px #dfdfdf; 38 | border-left: 10px solid #AAA; 39 | overflow: visible; 40 | max-height: 30em; 41 | padding: 0; 42 | } 43 | 44 | pre[class*="language-"] code { 45 | background-color: #fdfdfd; 46 | background-image: -webkit-repeating-linear-gradient(180deg, transparent, transparent 1.5em, rgba(69, 142, 209, 0.04) 1.5em, rgba(69, 142, 209, 0.04) 3em); 47 | background-image: -moz-repeating-linear-gradient(180deg, transparent, transparent 1.5em, rgba(69, 142, 209, 0.04) 1.5em, rgba(69, 142, 209, 0.04) 3em); 48 | background-image: -ms-repeating-linear-gradient(180deg, transparent, transparent 1.5em, rgba(69, 142, 209, 0.04) 1.5em, rgba(69, 142, 209, 0.04) 3em); 49 | background-image: -o-repeating-linear-gradient(180deg, transparent, transparent 1.5em, rgba(69, 142, 209, 0.04) 1.5em, rgba(69, 142, 209, 0.04) 3em); 50 | background-image: repeating-linear-gradient(180deg, transparent, transparent 1.5em, rgba(69, 142, 209, 0.04) 1.5em, rgba(69, 142, 209, 0.04) 3em); 51 | background-origin: content-box; 52 | background-attachment: local; 53 | } 54 | 55 | code[class*="language"] { 56 | max-height: inherit; 57 | height: 100%; 58 | padding: 0 1em; 59 | display: block; 60 | overflow: auto; 61 | } 62 | 63 | /* Margin bottom to accomodate shadow */ 64 | :not(pre) > code[class*="language-"], 65 | pre[class*="language-"] { 66 | background-color: #fdfdfd; 67 | -webkit-box-sizing: border-box; 68 | -moz-box-sizing: border-box; 69 | box-sizing: border-box; 70 | margin-bottom: 1em; 71 | } 72 | 73 | /* Inline code */ 74 | :not(pre) > code[class*="language-"] { 75 | position: relative; 76 | padding: 0 .2em; 77 | margin: 0 0.1em; 78 | -webkit-border-radius: 0.3em; 79 | -moz-border-radius: 0.3em; 80 | -ms-border-radius: 0.3em; 81 | -o-border-radius: 0.3em; 82 | border-radius: 0.3em; 83 | /* color: #c92c2c; */ 84 | border: 1px solid rgba(0, 0, 0, 0.1); 85 | display: inline; 86 | white-space: normal; 87 | word-break: break-all; 88 | word-wrap: break-word; 89 | } 90 | 91 | /* 92 | pre[class*="language-"]:before, 93 | pre[class*="language-"]:after { 94 | content: ''; 95 | z-index: -2; 96 | display: block; 97 | position: absolute; 98 | bottom: 0.75em; 99 | left: 0.18em; 100 | width: 40%; 101 | height: 20%; 102 | -webkit-box-shadow: 0px 13px 8px #979797; 103 | -moz-box-shadow: 0px 13px 8px #979797; 104 | box-shadow: 0px 13px 8px #979797; 105 | -webkit-transform: rotate(-2deg); 106 | -moz-transform: rotate(-2deg); 107 | -ms-transform: rotate(-2deg); 108 | -o-transform: rotate(-2deg); 109 | transform: rotate(-2deg); 110 | } 111 | */ 112 | 113 | :not(pre) > code[class*="language-"]:after, 114 | pre[class*="language-"]:after { 115 | right: 0.75em; 116 | left: auto; 117 | -webkit-transform: rotate(2deg); 118 | -moz-transform: rotate(2deg); 119 | -ms-transform: rotate(2deg); 120 | -o-transform: rotate(2deg); 121 | transform: rotate(2deg); 122 | } 123 | 124 | .token.comment, 125 | .token.block-comment, 126 | .token.prolog, 127 | .token.doctype, 128 | .token.cdata { 129 | color: #7D8B99; 130 | } 131 | 132 | .token.punctuation { 133 | color: #5F6364; 134 | } 135 | 136 | .token.property, 137 | .token.tag, 138 | .token.boolean, 139 | .token.number, 140 | .token.function-name, 141 | .token.constant, 142 | .token.symbol, 143 | .token.deleted { 144 | color: #c92c2c; 145 | } 146 | 147 | .token.selector, 148 | .token.attr-name, 149 | .token.function, 150 | .token.builtin, 151 | .token.inserted { 152 | color: #2f9c0a; 153 | } 154 | 155 | .token.string, 156 | .token.char { 157 | color: #9c2f0a; 158 | } 159 | 160 | .token.entity, 161 | .token.url, 162 | .token.variable { 163 | color: #a67f59; 164 | background: rgba(255, 255, 255, 0.5); 165 | } 166 | 167 | .token.operator { 168 | color: #a67f59; 169 | } 170 | 171 | .token.atrule, 172 | .token.attr-value, 173 | .token.keyword { 174 | color: #1990b8; 175 | } 176 | 177 | .token.class-name { 178 | color: #666; 179 | text-decoration: underline; 180 | } 181 | 182 | .token.regex, 183 | .token.important { 184 | color: #e90; 185 | } 186 | 187 | .language-css .token.string, 188 | .style .token.string { 189 | color: #a67f59; 190 | background: rgba(255, 255, 255, 0.5); 191 | } 192 | 193 | .token.important { 194 | font-weight: normal; 195 | } 196 | 197 | .token.bold { 198 | font-weight: bold; 199 | } 200 | .token.italic { 201 | font-style: italic; 202 | } 203 | 204 | .token.entity { 205 | cursor: help; 206 | } 207 | 208 | .namespace { 209 | opacity: .7; 210 | } 211 | 212 | @media screen and (max-width: 767px) { 213 | pre[class*="language-"]:before, 214 | pre[class*="language-"]:after { 215 | bottom: 14px; 216 | -webkit-box-shadow: none; 217 | -moz-box-shadow: none; 218 | box-shadow: none; 219 | } 220 | 221 | } 222 | 223 | /* Plugin styles */ 224 | .token.tab:not(:empty):before, 225 | .token.cr:before, 226 | .token.lf:before { 227 | color: #e0d7d1; 228 | } 229 | 230 | /* Plugin styles: Line Numbers */ 231 | pre[class*="language-"].line-numbers { 232 | padding-left: 0; 233 | } 234 | 235 | pre[class*="language-"].line-numbers code { 236 | padding-left: 3.8em; 237 | } 238 | 239 | pre[class*="language-"].line-numbers .line-numbers-rows { 240 | left: 0; 241 | } 242 | 243 | /* Plugin styles: Line Highlight */ 244 | pre[class*="language-"][data-line] { 245 | padding-top: 0; 246 | padding-bottom: 0; 247 | padding-left: 0; 248 | } 249 | pre[data-line] code { 250 | position: relative; 251 | padding-left: 4em; 252 | } 253 | pre .line-highlight { 254 | margin-top: 0; 255 | } 256 | 257 | pre.line-numbers { 258 | position: relative; 259 | padding-left: 3.8em; 260 | counter-reset: linenumber; 261 | } 262 | 263 | pre.line-numbers > code { 264 | position: relative; 265 | } 266 | 267 | .line-numbers .line-numbers-rows { 268 | position: absolute; 269 | pointer-events: none; 270 | top: 0; 271 | font-size: 100%; 272 | left: -3.8em; 273 | width: 3em; /* works for line-numbers below 1000 lines */ 274 | letter-spacing: -1px; 275 | border-right: 1px solid #999; 276 | 277 | -webkit-user-select: none; 278 | -moz-user-select: none; 279 | -ms-user-select: none; 280 | user-select: none; 281 | 282 | } 283 | 284 | .line-numbers-rows > span { 285 | pointer-events: none; 286 | display: block; 287 | counter-increment: linenumber; 288 | } 289 | 290 | .line-numbers-rows > span:before { 291 | content: counter(linenumber); 292 | color: #999; 293 | display: block; 294 | padding-right: 0.8em; 295 | text-align: right; 296 | } 297 | div.prism-show-language { 298 | position: relative; 299 | } 300 | 301 | div.prism-show-language > div.prism-show-language-label[data-language] { 302 | color: black; 303 | background-color: #CFCFCF; 304 | display: inline-block; 305 | position: absolute; 306 | bottom: auto; 307 | left: auto; 308 | top: 0; 309 | right: 0; 310 | width: auto; 311 | height: auto; 312 | font-size: 0.9em; 313 | border-radius: 0 0 0 5px; 314 | padding: 0 0.5em; 315 | text-shadow: none; 316 | z-index: 1; 317 | -webkit-box-shadow: none; 318 | -moz-box-shadow: none; 319 | box-shadow: none; 320 | -webkit-transform: none; 321 | -moz-transform: none; 322 | -ms-transform: none; 323 | -o-transform: none; 324 | transform: none; 325 | } 326 | 327 | -------------------------------------------------------------------------------- /prism.js: -------------------------------------------------------------------------------- 1 | /* http://prismjs.com/download.html?themes=prism-okaidia&languages=markup+css+clike+javascript+actionscript+applescript+aspnet+bash+basic+batch+c+csharp+cpp+coffeescript+ruby+css-extras+go+groovy+java+latex+lua+markdown+objectivec+php+php-extras+powershell+python+sass+scss+sql+swift+yaml&plugins=line-numbers+show-language */ 2 | var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(){var e=/\blang(?:uage)?-(?!\*)(\w+)\b/i,t=_self.Prism={util:{encode:function(e){return e instanceof n?new n(e.type,t.util.encode(e.content),e.alias):"Array"===t.util.type(e)?e.map(t.util.encode):e.replace(/&/g,"&").replace(/e.length)break e;if(!(d instanceof a)){u.lastIndex=0;var m=u.exec(d);if(m){c&&(f=m[1].length);var y=m.index-1+f,m=m[0].slice(f),v=m.length,k=y+v,b=d.slice(0,y+1),w=d.slice(k+1),P=[p,1];b&&P.push(b);var A=new a(i,g?t.tokenize(m,g):m,h);P.push(A),w&&P.push(w),Array.prototype.splice.apply(r,P)}}}}}return r},hooks:{all:{},add:function(e,n){var a=t.hooks.all;a[e]=a[e]||[],a[e].push(n)},run:function(e,n){var a=t.hooks.all[e];if(a&&a.length)for(var r,l=0;r=a[l++];)r(n)}}},n=t.Token=function(e,t,n){this.type=e,this.content=t,this.alias=n};if(n.stringify=function(e,a,r){if("string"==typeof e)return e;if("Array"===t.util.type(e))return e.map(function(t){return n.stringify(t,a,e)}).join("");var l={type:e.type,content:n.stringify(e.content,a,r),tag:"span",classes:["token",e.type],attributes:{},language:a,parent:r};if("comment"==l.type&&(l.attributes.spellcheck="true"),e.alias){var i="Array"===t.util.type(e.alias)?e.alias:[e.alias];Array.prototype.push.apply(l.classes,i)}t.hooks.run("wrap",l);var o="";for(var s in l.attributes)o+=(o?" ":"")+s+'="'+(l.attributes[s]||"")+'"';return"<"+l.tag+' class="'+l.classes.join(" ")+'" '+o+">"+l.content+""},!_self.document)return _self.addEventListener?(_self.addEventListener("message",function(e){var n=JSON.parse(e.data),a=n.language,r=n.code,l=n.immediateClose;_self.postMessage(t.highlight(r,t.languages[a],a)),l&&_self.close()},!1),_self.Prism):_self.Prism;var a=document.getElementsByTagName("script");return a=a[a.length-1],a&&(t.filename=a.src,document.addEventListener&&!a.hasAttribute("data-manual")&&document.addEventListener("DOMContentLoaded",t.highlightAll)),_self.Prism}();"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism); 3 | Prism.languages.markup={comment://,prolog:/<\?[\w\W]+?\?>/,doctype://,cdata://i,tag:{pattern:/<\/?(?!\d)[^\s>\/=.$<]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\\1|\\?(?!\1)[\w\W])*\1|[^\s'">=]+))?)*\s*\/?>/i,inside:{tag:{pattern:/^<\/?[^\s>\/]+/i,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"attr-value":{pattern:/=(?:('|")[\w\W]*?(\1)|[^\s>]+)/i,inside:{punctuation:/[=>"']/}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:/&#?[\da-z]{1,8};/i},Prism.hooks.add("wrap",function(a){"entity"===a.type&&(a.attributes.title=a.content.replace(/&/,"&"))}),Prism.languages.xml=Prism.languages.markup,Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup; 4 | Prism.languages.css={comment:/\/\*[\w\W]*?\*\//,atrule:{pattern:/@[\w-]+?.*?(;|(?=\s*\{))/i,inside:{rule:/@[\w-]+/}},url:/url\((?:(["'])(\\(?:\r\n|[\w\W])|(?!\1)[^\\\r\n])*\1|.*?)\)/i,selector:/[^\{\}\s][^\{\};]*?(?=\s*\{)/,string:/("|')(\\(?:\r\n|[\w\W])|(?!\1)[^\\\r\n])*\1/,property:/(\b|\B)[\w-]+(?=\s*:)/i,important:/\B!important\b/i,"function":/[-a-z0-9]+(?=\()/i,punctuation:/[(){};:]/},Prism.languages.css.atrule.inside.rest=Prism.util.clone(Prism.languages.css),Prism.languages.markup&&(Prism.languages.insertBefore("markup","tag",{style:{pattern:/()[\w\W]*?(?=<\/style>)/i,lookbehind:!0,inside:Prism.languages.css,alias:"language-css"}}),Prism.languages.insertBefore("inside","attr-value",{"style-attr":{pattern:/\s*style=("|').*?\1/i,inside:{"attr-name":{pattern:/^\s*style/i,inside:Prism.languages.markup.tag.inside},punctuation:/^\s*=\s*['"]|['"]\s*$/,"attr-value":{pattern:/.+/i,inside:Prism.languages.css}},alias:"language-css"}},Prism.languages.markup.tag)); 5 | Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\w\W]*?\*\//,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0}],string:/(["'])(\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,"class-name":{pattern:/((?:\b(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[a-z0-9_\.\\]+/i,lookbehind:!0,inside:{punctuation:/(\.|\\)/}},keyword:/\b(if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,"boolean":/\b(true|false)\b/,"function":/[a-z0-9_]+(?=\()/i,number:/\b-?(?:0x[\da-f]+|\d*\.?\d+(?:e[+-]?\d+)?)\b/i,operator:/--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/,punctuation:/[{}[\];(),.:]/}; 6 | Prism.languages.javascript=Prism.languages.extend("clike",{keyword:/\b(as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|var|void|while|with|yield)\b/,number:/\b-?(0x[\dA-Fa-f]+|0b[01]+|0o[0-7]+|\d*\.?\d+([Ee][+-]?\d+)?|NaN|Infinity)\b/,"function":/[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*(?=\()/i}),Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/(^|[^\/])\/(?!\/)(\[.+?]|\\.|[^\/\\\r\n])+\/[gimyu]{0,5}(?=\s*($|[\r\n,.;})]))/,lookbehind:!0}}),Prism.languages.insertBefore("javascript","class-name",{"template-string":{pattern:/`(?:\\`|\\?[^`])*`/,inside:{interpolation:{pattern:/\$\{[^}]+\}/,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}}}),Prism.languages.markup&&Prism.languages.insertBefore("markup","tag",{script:{pattern:/()[\w\W]*?(?=<\/script>)/i,lookbehind:!0,inside:Prism.languages.javascript,alias:"language-javascript"}}),Prism.languages.js=Prism.languages.javascript; 7 | Prism.languages.actionscript=Prism.languages.extend("javascript",{keyword:/\b(?:as|break|case|catch|class|const|default|delete|do|else|extends|finally|for|function|if|implements|import|in|instanceof|interface|internal|is|native|new|null|package|private|protected|public|return|super|switch|this|throw|try|typeof|use|var|void|while|with|dynamic|each|final|get|include|namespace|native|override|set|static)\b/,operator:/\+\+|--|(?:[+\-*\/%^]|&&?|\|\|?|<>?>?|[!=]=?)=?|[~?@]/}),Prism.languages.actionscript["class-name"].alias="function",Prism.languages.markup&&Prism.languages.insertBefore("actionscript","string",{xml:{pattern:/(^|[^.])<\/?\w+(?:\s+[^\s>\/=]+=("|')(?:\\\1|\\?(?!\1)[\w\W])*\2)*\s*\/?>/,lookbehind:!0,inside:{rest:Prism.languages.markup}}}); 8 | Prism.languages.applescript={comment:[/\(\*(?:\(\*[\w\W]*?\*\)|[\w\W])*?\*\)/,/--.+/,/#.+/],string:/"(?:\\?.)*?"/,number:/\b-?\d*\.?\d+([Ee]-?\d+)?\b/,operator:[/[&=≠≤≥*+\-\/÷^]|[<>]=?/,/\b(?:(?:start|begin|end)s? with|(?:(?:does not|doesn't) contain|contains?)|(?:is|isn't|is not) (?:in|contained by)|(?:(?:is|isn't|is not) )?(?:greater|less) than(?: or equal)?(?: to)?|(?:(?:does not|doesn't) come|comes) (?:before|after)|(?:is|isn't|is not) equal(?: to)?|(?:(?:does not|doesn't) equal|equals|equal to|isn't|is not)|(?:a )?(?:ref(?: to)?|reference to)|(?:and|or|div|mod|as|not))\b/],keyword:/\b(?:about|above|after|against|apart from|around|aside from|at|back|before|beginning|behind|below|beneath|beside|between|but|by|considering|continue|copy|does|eighth|else|end|equal|error|every|exit|false|fifth|first|for|fourth|from|front|get|given|global|if|ignoring|in|instead of|into|is|it|its|last|local|me|middle|my|ninth|of|on|onto|out of|over|prop|property|put|repeat|return|returning|second|set|seventh|since|sixth|some|tell|tenth|that|the|then|third|through|thru|timeout|times|to|transaction|true|try|until|where|while|whose|with|without)\b/,"class":{pattern:/\b(?:alias|application|boolean|class|constant|date|file|integer|list|number|POSIX file|real|record|reference|RGB color|script|text|centimetres|centimeters|feet|inches|kilometres|kilometers|metres|meters|miles|yards|square feet|square kilometres|square kilometers|square metres|square meters|square miles|square yards|cubic centimetres|cubic centimeters|cubic feet|cubic inches|cubic metres|cubic meters|cubic yards|gallons|litres|liters|quarts|grams|kilograms|ounces|pounds|degrees Celsius|degrees Fahrenheit|degrees Kelvin)\b/,alias:"builtin"},punctuation:/[{}():,¬«»《》]/}; 9 | Prism.languages.aspnet=Prism.languages.extend("markup",{"page-directive tag":{pattern:/<%\s*@.*%>/i,inside:{"page-directive tag":/<%\s*@\s*(?:Assembly|Control|Implements|Import|Master(?:Type)?|OutputCache|Page|PreviousPageType|Reference|Register)?|%>/i,rest:Prism.languages.markup.tag.inside}},"directive tag":{pattern:/<%.*%>/i,inside:{"directive tag":/<%\s*?[$=%#:]{0,2}|%>/i,rest:Prism.languages.csharp}}}),Prism.languages.aspnet.tag.pattern=/<(?!%)\/?[^\s>\/]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\\1|\\?(?!\1)[\w\W])*\1|[^\s'">=]+))?)*\s*\/?>/i,Prism.languages.insertBefore("inside","punctuation",{"directive tag":Prism.languages.aspnet["directive tag"]},Prism.languages.aspnet.tag.inside["attr-value"]),Prism.languages.insertBefore("aspnet","comment",{"asp comment":/<%--[\w\W]*?--%>/}),Prism.languages.insertBefore("aspnet",Prism.languages.javascript?"script":"tag",{"asp script":{pattern:/()[\w\W]*?(?=<\/script>)/i,lookbehind:!0,inside:Prism.languages.csharp||{}}}); 10 | !function(e){var t={variable:[{pattern:/\$?\(\([\w\W]+?\)\)/,inside:{variable:[{pattern:/(^\$\(\([\w\W]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b-?(?:0x[\dA-Fa-f]+|\d*\.?\d+(?:[Ee]-?\d+)?)\b/,operator:/--?|-=|\+\+?|\+=|!=?|~|\*\*?|\*=|\/=?|%=?|<<=?|>>=?|<=?|>=?|==?|&&?|&=|\^=?|\|\|?|\|=|\?|:/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\([^)]+\)|`[^`]+`/,inside:{variable:/^\$\(|^`|\)$|`$/}},/\$(?:[a-z0-9_#\?\*!@]+|\{[^}]+\})/i]};e.languages.bash={shebang:{pattern:/^#!\s*\/bin\/bash|^#!\s*\/bin\/sh/,alias:"important"},comment:{pattern:/(^|[^"{\\])#.*/,lookbehind:!0},string:[{pattern:/((?:^|[^<])<<\s*)(?:"|')?(\w+?)(?:"|')?\s*\r?\n(?:[\s\S])*?\r?\n\2/g,lookbehind:!0,inside:t},{pattern:/("|')(?:\\?[\s\S])*?\1/g,inside:t}],variable:t.variable,"function":{pattern:/(^|\s|;|\||&)(?:alias|apropos|apt-get|aptitude|aspell|awk|basename|bash|bc|bg|builtin|bzip2|cal|cat|cd|cfdisk|chgrp|chmod|chown|chroot|chkconfig|cksum|clear|cmp|comm|command|cp|cron|crontab|csplit|cut|date|dc|dd|ddrescue|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|du|egrep|eject|enable|env|ethtool|eval|exec|expand|expect|export|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|getopts|git|grep|groupadd|groupdel|groupmod|groups|gzip|hash|head|help|hg|history|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|jobs|join|kill|killall|less|link|ln|locate|logname|logout|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|make|man|mkdir|mkfifo|mkisofs|mknod|more|most|mount|mtools|mtr|mv|mmv|nano|netstat|nice|nl|nohup|notify-send|nslookup|open|op|passwd|paste|pathchk|ping|pkill|popd|pr|printcap|printenv|printf|ps|pushd|pv|pwd|quota|quotacheck|quotactl|ram|rar|rcp|read|readarray|readonly|reboot|rename|renice|remsync|rev|rm|rmdir|rsync|screen|scp|sdiff|sed|seq|service|sftp|shift|shopt|shutdown|sleep|slocate|sort|source|split|ssh|stat|strace|su|sudo|sum|suspend|sync|tail|tar|tee|test|time|timeout|times|touch|top|traceroute|trap|tr|tsort|tty|type|ulimit|umask|umount|unalias|uname|unexpand|uniq|units|unrar|unshar|uptime|useradd|userdel|usermod|users|uuencode|uudecode|v|vdir|vi|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yes|zip)(?=$|\s|;|\||&)/,lookbehind:!0},keyword:{pattern:/(^|\s|;|\||&)(?:let|:|\.|if|then|else|elif|fi|for|break|continue|while|in|case|function|select|do|done|until|echo|exit|return|set|declare)(?=$|\s|;|\||&)/,lookbehind:!0},"boolean":{pattern:/(^|\s|;|\||&)(?:true|false)(?=$|\s|;|\||&)/,lookbehind:!0},operator:/&&?|\|\|?|==?|!=?|<<>|<=?|>=?|=~/,punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];]/};var a=t.variable[1].inside;a["function"]=e.languages.bash["function"],a.keyword=e.languages.bash.keyword,a.boolean=e.languages.bash.boolean,a.operator=e.languages.bash.operator,a.punctuation=e.languages.bash.punctuation}(Prism); 11 | Prism.languages.basic={string:/"(?:""|[!#$%&'()*,\/:;<=>?^_ +\-.A-Z\d])*"/i,comment:{pattern:/(?:!|REM\b).+/i,inside:{keyword:/^REM/i}},number:/(?:\b|\B[.-])(?:\d+\.?\d*)(?:E[+-]?\d+)?/i,keyword:/\b(?:AS|BEEP|BLOAD|BSAVE|CALL(?: ABSOLUTE)?|CASE|CHAIN|CHDIR|CLEAR|CLOSE|CLS|COM|COMMON|CONST|DATA|DECLARE|DEF(?: FN| SEG|DBL|INT|LNG|SNG|STR)|DIM|DO|DOUBLE|ELSE|ELSEIF|END|ENVIRON|ERASE|ERROR|EXIT|FIELD|FILES|FOR|FUNCTION|GET|GOSUB|GOTO|IF|INPUT|INTEGER|IOCTL|KEY|KILL|LINE INPUT|LOCATE|LOCK|LONG|LOOP|LSET|MKDIR|NAME|NEXT|OFF|ON(?: COM| ERROR| KEY| TIMER)?|OPEN|OPTION BASE|OUT|POKE|PUT|READ|REDIM|REM|RESTORE|RESUME|RETURN|RMDIR|RSET|RUN|SHARED|SINGLE|SELECT CASE|SHELL|SLEEP|STATIC|STEP|STOP|STRING|SUB|SWAP|SYSTEM|THEN|TIMER|TO|TROFF|TRON|TYPE|UNLOCK|UNTIL|USING|VIEW PRINT|WAIT|WEND|WHILE|WRITE)(?:\$|\b)/i,"function":/\b(?:ABS|ACCESS|ACOS|ANGLE|AREA|ARITHMETIC|ARRAY|ASIN|ASK|AT|ATN|BASE|BEGIN|BREAK|CAUSE|CEIL|CHR|CLIP|COLLATE|COLOR|CON|COS|COSH|COT|CSC|DATE|DATUM|DEBUG|DECIMAL|DEF|DEG|DEGREES|DELETE|DET|DEVICE|DISPLAY|DOT|ELAPSED|EPS|ERASABLE|EXLINE|EXP|EXTERNAL|EXTYPE|FILETYPE|FIXED|FP|GO|GRAPH|HANDLER|IDN|IMAGE|IN|INT|INTERNAL|IP|IS|KEYED|LBOUND|LCASE|LEFT|LEN|LENGTH|LET|LINE|LINES|LOG|LOG10|LOG2|LTRIM|MARGIN|MAT|MAX|MAXNUM|MID|MIN|MISSING|MOD|NATIVE|NUL|NUMERIC|OF|OPTION|ORD|ORGANIZATION|OUTIN|OUTPUT|PI|POINT|POINTER|POINTS|POS|PRINT|PROGRAM|PROMPT|RAD|RADIANS|RANDOMIZE|RECORD|RECSIZE|RECTYPE|RELATIVE|REMAINDER|REPEAT|REST|RETRY|REWRITE|RIGHT|RND|ROUND|RTRIM|SAME|SEC|SELECT|SEQUENTIAL|SET|SETTER|SGN|SIN|SINH|SIZE|SKIP|SQR|STANDARD|STATUS|STR|STREAM|STYLE|TAB|TAN|TANH|TEMPLATE|TEXT|THERE|TIME|TIMEOUT|TRACE|TRANSFORM|TRUNCATE|UBOUND|UCASE|USE|VAL|VARIABLE|VIEWPORT|WHEN|WINDOW|WITH|ZER|ZONEWIDTH)(?:\$|\b)/i,operator:/<[=>]?|>=?|[+\-*\/^=&]|\b(?:AND|EQV|IMP|NOT|OR|XOR)\b/i,punctuation:/[,;:()]/}; 12 | !function(e){var r=/%%?[~:\w]+%?|!\S+!/,t={pattern:/\/[a-z?]+(?=[ :]|$):?|-[a-z]\b|--[a-z-]+\b/im,alias:"attr-name",inside:{punctuation:/:/}},n=/"[^"]*"/,i=/(?:\b|-)\d+\b/;e.languages.batch={comment:[/^::.*/m,{pattern:/((?:^|[&(])[ \t]*)rem\b(?:[^^&)\r\n]|\^(?:\r\n|[\s\S]))*/im,lookbehind:!0}],label:{pattern:/^:.*/m,alias:"property"},command:[{pattern:/((?:^|[&(])[ \t]*)for(?: ?\/[a-z?](?:[ :](?:"[^"]*"|\S+))?)* \S+ in \([^)]+\) do/im,lookbehind:!0,inside:{keyword:/^for\b|\b(?:in|do)\b/i,string:n,parameter:t,variable:r,number:i,punctuation:/[()',]/}},{pattern:/((?:^|[&(])[ \t]*)if(?: ?\/[a-z?](?:[ :](?:"[^"]*"|\S+))?)* (?:not )?(?:cmdextversion \d+|defined \w+|errorlevel \d+|exist \S+|(?:"[^"]*"|\S+)?(?:==| (?:equ|neq|lss|leq|gtr|geq) )(?:"[^"]*"|\S+))/im,lookbehind:!0,inside:{keyword:/^if\b|\b(?:not|cmdextversion|defined|errorlevel|exist)\b/i,string:n,parameter:t,variable:r,number:i,operator:/\^|==|\b(?:equ|neq|lss|leq|gtr|geq)\b/i}},{pattern:/((?:^|[&()])[ \t]*)else\b/im,lookbehind:!0,inside:{keyword:/^else\b/i}},{pattern:/((?:^|[&(])[ \t]*)set(?: ?\/[a-z](?:[ :](?:"[^"]*"|\S+))?)* (?:[^^&)\r\n]|\^(?:\r\n|[\s\S]))*/im,lookbehind:!0,inside:{keyword:/^set\b/i,string:n,parameter:t,variable:[r,/\w+(?=(?:[*\/%+\-&^|]|<<|>>)?=)/],number:i,operator:/[*\/%+\-&^|]=?|<<=?|>>=?|[!~_=]/,punctuation:/[()',]/}},{pattern:/((?:^|[&(])[ \t]*@?)\w+\b(?:[^^&)\r\n]|\^(?:\r\n|[\s\S]))*/im,lookbehind:!0,inside:{keyword:/^\w+\b/i,string:n,parameter:t,label:{pattern:/(^\s*):\S+/m,lookbehind:!0,alias:"property"},variable:r,number:i,operator:/\^/}}],operator:/[&@]/,punctuation:/[()']/}}(Prism); 13 | Prism.languages.c=Prism.languages.extend("clike",{keyword:/\b(asm|typeof|inline|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|union|unsigned|void|volatile|while)\b/,operator:/\-[>-]?|\+\+?|!=?|<>?=?|==?|&&?|\|?\||[~^%?*\/]/,number:/\b-?(?:0x[\da-f]+|\d*\.?\d+(?:e[+-]?\d+)?)[ful]*\b/i}),Prism.languages.insertBefore("c","string",{macro:{pattern:/(^\s*)#\s*[a-z]+([^\r\n\\]|\\.|\\(?:\r\n?|\n))*/im,lookbehind:!0,alias:"property",inside:{string:{pattern:/(#\s*include\s*)(<.+?>|("|')(\\?.)+?\3)/,lookbehind:!0},directive:{pattern:/(#\s*)\b(define|elif|else|endif|error|ifdef|ifndef|if|import|include|line|pragma|undef|using)\b/,lookbehind:!0,alias:"keyword"}}},constant:/\b(__FILE__|__LINE__|__DATE__|__TIME__|__TIMESTAMP__|__func__|EOF|NULL|stdin|stdout|stderr)\b/}),delete Prism.languages.c["class-name"],delete Prism.languages.c["boolean"]; 14 | Prism.languages.csharp=Prism.languages.extend("clike",{keyword:/\b(abstract|as|async|await|base|bool|break|byte|case|catch|char|checked|class|const|continue|decimal|default|delegate|do|double|else|enum|event|explicit|extern|false|finally|fixed|float|for|foreach|goto|if|implicit|in|int|interface|internal|is|lock|long|namespace|new|null|object|operator|out|override|params|private|protected|public|readonly|ref|return|sbyte|sealed|short|sizeof|stackalloc|static|string|struct|switch|this|throw|true|try|typeof|uint|ulong|unchecked|unsafe|ushort|using|virtual|void|volatile|while|add|alias|ascending|async|await|descending|dynamic|from|get|global|group|into|join|let|orderby|partial|remove|select|set|value|var|where|yield)\b/,string:[/@("|')(\1\1|\\\1|\\?(?!\1)[\s\S])*\1/,/("|')(\\?.)*?\1/],number:/\b-?(0x[\da-f]+|\d*\.?\d+f?)\b/i}),Prism.languages.insertBefore("csharp","keyword",{preprocessor:{pattern:/(^\s*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(\s*#)\b(define|elif|else|endif|endregion|error|if|line|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}}); 15 | Prism.languages.cpp=Prism.languages.extend("c",{keyword:/\b(alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|class|compl|const|constexpr|const_cast|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|float|for|friend|goto|if|inline|int|long|mutable|namespace|new|noexcept|nullptr|operator|private|protected|public|register|reinterpret_cast|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,"boolean":/\b(true|false)\b/,operator:/[-+]{1,2}|!=?|<{1,2}=?|>{1,2}=?|\->|:{1,2}|={1,2}|\^|~|%|&{1,2}|\|?\||\?|\*|\/|\b(and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/}),Prism.languages.insertBefore("cpp","keyword",{"class-name":{pattern:/(class\s+)[a-z0-9_]+/i,lookbehind:!0}}); 16 | !function(e){var n=/#(?!\{).+/,t={pattern:/#\{[^}]+\}/,alias:"variable"};e.languages.coffeescript=e.languages.extend("javascript",{comment:n,string:[/'(?:\\?[^\\])*?'/,{pattern:/"(?:\\?[^\\])*?"/,inside:{interpolation:t}}],keyword:/\b(and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/,"class-member":{pattern:/@(?!\d)\w+/,alias:"variable"}}),e.languages.insertBefore("coffeescript","comment",{"multiline-comment":{pattern:/###[\s\S]+?###/,alias:"comment"},"block-regex":{pattern:/\/{3}[\s\S]*?\/{3}/,alias:"regex",inside:{comment:n,interpolation:t}}}),e.languages.insertBefore("coffeescript","string",{"inline-javascript":{pattern:/`(?:\\?[\s\S])*?`/,inside:{delimiter:{pattern:/^`|`$/,alias:"punctuation"},rest:e.languages.javascript}},"multiline-string":[{pattern:/'''[\s\S]*?'''/,alias:"string"},{pattern:/"""[\s\S]*?"""/,alias:"string",inside:{interpolation:t}}]}),e.languages.insertBefore("coffeescript","keyword",{property:/(?!\d)\w+(?=\s*:(?!:))/})}(Prism); 17 | !function(e){e.languages.ruby=e.languages.extend("clike",{comment:/#(?!\{[^\r\n]*?\}).*/,keyword:/\b(alias|and|BEGIN|begin|break|case|class|def|define_method|defined|do|each|else|elsif|END|end|ensure|false|for|if|in|module|new|next|nil|not|or|raise|redo|require|rescue|retry|return|self|super|then|throw|true|undef|unless|until|when|while|yield)\b/});var n={pattern:/#\{[^}]+\}/,inside:{delimiter:{pattern:/^#\{|\}$/,alias:"tag"},rest:e.util.clone(e.languages.ruby)}};e.languages.insertBefore("ruby","keyword",{regex:[{pattern:/%r([^a-zA-Z0-9\s\{\(\[<])(?:[^\\]|\\[\s\S])*?\1[gim]{0,3}/,inside:{interpolation:n}},{pattern:/%r\((?:[^()\\]|\\[\s\S])*\)[gim]{0,3}/,inside:{interpolation:n}},{pattern:/%r\{(?:[^#{}\\]|#(?:\{[^}]+\})?|\\[\s\S])*\}[gim]{0,3}/,inside:{interpolation:n}},{pattern:/%r\[(?:[^\[\]\\]|\\[\s\S])*\][gim]{0,3}/,inside:{interpolation:n}},{pattern:/%r<(?:[^<>\\]|\\[\s\S])*>[gim]{0,3}/,inside:{interpolation:n}},{pattern:/(^|[^\/])\/(?!\/)(\[.+?]|\\.|[^\/\r\n])+\/[gim]{0,3}(?=\s*($|[\r\n,.;})]))/,lookbehind:!0}],variable:/[@$]+[a-zA-Z_][a-zA-Z_0-9]*(?:[?!]|\b)/,symbol:/:[a-zA-Z_][a-zA-Z_0-9]*(?:[?!]|\b)/}),e.languages.insertBefore("ruby","number",{builtin:/\b(Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Stat|File|Fixnum|Fload|Hash|Integer|IO|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|String|Struct|TMS|Symbol|ThreadGroup|Thread|Time|TrueClass)\b/,constant:/\b[A-Z][a-zA-Z_0-9]*(?:[?!]|\b)/}),e.languages.ruby.string=[{pattern:/%[qQiIwWxs]?([^a-zA-Z0-9\s\{\(\[<])(?:[^\\]|\\[\s\S])*?\1/,inside:{interpolation:n}},{pattern:/%[qQiIwWxs]?\((?:[^()\\]|\\[\s\S])*\)/,inside:{interpolation:n}},{pattern:/%[qQiIwWxs]?\{(?:[^#{}\\]|#(?:\{[^}]+\})?|\\[\s\S])*\}/,inside:{interpolation:n}},{pattern:/%[qQiIwWxs]?\[(?:[^\[\]\\]|\\[\s\S])*\]/,inside:{interpolation:n}},{pattern:/%[qQiIwWxs]?<(?:[^<>\\]|\\[\s\S])*>/,inside:{interpolation:n}},{pattern:/("|')(#\{[^}]+\}|\\(?:\r?\n|\r)|\\?.)*?\1/,inside:{interpolation:n}}]}(Prism); 18 | Prism.languages.css.selector={pattern:/[^\{\}\s][^\{\}]*(?=\s*\{)/,inside:{"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+(?:\(.*\))?/,"class":/\.[-:\.\w]+/,id:/#[-:\.\w]+/}},Prism.languages.insertBefore("css","function",{hexcode:/#[\da-f]{3,6}/i,entity:/\\[\da-f]{1,8}/i,number:/[\d%\.]+/}); 19 | Prism.languages.go=Prism.languages.extend("clike",{keyword:/\b(break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,builtin:/\b(bool|byte|complex(64|128)|error|float(32|64)|rune|string|u?int(8|16|32|64|)|uintptr|append|cap|close|complex|copy|delete|imag|len|make|new|panic|print(ln)?|real|recover)\b/,"boolean":/\b(_|iota|nil|true|false)\b/,operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,number:/\b(-?(0x[a-f\d]+|(\d+\.?\d*|\.\d+)(e[-+]?\d+)?)i?)\b/i,string:/("|'|`)(\\?.|\r|\n)*?\1/}),delete Prism.languages.go["class-name"]; 20 | Prism.languages.groovy=Prism.languages.extend("clike",{keyword:/\b(as|def|in|abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|native|new|package|private|protected|public|return|short|static|strictfp|super|switch|synchronized|this|throw|throws|trait|transient|try|void|volatile|while)\b/,string:/("""|''')[\W\w]*?\1|("|'|\/)(?:\\?.)*?\2|(\$\/)(\$\/\$|[\W\w])*?\/\$/,number:/\b(?:0b[01_]+|0x[\da-f_]+(?:\.[\da-f_p\-]+)?|[\d_]+(?:\.[\d_]+)?(?:e[+-]?[\d]+)?)[glidf]?\b/i,operator:{pattern:/(^|[^.])(~|==?~?|\?[.:]?|\*(?:[.=]|\*=?)?|\.[@&]|\.\.<|\.{1,2}(?!\.)|-[-=>]?|\+[+=]?|!=?|<(?:<=?|=>?)?|>(?:>>?=?|=)?|&[&=]?|\|[|=]?|\/=?|\^=?|%=?)/,lookbehind:!0},punctuation:/\.+|[{}[\];(),:$]/}),Prism.languages.insertBefore("groovy","string",{shebang:{pattern:/#!.+/,alias:"comment"}}),Prism.languages.insertBefore("groovy","punctuation",{"spock-block":/\b(setup|given|when|then|and|cleanup|expect|where):/}),Prism.languages.insertBefore("groovy","function",{annotation:{pattern:/(^|[^.])@\w+/,lookbehind:!0}}),Prism.hooks.add("wrap",function(e){if("groovy"===e.language&&"string"===e.type){var t=e.content[0];if("'"!=t){var n=/([^\\])(\$(\{.*?\}|[\w\.]+))/;"$"===t&&(n=/([^\$])(\$(\{.*?\}|[\w\.]+))/),e.content=Prism.highlight(e.content,{expression:{pattern:n,lookbehind:!0,inside:Prism.languages.groovy}}),e.classes.push("/"===t?"regex":"gstring")}}}); 21 | Prism.languages.java=Prism.languages.extend("clike",{keyword:/\b(abstract|continue|for|new|switch|assert|default|goto|package|synchronized|boolean|do|if|private|this|break|double|implements|protected|throw|byte|else|import|public|throws|case|enum|instanceof|return|transient|catch|extends|int|short|try|char|final|interface|static|void|class|finally|long|strictfp|volatile|const|float|native|super|while)\b/,number:/\b0b[01]+\b|\b0x[\da-f]*\.?[\da-fp\-]+\b|\b\d*\.?\d+(?:e[+-]?\d+)?[df]?\b/i,operator:{pattern:/(^|[^.])(?:\+[+=]?|-[-=]?|!=?|<>?>?=?|==?|&[&=]?|\|[|=]?|\*=?|\/=?|%=?|\^=?|[?:~])/m,lookbehind:!0}}); 22 | !function(a){var e=/\\([^a-z()[\]]|[a-z\*]+)/i,n={"equation-command":{pattern:e,alias:"regex"}};a.languages.latex={comment:/%.*/m,cdata:{pattern:/(\\begin\{((?:verbatim|lstlisting)\*?)\})([\w\W]*?)(?=\\end\{\2\})/,lookbehind:!0},equation:[{pattern:/\$(?:\\?[\w\W])*?\$|\\\((?:\\?[\w\W])*?\\\)|\\\[(?:\\?[\w\W])*?\\\]/,inside:n,alias:"string"},{pattern:/(\\begin\{((?:equation|math|eqnarray|align|multline|gather)\*?)\})([\w\W]*?)(?=\\end\{\2\})/,lookbehind:!0,inside:n,alias:"string"}],keyword:{pattern:/(\\(?:begin|end|ref|cite|label|usepackage|documentclass)(?:\[[^\]]+\])?\{)[^}]+(?=\})/,lookbehind:!0},url:{pattern:/(\\url\{)[^}]+(?=\})/,lookbehind:!0},headline:{pattern:/(\\(?:part|chapter|section|subsection|frametitle|subsubsection|paragraph|subparagraph|subsubparagraph|subsubsubparagraph)\*?(?:\[[^\]]+\])?\{)[^}]+(?=\}(?:\[[^\]]+\])?)/,lookbehind:!0,alias:"class-name"},"function":{pattern:e,alias:"selector"},punctuation:/[[\]{}&]/}}(Prism); 23 | Prism.languages.lua={comment:/^#!.+|--(?:\[(=*)\[[\s\S]*?\]\1\]|.*)/m,string:/(["'])(?:(?!\1)[^\\\r\n]|\\z(?:\r\n|\s)|\\(?:\r\n|[\s\S]))*\1|\[(=*)\[[\s\S]*?\]\2\]/,number:/\b0x[a-f\d]+\.?[a-f\d]*(?:p[+-]?\d+)?\b|\b\d+(?:\.\B|\.?\d*(?:e[+-]?\d+)?\b)|\B\.\d+(?:e[+-]?\d+)?\b/i,keyword:/\b(?:and|break|do|else|elseif|end|false|for|function|goto|if|in|local|nil|not|or|repeat|return|then|true|until|while)\b/,"function":/(?!\d)\w+(?=\s*(?:[({]))/,operator:[/[-+*%^&|#]|\/\/?|<[<=]?|>[>=]?|[=~]=?/,{pattern:/(^|[^.])\.\.(?!\.)/,lookbehind:!0}],punctuation:/[\[\](){},;]|\.+|:+/}; 24 | Prism.languages.markdown=Prism.languages.extend("markup",{}),Prism.languages.insertBefore("markdown","prolog",{blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},code:[{pattern:/^(?: {4}|\t).+/m,alias:"keyword"},{pattern:/``.+?``|`[^`\n]+`/,alias:"keyword"}],title:[{pattern:/\w+.*(?:\r?\n|\r)(?:==+|--+)/,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#+.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])([\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:/(^|[^\\])(\*\*|__)(?:(?:\r?\n|\r)(?!\r?\n|\r)|.)+?\2/,lookbehind:!0,inside:{punctuation:/^\*\*|^__|\*\*$|__$/}},italic:{pattern:/(^|[^\\])([*_])(?:(?:\r?\n|\r)(?!\r?\n|\r)|.)+?\2/,lookbehind:!0,inside:{punctuation:/^[*_]|[*_]$/}},url:{pattern:/!?\[[^\]]+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)| ?\[[^\]\n]*\])/,inside:{variable:{pattern:/(!?\[)[^\]]+(?=\]$)/,lookbehind:!0},string:{pattern:/"(?:\\.|[^"\\])*"(?=\)$)/}}}}),Prism.languages.markdown.bold.inside.url=Prism.util.clone(Prism.languages.markdown.url),Prism.languages.markdown.italic.inside.url=Prism.util.clone(Prism.languages.markdown.url),Prism.languages.markdown.bold.inside.italic=Prism.util.clone(Prism.languages.markdown.italic),Prism.languages.markdown.italic.inside.bold=Prism.util.clone(Prism.languages.markdown.bold); 25 | Prism.languages.objectivec=Prism.languages.extend("c",{keyword:/\b(asm|typeof|inline|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|union|unsigned|void|volatile|while|in|self|super)\b|(@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,string:/("|')(\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1|@"(\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,operator:/-[->]?|\+\+?|!=?|<>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}); 26 | Prism.languages.php=Prism.languages.extend("clike",{keyword:/\b(and|or|xor|array|as|break|case|cfunction|class|const|continue|declare|default|die|do|else|elseif|enddeclare|endfor|endforeach|endif|endswitch|endwhile|extends|for|foreach|function|include|include_once|global|if|new|return|static|switch|use|require|require_once|var|while|abstract|interface|public|implements|private|protected|parent|throw|null|echo|print|trait|namespace|final|yield|goto|instanceof|finally|try|catch)\b/i,constant:/\b[A-Z0-9_]{2,}\b/,comment:{pattern:/(^|[^\\])(?:\/\*[\w\W]*?\*\/|\/\/.*)/,lookbehind:!0}}),Prism.languages.insertBefore("php","class-name",{"shell-comment":{pattern:/(^|[^\\])#.*/,lookbehind:!0,alias:"comment"}}),Prism.languages.insertBefore("php","keyword",{delimiter:/\?>|<\?(?:php)?/i,variable:/\$\w+\b/i,"package":{pattern:/(\\|namespace\s+|use\s+)[\w\\]+/,lookbehind:!0,inside:{punctuation:/\\/}}}),Prism.languages.insertBefore("php","operator",{property:{pattern:/(->)[\w]+/,lookbehind:!0}}),Prism.languages.markup&&(Prism.hooks.add("before-highlight",function(e){"php"===e.language&&(e.tokenStack=[],e.backupCode=e.code,e.code=e.code.replace(/(?:<\?php|<\?)[\w\W]*?(?:\?>)/gi,function(a){return e.tokenStack.push(a),"{{{PHP"+e.tokenStack.length+"}}}"}))}),Prism.hooks.add("before-insert",function(e){"php"===e.language&&(e.code=e.backupCode,delete e.backupCode)}),Prism.hooks.add("after-highlight",function(e){if("php"===e.language){for(var a,n=0;a=e.tokenStack[n];n++)e.highlightedCode=e.highlightedCode.replace("{{{PHP"+(n+1)+"}}}",Prism.highlight(a,e.grammar,"php").replace(/\$/g,"$$$$"));e.element.innerHTML=e.highlightedCode}}),Prism.hooks.add("wrap",function(e){"php"===e.language&&"markup"===e.type&&(e.content=e.content.replace(/(\{\{\{PHP[0-9]+\}\}\})/g,'$1'))}),Prism.languages.insertBefore("php","comment",{markup:{pattern:/<[^?]\/?(.*?)>/,inside:Prism.languages.markup},php:/\{\{\{PHP[0-9]+\}\}\}/})); 27 | Prism.languages.insertBefore("php","variable",{"this":/\$this\b/,global:/\$(?:_(?:SERVER|GET|POST|FILES|REQUEST|SESSION|ENV|COOKIE)|GLOBALS|HTTP_RAW_POST_DATA|argc|argv|php_errormsg|http_response_header)/,scope:{pattern:/\b[\w\\]+::/,inside:{keyword:/(static|self|parent)/,punctuation:/(::|\\)/}}}); 28 | Prism.languages.powershell={comment:[{pattern:/(^|[^`])<#[\w\W]*?#>/,lookbehind:!0},{pattern:/(^|[^`])#.+/,lookbehind:!0}],string:[{pattern:/"(`?[\w\W])*?"/,inside:{"function":{pattern:/[^`]\$\(.*?\)/,inside:{}}}},/'([^']|'')*'/],namespace:/\[[a-z][\w\W]*?\]/i,"boolean":/\$(true|false)\b/i,variable:/\$\w+\b/i,"function":[/\b(Add-(Computer|Content|History|Member|PSSnapin|Type)|Checkpoint-Computer|Clear-(Content|EventLog|History|Item|ItemProperty|Variable)|Compare-Object|Complete-Transaction|Connect-PSSession|ConvertFrom-(Csv|Json|StringData)|Convert-Path|ConvertTo-(Csv|Html|Json|Xml)|Copy-(Item|ItemProperty)|Debug-Process|Disable-(ComputerRestore|PSBreakpoint|PSRemoting|PSSessionConfiguration)|Disconnect-PSSession|Enable-(ComputerRestore|PSBreakpoint|PSRemoting|PSSessionConfiguration)|Enter-PSSession|Exit-PSSession|Export-(Alias|Clixml|Console|Csv|FormatData|ModuleMember|PSSession)|ForEach-Object|Format-(Custom|List|Table|Wide)|Get-(Alias|ChildItem|Command|ComputerRestorePoint|Content|ControlPanelItem|Culture|Date|Event|EventLog|EventSubscriber|FormatData|Help|History|Host|HotFix|Item|ItemProperty|Job|Location|Member|Module|Process|PSBreakpoint|PSCallStack|PSDrive|PSProvider|PSSession|PSSessionConfiguration|PSSnapin|Random|Service|TraceSource|Transaction|TypeData|UICulture|Unique|Variable|WmiObject)|Group-Object|Import-(Alias|Clixml|Csv|LocalizedData|Module|PSSession)|Invoke-(Command|Expression|History|Item|RestMethod|WebRequest|WmiMethod)|Join-Path|Limit-EventLog|Measure-(Command|Object)|Move-(Item|ItemProperty)|New-(Alias|Event|EventLog|Item|ItemProperty|Module|ModuleManifest|Object|PSDrive|PSSession|PSSessionConfigurationFile|PSSessionOption|PSTransportOption|Service|TimeSpan|Variable|WebServiceProxy)|Out-(Default|File|GridView|Host|Null|Printer|String)|Pop-Location|Push-Location|Read-Host|Receive-(Job|PSSession)|Register-(EngineEvent|ObjectEvent|PSSessionConfiguration|WmiEvent)|Remove-(Computer|Event|EventLog|Item|ItemProperty|Job|Module|PSBreakpoint|PSDrive|PSSession|PSSnapin|TypeData|Variable|WmiObject)|Rename-(Computer|Item|ItemProperty)|Reset-ComputerMachinePassword|Resolve-Path|Restart-(Computer|Service)|Restore-Computer|Resume-(Job|Service)|Save-Help|Select-(Object|String|Xml)|Send-MailMessage|Set-(Alias|Content|Date|Item|ItemProperty|Location|PSBreakpoint|PSDebug|PSSessionConfiguration|Service|StrictMode|TraceSource|Variable|WmiInstance)|Show-(Command|ControlPanelItem|EventLog)|Sort-Object|Split-Path|Start-(Job|Process|Service|Sleep|Transaction)|Stop-(Computer|Job|Process|Service)|Suspend-(Job|Service)|Tee-Object|Test-(ComputerSecureChannel|Connection|ModuleManifest|Path|PSSessionConfigurationFile)|Trace-Command|Unblock-File|Undo-Transaction|Unregister-(Event|PSSessionConfiguration)|Update-(FormatData|Help|List|TypeData)|Use-Transaction|Wait-(Event|Job|Process)|Where-Object|Write-(Debug|Error|EventLog|Host|Output|Progress|Verbose|Warning))\b/i,/\b(ac|cat|chdir|clc|cli|clp|clv|compare|copy|cp|cpi|cpp|cvpa|dbp|del|diff|dir|ebp|echo|epal|epcsv|epsn|erase|fc|fl|ft|fw|gal|gbp|gc|gci|gcs|gdr|gi|gl|gm|gp|gps|group|gsv|gu|gv|gwmi|iex|ii|ipal|ipcsv|ipsn|irm|iwmi|iwr|kill|lp|ls|measure|mi|mount|move|mp|mv|nal|ndr|ni|nv|ogv|popd|ps|pushd|pwd|rbp|rd|rdr|ren|ri|rm|rmdir|rni|rnp|rp|rv|rvpa|rwmi|sal|saps|sasv|sbp|sc|select|set|shcm|si|sl|sleep|sls|sort|sp|spps|spsv|start|sv|swmi|tee|trcm|type|write)\b/i],keyword:/\b(Begin|Break|Catch|Class|Continue|Data|Define|Do|DynamicParam|Else|ElseIf|End|Exit|Filter|Finally|For|ForEach|From|Function|If|InlineScript|Parallel|Param|Process|Return|Sequence|Switch|Throw|Trap|Try|Until|Using|Var|While|Workflow)\b/i,operator:{pattern:/(\W?)(!|-(eq|ne|gt|ge|lt|le|sh[lr]|not|b?(and|x?or)|(Not)?(Like|Match|Contains|In)|Replace|Join|is(Not)?|as)\b|-[-=]?|\+[+=]?|[*\/%]=?)/i,lookbehind:!0},punctuation:/[|{}[\];(),.]/},Prism.languages.powershell.string[0].inside.boolean=Prism.languages.powershell.boolean,Prism.languages.powershell.string[0].inside.variable=Prism.languages.powershell.variable,Prism.languages.powershell.string[0].inside.function.inside=Prism.util.clone(Prism.languages.powershell); 29 | Prism.languages.python={"triple-quoted-string":{pattern:/"""[\s\S]+?"""|'''[\s\S]+?'''/,alias:"string"},comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0},string:/("|')(?:\\?.)*?\1/,"function":{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_][a-zA-Z0-9_]*(?=\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)[a-z0-9_]+/i,lookbehind:!0},keyword:/\b(?:as|assert|async|await|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|pass|print|raise|return|try|while|with|yield)\b/,"boolean":/\b(?:True|False)\b/,number:/\b-?(?:0[bo])?(?:(?:\d|0x[\da-f])[\da-f]*\.?\d*|\.\d+)(?:e[+-]?\d+)?j?\b/i,operator:/[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]|\b(?:or|and|not)\b/,punctuation:/[{}[\];(),.:]/}; 30 | !function(e){e.languages.sass=e.languages.extend("css",{comment:{pattern:/^([ \t]*)\/[\/*].*(?:(?:\r?\n|\r)\1[ \t]+.+)*/m,lookbehind:!0}}),e.languages.insertBefore("sass","atrule",{"atrule-line":{pattern:/^(?:[ \t]*)[@+=].+/m,inside:{atrule:/(?:@[\w-]+|[+=])/m}}}),delete e.languages.sass.atrule;var a=/((\$[-_\w]+)|(#\{\$[-_\w]+\}))/i,t=[/[+*\/%]|[=!]=|<=?|>=?|\b(?:and|or|not)\b/,{pattern:/(\s+)-(?=\s)/,lookbehind:!0}];e.languages.insertBefore("sass","property",{"variable-line":{pattern:/^[ \t]*\$.+/m,inside:{punctuation:/:/,variable:a,operator:t}},"property-line":{pattern:/^[ \t]*(?:[^:\s]+ *:.*|:[^:\s]+.*)/m,inside:{property:[/[^:\s]+(?=\s*:)/,{pattern:/(:)[^:\s]+/,lookbehind:!0}],punctuation:/:/,variable:a,operator:t,important:e.languages.sass.important}}}),delete e.languages.sass.property,delete e.languages.sass.important,delete e.languages.sass.selector,e.languages.insertBefore("sass","punctuation",{selector:{pattern:/([ \t]*)\S(?:,?[^,\r\n]+)*(?:,(?:\r?\n|\r)\1[ \t]+\S(?:,?[^,\r\n]+)*)*/,lookbehind:!0}})}(Prism); 31 | Prism.languages.scss=Prism.languages.extend("css",{comment:{pattern:/(^|[^\\])(?:\/\*[\w\W]*?\*\/|\/\/.*)/,lookbehind:!0},atrule:{pattern:/@[\w-]+(?:\([^()]+\)|[^(])*?(?=\s+[{;])/,inside:{rule:/@[\w-]+/}},url:/(?:[-a-z]+-)*url(?=\()/i,selector:{pattern:/(?=\S)[^@;\{\}\(\)]?([^@;\{\}\(\)]|&|#\{\$[-_\w]+\})+(?=\s*\{(\}|\s|[^\}]+(:|\{)[^\}]+))/m,inside:{placeholder:/%[-_\w]+/}}}),Prism.languages.insertBefore("scss","atrule",{keyword:[/@(?:if|else(?: if)?|for|each|while|import|extend|debug|warn|mixin|include|function|return|content)/i,{pattern:/( +)(?:from|through)(?= )/,lookbehind:!0}]}),Prism.languages.insertBefore("scss","property",{variable:/\$[-_\w]+|#\{\$[-_\w]+\}/}),Prism.languages.insertBefore("scss","function",{placeholder:{pattern:/%[-_\w]+/,alias:"selector"},statement:/\B!(?:default|optional)\b/i,"boolean":/\b(?:true|false)\b/,"null":/\bnull\b/,operator:{pattern:/(\s)(?:[-+*\/%]|[=!]=|<=?|>=?|and|or|not)(?=\s)/,lookbehind:!0}}),Prism.languages.scss.atrule.inside.rest=Prism.util.clone(Prism.languages.scss); 32 | Prism.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\w\W]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},string:{pattern:/(^|[^@\\])("|')(?:\\?[\s\S])*?\2/,lookbehind:!0},variable:/@[\w.$]+|@("|'|`)(?:\\?[\s\S])+?\1/,"function":/\b(?:COUNT|SUM|AVG|MIN|MAX|FIRST|LAST|UCASE|LCASE|MID|LEN|ROUND|NOW|FORMAT)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR VARYING|CHARACTER (?:SET|VARYING)|CHARSET|CHECK|CHECKPOINT|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMN|COLUMNS|COMMENT|COMMIT|COMMITTED|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS|CONTAINSTABLE|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|DATA(?:BASES?)?|DATETIME|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE(?: PRECISION)?|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE KEY|ELSE|ENABLE|ENCLOSED BY|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPE(?:D BY)?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|IDENTITY(?:_INSERT|COL)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTO|INVOKER|ISOLATION LEVEL|JOIN|KEYS?|KILL|LANGUAGE SQL|LAST|LEFT|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MODIFIES SQL DATA|MODIFY|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL(?: CHAR VARYING| CHARACTER(?: VARYING)?| VARCHAR)?|NATURAL|NCHAR(?: VARCHAR)?|NEXT|NO(?: SQL|CHECK|CYCLE)?|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READ(?:S SQL DATA|TEXT)?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEATABLE|REPLICATION|REQUIRE|RESTORE|RESTRICT|RETURNS?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE MODE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|START(?:ING BY)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED BY|TEXT(?:SIZE)?|THEN|TIMESTAMP|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNPIVOT|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?)\b/i,"boolean":/\b(?:TRUE|FALSE|NULL)\b/i,number:/\b-?(?:0x)?\d*\.?[\da-f]+\b/,operator:/[-+*\/=%^~]|&&?|\|?\||!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|IN|LIKE|NOT|OR|IS|DIV|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/}; 33 | Prism.languages.swift=Prism.languages.extend("clike",{string:{pattern:/("|')(\\(?:\((?:[^()]|\([^)]+\))+\)|\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,inside:{interpolation:{pattern:/\\\((?:[^()]|\([^)]+\))+\)/,inside:{delimiter:{pattern:/^\\\(|\)$/,alias:"variable"}}}}},keyword:/\b(as|associativity|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic(?:Type)?|else|enum|extension|fallthrough|final|for|func|get|guard|if|import|in|infix|init|inout|internal|is|lazy|left|let|mutating|new|none|nonmutating|operator|optional|override|postfix|precedence|prefix|private|Protocol|public|repeat|required|rethrows|return|right|safe|self|Self|set|static|struct|subscript|super|switch|throws?|try|Type|typealias|unowned|unsafe|var|weak|where|while|willSet|__(?:COLUMN__|FILE__|FUNCTION__|LINE__))\b/,number:/\b([\d_]+(\.[\de_]+)?|0x[a-f0-9_]+(\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,constant:/\b(nil|[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,atrule:/@\b(IB(?:Outlet|Designable|Action|Inspectable)|class_protocol|exported|noreturn|NS(?:Copying|Managed)|objc|UIApplicationMain|auto_closure)\b/,builtin:/\b([A-Z]\S+|abs|advance|alignof(?:Value)?|assert|contains|count(?:Elements)?|debugPrint(?:ln)?|distance|drop(?:First|Last)|dump|enumerate|equal|filter|find|first|getVaList|indices|isEmpty|join|last|lexicographicalCompare|map|max(?:Element)?|min(?:Element)?|numericCast|overlaps|partition|print(?:ln)?|reduce|reflect|reverse|sizeof(?:Value)?|sort(?:ed)?|split|startsWith|stride(?:of(?:Value)?)?|suffix|swap|toDebugString|toString|transcode|underestimateCount|unsafeBitCast|with(?:ExtendedLifetime|Unsafe(?:MutablePointers?|Pointers?)|VaList))\b/}),Prism.languages.swift.string.inside.interpolation.inside.rest=Prism.util.clone(Prism.languages.swift); 34 | Prism.languages.yaml={scalar:{pattern:/([\-:]\s*(![^\s]+)?[ \t]*[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)[^\r\n]+(?:\3[^\r\n]+)*)/,lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:/(\s*[:\-,[{\r\n?][ \t]*(![^\s]+)?[ \t]*)[^\r\n{[\]},#]+?(?=\s*:\s)/,lookbehind:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:/([:\-,[{]\s*(![^\s]+)?[ \t]*)(\d{4}-\d\d?-\d\d?([tT]|[ \t]+)\d\d?:\d{2}:\d{2}(\.\d*)?[ \t]*(Z|[-+]\d\d?(:\d{2})?)?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(:\d{2}(\.\d*)?)?)(?=[ \t]*($|,|]|}))/m,lookbehind:!0,alias:"number"},"boolean":{pattern:/([:\-,[{]\s*(![^\s]+)?[ \t]*)(true|false)[ \t]*(?=$|,|]|})/im,lookbehind:!0,alias:"important"},"null":{pattern:/([:\-,[{]\s*(![^\s]+)?[ \t]*)(null|~)[ \t]*(?=$|,|]|})/im,lookbehind:!0,alias:"important"},string:{pattern:/([:\-,[{]\s*(![^\s]+)?[ \t]*)("(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*')(?=[ \t]*($|,|]|}))/m,lookbehind:!0},number:{pattern:/([:\-,[{]\s*(![^\s]+)?[ \t]*)[+\-]?(0x[\da-f]+|0o[0-7]+|(\d+\.?\d*|\.?\d+)(e[\+\-]?\d+)?|\.inf|\.nan)[ \t]*(?=$|,|]|})/im,lookbehind:!0},tag:/![^\s]+/,important:/[&*][\w]+/,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./}; 35 | !function(){"undefined"!=typeof self&&self.Prism&&self.document&&Prism.hooks.add("complete",function(e){if(e.code){var t=e.element.parentNode,s=/\s*\bline-numbers\b\s*/;if(t&&/pre/i.test(t.nodeName)&&(s.test(t.className)||s.test(e.element.className))&&!e.element.querySelector(".line-numbers-rows")){s.test(e.element.className)&&(e.element.className=e.element.className.replace(s,"")),s.test(t.className)||(t.className+=" line-numbers");var n,a=e.code.match(/\n(?!$)/g),l=a?a.length+1:1,m=new Array(l+1);m=m.join(""),n=document.createElement("span"),n.className="line-numbers-rows",n.innerHTML=m,t.hasAttribute("data-start")&&(t.style.counterReset="linenumber "+(parseInt(t.getAttribute("data-start"),10)-1)),e.element.appendChild(n)}}})}(); 36 | !function(){if("undefined"!=typeof self&&self.Prism&&self.document){var e={css:"CSS",clike:"C-like",javascript:"JavaScript",abap:"ABAP",actionscript:"ActionScript",apacheconf:"Apache Configuration",apl:"APL",applescript:"AppleScript",asciidoc:"AsciiDoc",aspnet:"ASP.NET (C#)",autoit:"AutoIt",autohotkey:"AutoHotkey",basic:"BASIC",csharp:"C#",cpp:"C++",coffeescript:"CoffeeScript","css-extras":"CSS Extras",fsharp:"F#",glsl:"GLSL",http:"HTTP",inform7:"Inform 7",latex:"LaTeX",lolcode:"LOLCODE",matlab:"MATLAB",mel:"MEL",nasm:"NASM",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",ocaml:"OCaml",parigp:"PARI/GP",php:"PHP","php-extras":"PHP Extras",powershell:"PowerShell",jsx:"React JSX",rest:"reST (reStructuredText)",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)",sql:"SQL",typescript:"TypeScript",vhdl:"VHDL",vim:"vim",wiki:"Wiki markup",yaml:"YAML"};Prism.hooks.add("before-highlight",function(a){var s=a.element.parentNode;if(s&&/pre/i.test(s.nodeName)){var t=e[a.language]||a.language.substring(0,1).toUpperCase()+a.language.substring(1);s.setAttribute("data-language",t);var i,r,l=s.previousSibling;l&&/\s*\bprism-show-language\b\s*/.test(l.className)&&l.firstChild&&/\s*\bprism-show-language-label\b\s*/.test(l.firstChild.className)?(r=l.firstChild,r.getAttribute("data-language")!==t&&(r.setAttribute("data-language",t),r.innerHTML=t)):(i=document.createElement("div"),r=document.createElement("div"),r.className="prism-show-language-label",r.setAttribute("data-language",t),r.innerHTML=t,i.className="prism-show-language",i.appendChild(r),s.parentNode.insertBefore(i,s))}})}}(); 37 | --------------------------------------------------------------------------------