all repos — nasg @ 96d0c238d68b147540085bc1e13f9f15fc444258

Back on prismjs <https://prismjs.com/> for syntax highlighting.
While Pandoc was generating something sane, the output of CodeHilite puts silly amount of extra text and makes the HTML output completely unreadable.

In the end, it still looks like prism.js is a nice and solid solution, even if it's JS.

I'll explore other options, but so far, it's either back to Pandoc, or sticking with Prism.
Peter Molnar hello@petermolnar.eu
Thu, 02 Aug 2018 22:47:49 +0100
commit

96d0c238d68b147540085bc1e13f9f15fc444258

parent

3d68fb335c3fe7619940b16b4a00763a25c2d410

A html5_fenced_code.py

@@ -0,0 +1,57 @@

+""" +This is a simplified FencedBlockPreprocessor which outputs "proper" <code> +naming, eg. language-python, instead of just python, so prism.js understands +it. + +It doesn't deal with CodeHilite. + +""" + +from markdown.preprocessors import Preprocessor +from markdown.extensions import Extension +from markdown.extensions.fenced_code import FencedBlockPreprocessor + +class HTML5FencedBlockPreprocessor(Preprocessor): + FENCED_BLOCK_RE = FencedBlockPreprocessor.FENCED_BLOCK_RE + CODE_WRAP = '<pre><code%s>%s</code></pre>' + LANG_TAG = ' class="language-%s"' + + def __init__(self, md): + super(HTML5FencedBlockPreprocessor, self).__init__(md) + + def run(self, lines): + text = "\n".join(lines) + while 1: + m = self.FENCED_BLOCK_RE.search(text) + if m: + lang = '' + if m.group('lang'): + lang = self.LANG_TAG % (m.group('lang')) + + code = self.CODE_WRAP % ( + lang, + m.group('code') + ) + + placeholder = self.markdown.htmlStash.store(code) + text = '%s\n%s\n%s' % ( + text[:m.start()], + placeholder, + text[m.end():] + ) + else: + break + return text.split("\n") + + +class HTML5FencedCodeExtension(Extension): + def extendMarkdown(self, md, md_globals): + md.registerExtension(self) + md.preprocessors.add( + 'html5_fenced_code', + HTML5FencedBlockPreprocessor(md), + ">normalize_whitespace" + ) + +def makeExtension(*args, **kwargs): + return HTML5FencedCodeExtension(*args, **kwargs)
M nasg.pynasg.py

@@ -35,6 +35,7 @@ import requests

import exiftool import settings import keys +import html5_fenced_code from pprint import pprint

@@ -63,13 +64,21 @@

MD = markdown.Markdown( output_format='xhtml5', extensions=[ - 'extra', - 'codehilite', + 'html5_fenced_code', + 'abbr', + 'attr_list', + 'def_list', + 'footnotes', + 'tables', + 'smart_strong', 'headerid', - 'urlize' - ], + 'urlize', + ] ) +RE_CODE = re.compile( + r'(?:[~`]{3})(?:[^`]+)?' +) class MarkdownDoc(object): @property

@@ -413,6 +422,13 @@ r[t][mtime] = c.tmplvars

return r @property + def has_code(self): + if RE_CODE.search(self.content): + return True + else: + return False + + @property @cached() def tmplvars(self): v = {

@@ -433,6 +449,7 @@ 'reactions': self.reactions,

'syndicate': self.syndicate, 'url': self.url, 'review': self.meta.get('review', False), + 'has_code': self.has_code, } if (self.enclosure): v.update({'enclosure': self.enclosure})

@@ -521,8 +538,8 @@ if len(self.mdimg.css):

return self.mdimg.match tmpl = J2.get_template("%s.j2.html" % (self.__class__.__name__)) return tmpl.render({ - 'src': self.displayed.relpath, - 'href': self.linked.relpath, + 'src': self.src, + 'href': self.href, 'width': self.displayed.width, 'height': self.displayed.height, 'title': self.title,

@@ -1315,7 +1332,14 @@ worker.run()

logging.info('worker finished') # copy static - for e in glob.glob(os.path.join(content, '*.*')): + staticfiles = [] + staticpaths = [ + os.path.join(content, '*.*'), + os.path.join(settings.paths.get('tmpl'), '*.js') + ] + for p in staticpaths: + staticfiles = staticfiles + glob.glob(p) + for e in staticfiles: t = os.path.join( settings.paths.get('build'), os.path.basename(e)
M runrun

@@ -5,4 +5,4 @@ IFS=$'\n\t'

source ./.venv/bin/activate python3 nasg.py "$@" -rsync -avu --delete-after ../www/ liveserver:/web/petermolnar.net/web/ +rsync -avuhH --delete-after ../www/ liveserver:/web/petermolnar.net/web/
M templates/base.j2.htmltemplates/base.j2.html

@@ -1,19 +1,19 @@

<!DOCTYPE html> <html {% block lang %}lang="{{ post.lang }}"{% endblock %}> <head> - <title>{% block title %}{{ post.title }} - petermolnar.net{% endblock %}</title> + <title>{% block title %}{{ post.title }} - {{ site.domain }}{% endblock %}</title> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1" /> - <link rel="icon" href="https://petermolnar.net/favicon.ico" /> + <link rel="icon" href="{{ site.url }}/favicon.ico" /> {% for key, value in meta.items() %} <link rel="{{ key }}" href="{{ value }}" /> {% endfor %} {% block meta %}{% endblock %} <style media="all"> - {% include 'style-dark.css' %} + {% include 'style.css' %} </style> - <style id="css_alternative" media="none"> - {% include 'style-light.css' %} + <style id="css_alt" media="none"> + {% include 'style-alt.css' %} </style> <style media="print"> {% include 'style-print.css' %}

@@ -22,12 +22,12 @@ <script>

/* color scheme switcher */ var current = localStorage.getItem("stylesheet"); if (current) { - document.querySelector('#css_alternative').setAttribute("media", current); + document.querySelector('#css_alt').setAttribute("media", current); } function toggleStylesheet(trigger){ var setto = 'all'; - var e = document.querySelector('#css_alternative'); + var e = document.querySelector('#css_alt'); if (e.getAttribute("media") == 'all') { setto = 'none'; }

@@ -35,13 +35,19 @@ localStorage.setItem("stylesheet", setto);

e.setAttribute("media", setto); } </script> + {% if post.has_code %} + <style media="all"> + {% include 'prism.css' %} + </style> + <script src="{{ site.url }}/prism.js"></script> + {% endif %} </head> <body> {% macro activemenu(name) %}{% if (post is defined and post.category == name ) or ( category is defined and category.name == name ) %}active{% endif %}{% endmacro %} -<header class="content-header"> - <nav class="content-navigation"> +<header> + <nav> <ul> <li> <a title="home" href="/" class="{{ activemenu('') }}">

@@ -76,11 +82,10 @@ </li>

</ul> </nav> - <form role="search" method="get" class="search-form" action="/search.php"> + <form role="search" method="get" action="/search.php"> <label for="s">Search</label> - <input type="search" class="search-field" placeholder="search..." - value="" name="q" id="q" title="Search for:" /> - <input type="submit" class="search-submit" value="Go ➡" /> + <input type="search" placeholder="search..." value="" name="q" id="q" title="Search for:" /> + <input type="submit" value="Go ➡" /> </form> <p class="contrast">

@@ -94,7 +99,7 @@ </p>

</header> {% block content %} -<section class="content-body"> +<section> <article class="h-entry hentry singular" lang="{{ post.lang }}"> <header> <h1>

@@ -144,9 +149,7 @@ </div>

{% endif %} <div class="e-content entry-content"> - <div class="content-inner"> - {{ post.html_content }} - </div> + {{ post.html_content }} </div> <footer>

@@ -336,90 +339,92 @@ {% block pagination %}

{% endblock %} -<footer class="content-footer" id="main-footer"> - <nav class="footer-contact p-author h-card vcard limit"> - <h2>Contact</h2> - <div class="twothird"> - <dl> - <dt> - <img class="photo avatar u-photo u-avatar" - src="https://petermolnar.net/molnar_peter_avatar.jpg" - alt="Photo of Peter Molnar" /> - </dt> - <dd> - <a class="fn p-name url u-url u-uid" href="/about.html"> - Peter Molnar - </a> - </dd> - <dt>email</dt> - <dd> - <a rel="me" class="u-email email" href="mailto:{{ author.email }}"> - {{ author.email }} - </a> - </dd> - {% if author.gpg %} - <dt>GPG</dt> - <dd> - <a rel="me" class="u-gpg gpg" href="/{{ author.gpg }}">key</a> - </dd> - {% endif %} - <dt>url</dt> - <dd> - <a rel="me" class="u-url url" href="{{ author.url }}"> - {{ author.url }} - </a> - </dd> - </dl> - </div> - <div class="onethird"> - <dl> - {% if author.xmpp %} - <dt>XMPP</dt> - <dd> - <a rel="me" class="u-xmpp xmpp" href="xmpp:{{ author.xmpp }}">{{ author.xmpp }}</a> - </dd> - {% endif %} - {% if author.sip %} - <dt>SIP</dt> - <dd> - <a rel="me" class="u-sip sip" href="sip:{{ author.sip }}"> - {{ author.sip }} - </a> - </dd> - {% endif %} - {% if author.icq %} - <dt>ICQ</dt> - <dd> - <a rel="me" class="u-icq icq" href="icq:{{ author.icq }}"> - {{ author.icq }} - </a> - </dd> - {% endif %} - {% if author.flickr %} - <dt>flickr</dt> - <dd> - <a rel="me" class="u-flickr" href="https://flickr.com/people/{{ author.flickr }}">{{ author.flickr }}</a> - </dd> - {% endif %} - {% if author.github %} - <dt>github</dt> - <dd> - <a rel="me" class="u-github" href="https://github.com/{{ author.github }}">{{ author.github }}</a> - </dd> - {% endif %} - {% if author.twitter %} - <dt>twitter</dt> - <dd> - <a rel="me" class="u-twitter" href="https://twitter.com/{{ author.twitter }}">{{ author.twitter }}</a> - </dd> - {% endif %} - </dl> +<footer> + <div class="limit"> + <nav class="p-author h-card vcard"> + <h2>Contact</h2> + <div> + <dl> + <dt> + <img class="photo avatar u-photo u-avatar" + src="https://petermolnar.net/molnar_peter_avatar.jpg" + alt="Photo of Peter Molnar" /> + </dt> + <dd> + <a class="fn p-name url u-url u-uid" href="/about.html"> + Peter Molnar + </a> + </dd> + <dt>email</dt> + <dd> + <a rel="me" class="u-email email" href="mailto:{{ author.email }}"> + {{ author.email }} + </a> + </dd> + {% if author.gpg %} + <dt>GPG</dt> + <dd> + <a rel="me" class="u-gpg gpg" href="/{{ author.gpg }}">key</a> + </dd> + {% endif %} + <dt>url</dt> + <dd> + <a rel="me" class="u-url url" href="{{ author.url }}"> + {{ author.url }} + </a> + </dd> + </dl> + </div> + <div> + <dl> + {% if author.xmpp %} + <dt>XMPP</dt> + <dd> + <a rel="me" class="u-xmpp xmpp" href="xmpp:{{ author.xmpp }}">{{ author.xmpp }}</a> + </dd> + {% endif %} + {% if author.sip %} + <dt>SIP</dt> + <dd> + <a rel="me" class="u-sip sip" href="sip:{{ author.sip }}"> + {{ author.sip }} + </a> + </dd> + {% endif %} + {% if author.icq %} + <dt>ICQ</dt> + <dd> + <a rel="me" class="u-icq icq" href="icq:{{ author.icq }}"> + {{ author.icq }} + </a> + </dd> + {% endif %} + {% if author.flickr %} + <dt>flickr</dt> + <dd> + <a rel="me" class="u-flickr" href="https://flickr.com/people/{{ author.flickr }}">{{ author.flickr }}</a> + </dd> + {% endif %} + {% if author.github %} + <dt>github</dt> + <dd> + <a rel="me" class="u-github" href="https://github.com/{{ author.github }}">{{ author.github }}</a> + </dd> + {% endif %} + {% if author.twitter %} + <dt>twitter</dt> + <dd> + <a rel="me" class="u-twitter" href="https://twitter.com/{{ author.twitter }}">{{ author.twitter }}</a> + </dd> + {% endif %} + </dl> + </div> + </nav> + <div class="webring"> + <a href="https://xn--sr8hvo.ws/🇻🇮📢/previous">←</a> + Member of <a href="https://xn--sr8hvo.ws">IndieWeb Webring</a> 🕸💍 + <a href="https://xn--sr8hvo.ws/🇻🇮📢/next">→</a> </div> - </nav> - <div class="webring"> - <a href="https://xn--sr8hvo.ws/🇻🇮📢/previous">←</a> - Member of <a href="https://xn--sr8hvo.ws">IndieWeb Webring</a> 🕸💍 - <a href="https://xn--sr8hvo.ws/🇻🇮📢/next">→</a> </div> </footer>
A templates/prism.css

@@ -0,0 +1,73 @@

+.token.comment, +.token.block-comment, +.token.prolog, +.token.doctype, +.token.cdata { + color: darkgray; +} + +.token.punctuation { + color:darkcyan; +} + +.token.tag, +.token.attr-name, +.token.namespace, +.token.deleted { + color: #e2777a; +} + +.token.function-name { + color: red; +} + +.token.boolean, +.token.number, +.token.function { + color: #f08d49; +} + +.token.property, +.token.class-name, +.token.constant, +.token.symbol { + color: #f8c555; +} + +.token.selector, +.token.important, +.token.atrule, +.token.keyword, +.token.builtin { + color: darkorange; +} + +.token.string, +.token.char, +.token.attr-value, +.token.regex, +.token.variable { + color:darkred; +} + +.token.operator, +.token.entity, +.token.url { + color: darkmagenta; +} + +.token.important, +.token.bold { + font-weight: bold; +} +.token.italic { + font-style: italic; +} + +.token.entity { + cursor: help; +} + +.token.inserted { + color: green; +}
A templates/prism.js

@@ -0,0 +1,26 @@

+/* PrismJS 1.15.0 +https://prismjs.com/download.html#themes=prism-tomorrow&languages=markup+css+clike+javascript+apacheconf+c+csharp+bash+cpp+css-extras+markup-templating+git+java+json+markdown+makefile+nginx+perl+php+php-extras+sql+python+yaml */ +var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(){var e=/\blang(?:uage)?-([\w-]+)\b/i,t=0,n=_self.Prism={manual:_self.Prism&&_self.Prism.manual,disableWorkerMessageHandler:_self.Prism&&_self.Prism.disableWorkerMessageHandler,util:{encode:function(e){return e instanceof r?new r(e.type,n.util.encode(e.content),e.alias):"Array"===n.util.type(e)?e.map(n.util.encode):e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).match(/\[object (\w+)\]/)[1]},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++t}),e.__id},clone:function(e,t){var r=n.util.type(e);switch(t=t||{},r){case"Object":if(t[n.util.objId(e)])return t[n.util.objId(e)];var a={};t[n.util.objId(e)]=a;for(var l in e)e.hasOwnProperty(l)&&(a[l]=n.util.clone(e[l],t));return a;case"Array":if(t[n.util.objId(e)])return t[n.util.objId(e)];var a=[];return t[n.util.objId(e)]=a,e.forEach(function(e,r){a[r]=n.util.clone(e,t)}),a}return e}},languages:{extend:function(e,t){var r=n.util.clone(n.languages[e]);for(var a in t)r[a]=t[a];return r},insertBefore:function(e,t,r,a){a=a||n.languages;var l=a[e];if(2==arguments.length){r=arguments[1];for(var i in r)r.hasOwnProperty(i)&&(l[i]=r[i]);return l}var o={};for(var s in l)if(l.hasOwnProperty(s)){if(s==t)for(var i in r)r.hasOwnProperty(i)&&(o[i]=r[i]);o[s]=l[s]}return n.languages.DFS(n.languages,function(t,n){n===a[e]&&t!=e&&(this[t]=o)}),a[e]=o},DFS:function(e,t,r,a){a=a||{};for(var l in e)e.hasOwnProperty(l)&&(t.call(e,l,e[l],r||l),"Object"!==n.util.type(e[l])||a[n.util.objId(e[l])]?"Array"!==n.util.type(e[l])||a[n.util.objId(e[l])]||(a[n.util.objId(e[l])]=!0,n.languages.DFS(e[l],t,l,a)):(a[n.util.objId(e[l])]=!0,n.languages.DFS(e[l],t,null,a)))}},plugins:{},highlightAll:function(e,t){n.highlightAllUnder(document,e,t)},highlightAllUnder:function(e,t,r){var a={callback:r,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};n.hooks.run("before-highlightall",a);for(var l,i=a.elements||e.querySelectorAll(a.selector),o=0;l=i[o++];)n.highlightElement(l,t===!0,a.callback)},highlightElement:function(t,r,a){for(var l,i,o=t;o&&!e.test(o.className);)o=o.parentNode;o&&(l=(o.className.match(e)||[,""])[1].toLowerCase(),i=n.languages[l]),t.className=t.className.replace(e,"").replace(/\s+/g," ")+" language-"+l,t.parentNode&&(o=t.parentNode,/pre/i.test(o.nodeName)&&(o.className=o.className.replace(e,"").replace(/\s+/g," ")+" language-"+l));var s=t.textContent,u={element:t,language:l,grammar:i,code:s};if(n.hooks.run("before-sanity-check",u),!u.code||!u.grammar)return u.code&&(n.hooks.run("before-highlight",u),u.element.textContent=u.code,n.hooks.run("after-highlight",u)),n.hooks.run("complete",u),void 0;if(n.hooks.run("before-highlight",u),r&&_self.Worker){var g=new Worker(n.filename);g.onmessage=function(e){u.highlightedCode=e.data,n.hooks.run("before-insert",u),u.element.innerHTML=u.highlightedCode,a&&a.call(u.element),n.hooks.run("after-highlight",u),n.hooks.run("complete",u)},g.postMessage(JSON.stringify({language:u.language,code:u.code,immediateClose:!0}))}else u.highlightedCode=n.highlight(u.code,u.grammar,u.language),n.hooks.run("before-insert",u),u.element.innerHTML=u.highlightedCode,a&&a.call(t),n.hooks.run("after-highlight",u),n.hooks.run("complete",u)},highlight:function(e,t,a){var l={code:e,grammar:t,language:a};return n.hooks.run("before-tokenize",l),l.tokens=n.tokenize(l.code,l.grammar),n.hooks.run("after-tokenize",l),r.stringify(n.util.encode(l.tokens),l.language)},matchGrammar:function(e,t,r,a,l,i,o){var s=n.Token;for(var u in r)if(r.hasOwnProperty(u)&&r[u]){if(u==o)return;var g=r[u];g="Array"===n.util.type(g)?g:[g];for(var c=0;c<g.length;++c){var h=g[c],f=h.inside,d=!!h.lookbehind,m=!!h.greedy,p=0,y=h.alias;if(m&&!h.pattern.global){var v=h.pattern.toString().match(/[imuy]*$/)[0];h.pattern=RegExp(h.pattern.source,v+"g")}h=h.pattern||h;for(var b=a,k=l;b<t.length;k+=t[b].length,++b){var w=t[b];if(t.length>e.length)return;if(!(w instanceof s)){if(m&&b!=t.length-1){h.lastIndex=k;var _=h.exec(e);if(!_)break;for(var j=_.index+(d?_[1].length:0),P=_.index+_[0].length,A=b,x=k,O=t.length;O>A&&(P>x||!t[A].type&&!t[A-1].greedy);++A)x+=t[A].length,j>=x&&(++b,k=x);if(t[b]instanceof s)continue;I=A-b,w=e.slice(k,x),_.index-=k}else{h.lastIndex=0;var _=h.exec(w),I=1}if(_){d&&(p=_[1]?_[1].length:0);var j=_.index+p,_=_[0].slice(p),P=j+_.length,N=w.slice(0,j),S=w.slice(P),C=[b,I];N&&(++b,k+=N.length,C.push(N));var E=new s(u,f?n.tokenize(_,f):_,y,_,m);if(C.push(E),S&&C.push(S),Array.prototype.splice.apply(t,C),1!=I&&n.matchGrammar(e,t,r,b,k,!0,u),i)break}else if(i)break}}}}},tokenize:function(e,t){var r=[e],a=t.rest;if(a){for(var l in a)t[l]=a[l];delete t.rest}return n.matchGrammar(e,r,t,0,0,!1),r},hooks:{all:{},add:function(e,t){var r=n.hooks.all;r[e]=r[e]||[],r[e].push(t)},run:function(e,t){var r=n.hooks.all[e];if(r&&r.length)for(var a,l=0;a=r[l++];)a(t)}}},r=n.Token=function(e,t,n,r,a){this.type=e,this.content=t,this.alias=n,this.length=0|(r||"").length,this.greedy=!!a};if(r.stringify=function(e,t,a){if("string"==typeof e)return e;if("Array"===n.util.type(e))return e.map(function(n){return r.stringify(n,t,e)}).join("");var l={type:e.type,content:r.stringify(e.content,t,a),tag:"span",classes:["token",e.type],attributes:{},language:t,parent:a};if(e.alias){var i="Array"===n.util.type(e.alias)?e.alias:[e.alias];Array.prototype.push.apply(l.classes,i)}n.hooks.run("wrap",l);var o=Object.keys(l.attributes).map(function(e){return e+'="'+(l.attributes[e]||"").replace(/"/g,"&quot;")+'"'}).join(" ");return"<"+l.tag+' class="'+l.classes.join(" ")+'"'+(o?" "+o:"")+">"+l.content+"</"+l.tag+">"},!_self.document)return _self.addEventListener?(n.disableWorkerMessageHandler||_self.addEventListener("message",function(e){var t=JSON.parse(e.data),r=t.language,a=t.code,l=t.immediateClose;_self.postMessage(n.highlight(a,n.languages[r],r)),l&&_self.close()},!1),_self.Prism):_self.Prism;var a=document.currentScript||[].slice.call(document.getElementsByTagName("script")).pop();return a&&(n.filename=a.src,n.manual||a.hasAttribute("data-manual")||("loading"!==document.readyState?window.requestAnimationFrame?window.requestAnimationFrame(n.highlightAll):window.setTimeout(n.highlightAll,16):document.addEventListener("DOMContentLoaded",n.highlightAll))),_self.Prism}();"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism); +Prism.languages.markup={comment:/<!--[\s\S]*?-->/,prolog:/<\?[\s\S]+?\?>/,doctype:/<!DOCTYPE[\s\S]+?>/i,cdata:/<!\[CDATA\[[\s\S]*?]]>/i,tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">=]+))?)*\s*\/?>/i,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/i,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"attr-value":{pattern:/=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">=]+)/i,inside:{punctuation:[/^=/,{pattern:/(^|[^\\])["']/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:/&#?[\da-z]{1,8};/i},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.hooks.add("wrap",function(a){"entity"===a.type&&(a.attributes.title=a.content.replace(/&amp;/,"&"))}),Prism.languages.xml=Prism.languages.markup,Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup; +Prism.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-]+?.*?(?:;|(?=\s*\{))/i,inside:{rule:/@[\w-]+/}},url:/url\((?:(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1|.*?)\)/i,selector:/[^{}\s][^{};]*?(?=\s*\{)/,string:{pattern:/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},property:/[-_a-z\xA0-\uFFFF][-\w\xA0-\uFFFF]*(?=\s*:)/i,important:/\B!important\b/i,"function":/[-a-z0-9]+(?=\()/i,punctuation:/[(){};:]/},Prism.languages.css.atrule.inside.rest=Prism.languages.css,Prism.languages.markup&&(Prism.languages.insertBefore("markup","tag",{style:{pattern:/(<style[\s\S]*?>)[\s\S]*?(?=<\/style>)/i,lookbehind:!0,inside:Prism.languages.css,alias:"language-css",greedy:!0}}),Prism.languages.insertBefore("inside","attr-value",{"style-attr":{pattern:/\s*style=("|')(?:\\[\s\S]|(?!\1)[^\\])*\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)); +Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/((?:\b(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[\w.\\]+/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:/\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/,punctuation:/[{}[\];(),.:]/}; +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(?:0[xX][\dA-Fa-f]+|0[bB][01]+|0[oO][0-7]+|NaN|Infinity)\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee][+-]?\d+)?/,"function":/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*\()/i,operator:/-[-=]?|\+[+=]?|!=?=?|<<?=?|>>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/}),Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(\[[^\]\r\n]+]|\\.|[^\/\\\[\r\n])+\/[gimyu]{0,5}(?=\s*($|[\r\n,.;})\]]))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=\s*(?:function\b|(?:\([^()]*\)|[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/i,alias:"function"},constant:/\b[A-Z][A-Z\d_]*\b/}),Prism.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\[\s\S]|\${[^}]+}|[^\\`])*`/,greedy:!0,inside:{interpolation:{pattern:/\${[^}]+}/,inside:{"interpolation-punctuation":{pattern:/^\${|}$/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}}}),Prism.languages.javascript["template-string"].inside.interpolation.inside.rest=Prism.languages.javascript,Prism.languages.markup&&Prism.languages.insertBefore("markup","tag",{script:{pattern:/(<script[\s\S]*?>)[\s\S]*?(?=<\/script>)/i,lookbehind:!0,inside:Prism.languages.javascript,alias:"language-javascript",greedy:!0}}),Prism.languages.js=Prism.languages.javascript; +Prism.languages.apacheconf={comment:/#.*/,"directive-inline":{pattern:/^(\s*)\b(?:AcceptFilter|AcceptPathInfo|AccessFileName|Action|AddAlt|AddAltByEncoding|AddAltByType|AddCharset|AddDefaultCharset|AddDescription|AddEncoding|AddHandler|AddIcon|AddIconByEncoding|AddIconByType|AddInputFilter|AddLanguage|AddModuleInfo|AddOutputFilter|AddOutputFilterByType|AddType|Alias|AliasMatch|Allow|AllowCONNECT|AllowEncodedSlashes|AllowMethods|AllowOverride|AllowOverrideList|Anonymous|Anonymous_LogEmail|Anonymous_MustGiveEmail|Anonymous_NoUserID|Anonymous_VerifyEmail|AsyncRequestWorkerFactor|AuthBasicAuthoritative|AuthBasicFake|AuthBasicProvider|AuthBasicUseDigestAlgorithm|AuthDBDUserPWQuery|AuthDBDUserRealmQuery|AuthDBMGroupFile|AuthDBMType|AuthDBMUserFile|AuthDigestAlgorithm|AuthDigestDomain|AuthDigestNonceLifetime|AuthDigestProvider|AuthDigestQop|AuthDigestShmemSize|AuthFormAuthoritative|AuthFormBody|AuthFormDisableNoStore|AuthFormFakeBasicAuth|AuthFormLocation|AuthFormLoginRequiredLocation|AuthFormLoginSuccessLocation|AuthFormLogoutLocation|AuthFormMethod|AuthFormMimetype|AuthFormPassword|AuthFormProvider|AuthFormSitePassphrase|AuthFormSize|AuthFormUsername|AuthGroupFile|AuthLDAPAuthorizePrefix|AuthLDAPBindAuthoritative|AuthLDAPBindDN|AuthLDAPBindPassword|AuthLDAPCharsetConfig|AuthLDAPCompareAsUser|AuthLDAPCompareDNOnServer|AuthLDAPDereferenceAliases|AuthLDAPGroupAttribute|AuthLDAPGroupAttributeIsDN|AuthLDAPInitialBindAsUser|AuthLDAPInitialBindPattern|AuthLDAPMaxSubGroupDepth|AuthLDAPRemoteUserAttribute|AuthLDAPRemoteUserIsDN|AuthLDAPSearchAsUser|AuthLDAPSubGroupAttribute|AuthLDAPSubGroupClass|AuthLDAPUrl|AuthMerging|AuthName|AuthnCacheContext|AuthnCacheEnable|AuthnCacheProvideFor|AuthnCacheSOCache|AuthnCacheTimeout|AuthnzFcgiCheckAuthnProvider|AuthnzFcgiDefineProvider|AuthType|AuthUserFile|AuthzDBDLoginToReferer|AuthzDBDQuery|AuthzDBDRedirectQuery|AuthzDBMType|AuthzSendForbiddenOnFailure|BalancerGrowth|BalancerInherit|BalancerMember|BalancerPersist|BrowserMatch|BrowserMatchNoCase|BufferedLogs|BufferSize|CacheDefaultExpire|CacheDetailHeader|CacheDirLength|CacheDirLevels|CacheDisable|CacheEnable|CacheFile|CacheHeader|CacheIgnoreCacheControl|CacheIgnoreHeaders|CacheIgnoreNoLastMod|CacheIgnoreQueryString|CacheIgnoreURLSessionIdentifiers|CacheKeyBaseURL|CacheLastModifiedFactor|CacheLock|CacheLockMaxAge|CacheLockPath|CacheMaxExpire|CacheMaxFileSize|CacheMinExpire|CacheMinFileSize|CacheNegotiatedDocs|CacheQuickHandler|CacheReadSize|CacheReadTime|CacheRoot|CacheSocache|CacheSocacheMaxSize|CacheSocacheMaxTime|CacheSocacheMinTime|CacheSocacheReadSize|CacheSocacheReadTime|CacheStaleOnError|CacheStoreExpired|CacheStoreNoStore|CacheStorePrivate|CGIDScriptTimeout|CGIMapExtension|CharsetDefault|CharsetOptions|CharsetSourceEnc|CheckCaseOnly|CheckSpelling|ChrootDir|ContentDigest|CookieDomain|CookieExpires|CookieName|CookieStyle|CookieTracking|CoreDumpDirectory|CustomLog|Dav|DavDepthInfinity|DavGenericLockDB|DavLockDB|DavMinTimeout|DBDExptime|DBDInitSQL|DBDKeep|DBDMax|DBDMin|DBDParams|DBDPersist|DBDPrepareSQL|DBDriver|DefaultIcon|DefaultLanguage|DefaultRuntimeDir|DefaultType|Define|DeflateBufferSize|DeflateCompressionLevel|DeflateFilterNote|DeflateInflateLimitRequestBody|DeflateInflateRatioBurst|DeflateInflateRatioLimit|DeflateMemLevel|DeflateWindowSize|Deny|DirectoryCheckHandler|DirectoryIndex|DirectoryIndexRedirect|DirectorySlash|DocumentRoot|DTracePrivileges|DumpIOInput|DumpIOOutput|EnableExceptionHook|EnableMMAP|EnableSendfile|Error|ErrorDocument|ErrorLog|ErrorLogFormat|Example|ExpiresActive|ExpiresByType|ExpiresDefault|ExtendedStatus|ExtFilterDefine|ExtFilterOptions|FallbackResource|FileETag|FilterChain|FilterDeclare|FilterProtocol|FilterProvider|FilterTrace|ForceLanguagePriority|ForceType|ForensicLog|GprofDir|GracefulShutdownTimeout|Group|Header|HeaderName|HeartbeatAddress|HeartbeatListen|HeartbeatMaxServers|HeartbeatStorage|HeartbeatStorage|HostnameLookups|IdentityCheck|IdentityCheckTimeout|ImapBase|ImapDefault|ImapMenu|Include|IncludeOptional|IndexHeadInsert|IndexIgnore|IndexIgnoreReset|IndexOptions|IndexOrderDefault|IndexStyleSheet|InputSed|ISAPIAppendLogToErrors|ISAPIAppendLogToQuery|ISAPICacheFile|ISAPIFakeAsync|ISAPILogNotSupported|ISAPIReadAheadBuffer|KeepAlive|KeepAliveTimeout|KeptBodySize|LanguagePriority|LDAPCacheEntries|LDAPCacheTTL|LDAPConnectionPoolTTL|LDAPConnectionTimeout|LDAPLibraryDebug|LDAPOpCacheEntries|LDAPOpCacheTTL|LDAPReferralHopLimit|LDAPReferrals|LDAPRetries|LDAPRetryDelay|LDAPSharedCacheFile|LDAPSharedCacheSize|LDAPTimeout|LDAPTrustedClientCert|LDAPTrustedGlobalCert|LDAPTrustedMode|LDAPVerifyServerCert|LimitInternalRecursion|LimitRequestBody|LimitRequestFields|LimitRequestFieldSize|LimitRequestLine|LimitXMLRequestBody|Listen|ListenBackLog|LoadFile|LoadModule|LogFormat|LogLevel|LogMessage|LuaAuthzProvider|LuaCodeCache|LuaHookAccessChecker|LuaHookAuthChecker|LuaHookCheckUserID|LuaHookFixups|LuaHookInsertFilter|LuaHookLog|LuaHookMapToStorage|LuaHookTranslateName|LuaHookTypeChecker|LuaInherit|LuaInputFilter|LuaMapHandler|LuaOutputFilter|LuaPackageCPath|LuaPackagePath|LuaQuickHandler|LuaRoot|LuaScope|MaxConnectionsPerChild|MaxKeepAliveRequests|MaxMemFree|MaxRangeOverlaps|MaxRangeReversals|MaxRanges|MaxRequestWorkers|MaxSpareServers|MaxSpareThreads|MaxThreads|MergeTrailers|MetaDir|MetaFiles|MetaSuffix|MimeMagicFile|MinSpareServers|MinSpareThreads|MMapFile|ModemStandard|ModMimeUsePathInfo|MultiviewsMatch|Mutex|NameVirtualHost|NoProxy|NWSSLTrustedCerts|NWSSLUpgradeable|Options|Order|OutputSed|PassEnv|PidFile|PrivilegesMode|Protocol|ProtocolEcho|ProxyAddHeaders|ProxyBadHeader|ProxyBlock|ProxyDomain|ProxyErrorOverride|ProxyExpressDBMFile|ProxyExpressDBMType|ProxyExpressEnable|ProxyFtpDirCharset|ProxyFtpEscapeWildcards|ProxyFtpListOnWildcard|ProxyHTMLBufSize|ProxyHTMLCharsetOut|ProxyHTMLDocType|ProxyHTMLEnable|ProxyHTMLEvents|ProxyHTMLExtended|ProxyHTMLFixups|ProxyHTMLInterp|ProxyHTMLLinks|ProxyHTMLMeta|ProxyHTMLStripComments|ProxyHTMLURLMap|ProxyIOBufferSize|ProxyMaxForwards|ProxyPass|ProxyPassInherit|ProxyPassInterpolateEnv|ProxyPassMatch|ProxyPassReverse|ProxyPassReverseCookieDomain|ProxyPassReverseCookiePath|ProxyPreserveHost|ProxyReceiveBufferSize|ProxyRemote|ProxyRemoteMatch|ProxyRequests|ProxySCGIInternalRedirect|ProxySCGISendfile|ProxySet|ProxySourceAddress|ProxyStatus|ProxyTimeout|ProxyVia|ReadmeName|ReceiveBufferSize|Redirect|RedirectMatch|RedirectPermanent|RedirectTemp|ReflectorHeader|RemoteIPHeader|RemoteIPInternalProxy|RemoteIPInternalProxyList|RemoteIPProxiesHeader|RemoteIPTrustedProxy|RemoteIPTrustedProxyList|RemoveCharset|RemoveEncoding|RemoveHandler|RemoveInputFilter|RemoveLanguage|RemoveOutputFilter|RemoveType|RequestHeader|RequestReadTimeout|Require|RewriteBase|RewriteCond|RewriteEngine|RewriteMap|RewriteOptions|RewriteRule|RLimitCPU|RLimitMEM|RLimitNPROC|Satisfy|ScoreBoardFile|Script|ScriptAlias|ScriptAliasMatch|ScriptInterpreterSource|ScriptLog|ScriptLogBuffer|ScriptLogLength|ScriptSock|SecureListen|SeeRequestTail|SendBufferSize|ServerAdmin|ServerAlias|ServerLimit|ServerName|ServerPath|ServerRoot|ServerSignature|ServerTokens|Session|SessionCookieName|SessionCookieName2|SessionCookieRemove|SessionCryptoCipher|SessionCryptoDriver|SessionCryptoPassphrase|SessionCryptoPassphraseFile|SessionDBDCookieName|SessionDBDCookieName2|SessionDBDCookieRemove|SessionDBDDeleteLabel|SessionDBDInsertLabel|SessionDBDPerUser|SessionDBDSelectLabel|SessionDBDUpdateLabel|SessionEnv|SessionExclude|SessionHeader|SessionInclude|SessionMaxAge|SetEnv|SetEnvIf|SetEnvIfExpr|SetEnvIfNoCase|SetHandler|SetInputFilter|SetOutputFilter|SSIEndTag|SSIErrorMsg|SSIETag|SSILastModified|SSILegacyExprParser|SSIStartTag|SSITimeFormat|SSIUndefinedEcho|SSLCACertificateFile|SSLCACertificatePath|SSLCADNRequestFile|SSLCADNRequestPath|SSLCARevocationCheck|SSLCARevocationFile|SSLCARevocationPath|SSLCertificateChainFile|SSLCertificateFile|SSLCertificateKeyFile|SSLCipherSuite|SSLCompression|SSLCryptoDevice|SSLEngine|SSLFIPS|SSLHonorCipherOrder|SSLInsecureRenegotiation|SSLOCSPDefaultResponder|SSLOCSPEnable|SSLOCSPOverrideResponder|SSLOCSPResponderTimeout|SSLOCSPResponseMaxAge|SSLOCSPResponseTimeSkew|SSLOCSPUseRequestNonce|SSLOpenSSLConfCmd|SSLOptions|SSLPassPhraseDialog|SSLProtocol|SSLProxyCACertificateFile|SSLProxyCACertificatePath|SSLProxyCARevocationCheck|SSLProxyCARevocationFile|SSLProxyCARevocationPath|SSLProxyCheckPeerCN|SSLProxyCheckPeerExpire|SSLProxyCheckPeerName|SSLProxyCipherSuite|SSLProxyEngine|SSLProxyMachineCertificateChainFile|SSLProxyMachineCertificateFile|SSLProxyMachineCertificatePath|SSLProxyProtocol|SSLProxyVerify|SSLProxyVerifyDepth|SSLRandomSeed|SSLRenegBufferSize|SSLRequire|SSLRequireSSL|SSLSessionCache|SSLSessionCacheTimeout|SSLSessionTicketKeyFile|SSLSRPUnknownUserSeed|SSLSRPVerifierFile|SSLStaplingCache|SSLStaplingErrorCacheTimeout|SSLStaplingFakeTryLater|SSLStaplingForceURL|SSLStaplingResponderTimeout|SSLStaplingResponseMaxAge|SSLStaplingResponseTimeSkew|SSLStaplingReturnResponderErrors|SSLStaplingStandardCacheTimeout|SSLStrictSNIVHostCheck|SSLUserName|SSLUseStapling|SSLVerifyClient|SSLVerifyDepth|StartServers|StartThreads|Substitute|Suexec|SuexecUserGroup|ThreadLimit|ThreadsPerChild|ThreadStackSize|TimeOut|TraceEnable|TransferLog|TypesConfig|UnDefine|UndefMacro|UnsetEnv|Use|UseCanonicalName|UseCanonicalPhysicalPort|User|UserDir|VHostCGIMode|VHostCGIPrivs|VHostGroup|VHostPrivs|VHostSecure|VHostUser|VirtualDocumentRoot|VirtualDocumentRootIP|VirtualScriptAlias|VirtualScriptAliasIP|WatchdogInterval|XBitHack|xml2EncAlias|xml2EncDefault|xml2StartParse)\b/im,lookbehind:!0,alias:"property"},"directive-block":{pattern:/<\/?\b(?:AuthnProviderAlias|AuthzProviderAlias|Directory|DirectoryMatch|Else|ElseIf|Files|FilesMatch|If|IfDefine|IfModule|IfVersion|Limit|LimitExcept|Location|LocationMatch|Macro|Proxy|RequireAll|RequireAny|RequireNone|VirtualHost)\b *.*>/i,inside:{"directive-block":{pattern:/^<\/?\w+/,inside:{punctuation:/^<\/?/},alias:"tag"},"directive-block-parameter":{pattern:/.*[^>]/,inside:{punctuation:/:/,string:{pattern:/("|').*\1/,inside:{variable:/[$%]\{?(?:\w\.?[-+:]?)+\}?/}}},alias:"attr-value"},punctuation:/>/},alias:"tag"},"directive-flags":{pattern:/\[(?:\w,?)+\]/,alias:"keyword"},string:{pattern:/("|').*\1/,inside:{variable:/[$%]\{?(?:\w\.?[-+:]?)+\}?/}},variable:/[$%]\{?(?:\w\.?[-+:]?)+\}?/,regex:/\^?.*\$|\^.*\$?/}; +Prism.languages.c=Prism.languages.extend("clike",{keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|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:/(?:\b0x[\da-f]+|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?)[ful]*/i}),Prism.languages.insertBefore("c","string",{macro:{pattern:/(^\s*)#\s*[a-z]+(?:[^\r\n\\]|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,alias:"property",inside:{string:{pattern:/(#\s*include\s*)(?:<.+?>|("|')(?:\\?.)+?\2)/,lookbehind:!0},directive:{pattern:/(#\s*)\b(?:define|defined|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|SEEK_CUR|SEEK_END|SEEK_SET|stdin|stdout|stderr)\b/}),delete Prism.languages.c["class-name"],delete Prism.languages.c["boolean"]; +Prism.languages.csharp=Prism.languages.extend("clike",{keyword:/\b(?:abstract|add|alias|as|ascending|async|await|base|bool|break|byte|case|catch|char|checked|class|const|continue|decimal|default|delegate|descending|do|double|dynamic|else|enum|event|explicit|extern|false|finally|fixed|float|for|foreach|from|get|global|goto|group|if|implicit|in|int|interface|internal|into|is|join|let|lock|long|namespace|new|null|object|operator|orderby|out|override|params|partial|private|protected|public|readonly|ref|remove|return|sbyte|sealed|select|set|short|sizeof|stackalloc|static|string|struct|switch|this|throw|true|try|typeof|uint|ulong|unchecked|unsafe|ushort|using|value|var|virtual|void|volatile|where|while|yield)\b/,string:[{pattern:/@("|')(?:\1\1|\\[\s\S]|(?!\1)[^\\])*\1/,greedy:!0},{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*?\1/,greedy:!0}],"class-name":[{pattern:/\b[A-Z]\w*(?:\.\w+)*\b(?=\s+\w+)/,inside:{punctuation:/\./}},{pattern:/(\[)[A-Z]\w*(?:\.\w+)*\b/,lookbehind:!0,inside:{punctuation:/\./}},{pattern:/(\b(?:class|interface)\s+[A-Z]\w*(?:\.\w+)*\s*:\s*)[A-Z]\w*(?:\.\w+)*\b/,lookbehind:!0,inside:{punctuation:/\./}},{pattern:/((?:\b(?:class|interface|new)\s+)|(?:catch\s+\())[A-Z]\w*(?:\.\w+)*\b/,lookbehind:!0,inside:{punctuation:/\./}}],number:/\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)f?/i}),Prism.languages.insertBefore("csharp","class-name",{"generic-method":{pattern:/\w+\s*<[^>\r\n]+?>\s*(?=\()/,inside:{"function":/^\w+/,"class-name":{pattern:/\b[A-Z]\w*(?:\.\w+)*\b/,inside:{punctuation:/\./}},keyword:Prism.languages.csharp.keyword,punctuation:/[<>(),.:]/}},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"}}}}),Prism.languages.dotnet=Prism.languages.csharp; +!function(e){var t={variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--?|-=|\+\+?|\+=|!=?|~|\*\*?|\*=|\/=?|%=?|<<=?|>>=?|<=?|>=?|==?|&&?|&=|\^=?|\|\|?|\|=|\?|:/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\([^)]+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},/\$(?:[\w#?*!@]+|\{[^}]+\})/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/,lookbehind:!0,greedy:!0,inside:t},{pattern:/(["'])(?:\\[\s\S]|\$\([^)]+\)|`[^`]+`|(?!\1)[^\\])*\1/,greedy:!0,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|curl|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|npm|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.string=e.languages.bash.string,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,e.languages.shell=e.languages.bash}(Prism); +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|int8_t|int16_t|int32_t|int64_t|uint8_t|uint16_t|uint32_t|uint64_t|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}|\|\|?|\?|\*|\/|\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+)\w+/i,lookbehind:!0}}),Prism.languages.insertBefore("cpp","string",{"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}); +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]+/,attribute:/\[[^\]]+\]/}},Prism.languages.insertBefore("css","function",{hexcode:/#[\da-f]{3,8}/i,entity:/\\[\da-f]{1,8}/i,number:/[\d%.]+/}); +Prism.languages["markup-templating"]={},Object.defineProperties(Prism.languages["markup-templating"],{buildPlaceholders:{value:function(e,t,n,a){e.language===t&&(e.tokenStack=[],e.code=e.code.replace(n,function(n){if("function"==typeof a&&!a(n))return n;for(var r=e.tokenStack.length;-1!==e.code.indexOf("___"+t.toUpperCase()+r+"___");)++r;return e.tokenStack[r]=n,"___"+t.toUpperCase()+r+"___"}),e.grammar=Prism.languages.markup)}},tokenizePlaceholders:{value:function(e,t){if(e.language===t&&e.tokenStack){e.grammar=Prism.languages[t];var n=0,a=Object.keys(e.tokenStack),r=function(o){if(!(n>=a.length))for(var i=0;i<o.length;i++){var g=o[i];if("string"==typeof g||g.content&&"string"==typeof g.content){var c=a[n],s=e.tokenStack[c],l="string"==typeof g?g:g.content,p=l.indexOf("___"+t.toUpperCase()+c+"___");if(p>-1){++n;var f,u=l.substring(0,p),_=new Prism.Token(t,Prism.tokenize(s,e.grammar,t),"language-"+t,s),k=l.substring(p+("___"+t.toUpperCase()+c+"___").length);if(u||k?(f=[u,_,k].filter(function(e){return!!e}),r(f)):f=_,"string"==typeof g?Array.prototype.splice.apply(o,[i,1].concat(f)):g.content=f,n>=a.length)break}}else g.content&&"string"!=typeof g.content&&r(g.content)}};r(e.tokens)}}}}); +Prism.languages.git={comment:/^#.*/m,deleted:/^[-–].*/m,inserted:/^\+.*/m,string:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/m,command:{pattern:/^.*\$ git .*$/m,inside:{parameter:/\s--?\w+/m}},coord:/^@@.*@@$/m,commit_sha1:/^commit \w{40}$/m}; +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*|\B\.\d+)(?:e[+-]?\d+)?[df]?/i,operator:{pattern:/(^|[^.])(?:\+[+=]?|-[-=]?|!=?|<<?=?|>>?>?=?|==?|&[&=]?|\|[|=]?|\*=?|\/=?|%=?|\^=?|[?:~])/m,lookbehind:!0}}),Prism.languages.insertBefore("java","function",{annotation:{alias:"punctuation",pattern:/(^|[^.])@\w+/,lookbehind:!0}}),Prism.languages.insertBefore("java","class-name",{generics:{pattern:/<\s*\w+(?:\.\w+)?(?:\s*,\s*\w+(?:\.\w+)?)*>/i,alias:"function",inside:{keyword:Prism.languages.java.keyword,punctuation:/[<>(),.:]/}}}); +Prism.languages.json={property:/"(?:\\.|[^\\"\r\n])*"(?=\s*:)/i,string:{pattern:/"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,greedy:!0},number:/-?\d+\.?\d*([Ee][+-]?\d+)?/,punctuation:/[{}[\],]/,operator:/:/g,"boolean":/\b(?:true|false)\b/i,"null":/\bnull\b/i},Prism.languages.jsonp=Prism.languages.json; +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.languages.markdown.url,Prism.languages.markdown.italic.inside.url=Prism.languages.markdown.url,Prism.languages.markdown.bold.inside.italic=Prism.languages.markdown.italic,Prism.languages.markdown.italic.inside.bold=Prism.languages.markdown.bold; +Prism.languages.makefile={comment:{pattern:/(^|[^\\])#(?:\\(?:\r\n|[\s\S])|[^\\\r\n])*/,lookbehind:!0},string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},builtin:/\.[A-Z][^:#=\s]+(?=\s*:(?!=))/,symbol:{pattern:/^[^:=\r\n]+(?=\s*:(?!=))/m,inside:{variable:/\$+(?:[^(){}:#=\s]+|(?=[({]))/}},variable:/\$+(?:[^(){}:#=\s]+|\([@*%<^+?][DF]\)|(?=[({]))/,keyword:[/-include\b|\b(?:define|else|endef|endif|export|ifn?def|ifn?eq|include|override|private|sinclude|undefine|unexport|vpath)\b/,{pattern:/(\()(?:addsuffix|abspath|and|basename|call|dir|error|eval|file|filter(?:-out)?|findstring|firstword|flavor|foreach|guile|if|info|join|lastword|load|notdir|or|origin|patsubst|realpath|shell|sort|strip|subst|suffix|value|warning|wildcard|word(?:s|list)?)(?=[ \t])/,lookbehind:!0}],operator:/(?:::|[?:+!])?=|[|@]/,punctuation:/[:;(){}]/}; +Prism.languages.nginx=Prism.languages.extend("clike",{comment:{pattern:/(^|[^"{\\])#.*/,lookbehind:!0},keyword:/\b(?:CONTENT_|DOCUMENT_|GATEWAY_|HTTP_|HTTPS|if_not_empty|PATH_|QUERY_|REDIRECT_|REMOTE_|REQUEST_|SCGI|SCRIPT_|SERVER_|http|events|accept_mutex|accept_mutex_delay|access_log|add_after_body|add_before_body|add_header|addition_types|aio|alias|allow|ancient_browser|ancient_browser_value|auth|auth_basic|auth_basic_user_file|auth_http|auth_http_header|auth_http_timeout|autoindex|autoindex_exact_size|autoindex_localtime|break|charset|charset_map|charset_types|chunked_transfer_encoding|client_body_buffer_size|client_body_in_file_only|client_body_in_single_buffer|client_body_temp_path|client_body_timeout|client_header_buffer_size|client_header_timeout|client_max_body_size|connection_pool_size|create_full_put_path|daemon|dav_access|dav_methods|debug_connection|debug_points|default_type|deny|devpoll_changes|devpoll_events|directio|directio_alignment|disable_symlinks|empty_gif|env|epoll_events|error_log|error_page|expires|fastcgi_buffer_size|fastcgi_buffers|fastcgi_busy_buffers_size|fastcgi_cache|fastcgi_cache_bypass|fastcgi_cache_key|fastcgi_cache_lock|fastcgi_cache_lock_timeout|fastcgi_cache_methods|fastcgi_cache_min_uses|fastcgi_cache_path|fastcgi_cache_purge|fastcgi_cache_use_stale|fastcgi_cache_valid|fastcgi_connect_timeout|fastcgi_hide_header|fastcgi_ignore_client_abort|fastcgi_ignore_headers|fastcgi_index|fastcgi_intercept_errors|fastcgi_keep_conn|fastcgi_max_temp_file_size|fastcgi_next_upstream|fastcgi_no_cache|fastcgi_param|fastcgi_pass|fastcgi_pass_header|fastcgi_read_timeout|fastcgi_redirect_errors|fastcgi_send_timeout|fastcgi_split_path_info|fastcgi_store|fastcgi_store_access|fastcgi_temp_file_write_size|fastcgi_temp_path|flv|geo|geoip_city|geoip_country|google_perftools_profiles|gzip|gzip_buffers|gzip_comp_level|gzip_disable|gzip_http_version|gzip_min_length|gzip_proxied|gzip_static|gzip_types|gzip_vary|if|if_modified_since|ignore_invalid_headers|image_filter|image_filter_buffer|image_filter_jpeg_quality|image_filter_sharpen|image_filter_transparency|imap_capabilities|imap_client_buffer|include|index|internal|ip_hash|keepalive|keepalive_disable|keepalive_requests|keepalive_timeout|kqueue_changes|kqueue_events|large_client_header_buffers|limit_conn|limit_conn_log_level|limit_conn_zone|limit_except|limit_rate|limit_rate_after|limit_req|limit_req_log_level|limit_req_zone|limit_zone|lingering_close|lingering_time|lingering_timeout|listen|location|lock_file|log_format|log_format_combined|log_not_found|log_subrequest|map|map_hash_bucket_size|map_hash_max_size|master_process|max_ranges|memcached_buffer_size|memcached_connect_timeout|memcached_next_upstream|memcached_pass|memcached_read_timeout|memcached_send_timeout|merge_slashes|min_delete_depth|modern_browser|modern_browser_value|mp4|mp4_buffer_size|mp4_max_buffer_size|msie_padding|msie_refresh|multi_accept|open_file_cache|open_file_cache_errors|open_file_cache_min_uses|open_file_cache_valid|open_log_file_cache|optimize_server_names|override_charset|pcre_jit|perl|perl_modules|perl_require|perl_set|pid|pop3_auth|pop3_capabilities|port_in_redirect|post_action|postpone_output|protocol|proxy|proxy_buffer|proxy_buffer_size|proxy_buffering|proxy_buffers|proxy_busy_buffers_size|proxy_cache|proxy_cache_bypass|proxy_cache_key|proxy_cache_lock|proxy_cache_lock_timeout|proxy_cache_methods|proxy_cache_min_uses|proxy_cache_path|proxy_cache_use_stale|proxy_cache_valid|proxy_connect_timeout|proxy_cookie_domain|proxy_cookie_path|proxy_headers_hash_bucket_size|proxy_headers_hash_max_size|proxy_hide_header|proxy_http_version|proxy_ignore_client_abort|proxy_ignore_headers|proxy_intercept_errors|proxy_max_temp_file_size|proxy_method|proxy_next_upstream|proxy_no_cache|proxy_pass|proxy_pass_error_message|proxy_pass_header|proxy_pass_request_body|proxy_pass_request_headers|proxy_read_timeout|proxy_redirect|proxy_redirect_errors|proxy_send_lowat|proxy_send_timeout|proxy_set_body|proxy_set_header|proxy_ssl_session_reuse|proxy_store|proxy_store_access|proxy_temp_file_write_size|proxy_temp_path|proxy_timeout|proxy_upstream_fail_timeout|proxy_upstream_max_fails|random_index|read_ahead|real_ip_header|recursive_error_pages|request_pool_size|reset_timedout_connection|resolver|resolver_timeout|return|rewrite|root|rtsig_overflow_events|rtsig_overflow_test|rtsig_overflow_threshold|rtsig_signo|satisfy|satisfy_any|secure_link_secret|send_lowat|send_timeout|sendfile|sendfile_max_chunk|server|server_name|server_name_in_redirect|server_names_hash_bucket_size|server_names_hash_max_size|server_tokens|set|set_real_ip_from|smtp_auth|smtp_capabilities|so_keepalive|source_charset|split_clients|ssi|ssi_silent_errors|ssi_types|ssi_value_length|ssl|ssl_certificate|ssl_certificate_key|ssl_ciphers|ssl_client_certificate|ssl_crl|ssl_dhparam|ssl_engine|ssl_prefer_server_ciphers|ssl_protocols|ssl_session_cache|ssl_session_timeout|ssl_verify_client|ssl_verify_depth|starttls|stub_status|sub_filter|sub_filter_once|sub_filter_types|tcp_nodelay|tcp_nopush|timeout|timer_resolution|try_files|types|types_hash_bucket_size|types_hash_max_size|underscores_in_headers|uninitialized_variable_warn|upstream|use|user|userid|userid_domain|userid_expires|userid_name|userid_p3p|userid_path|userid_service|valid_referers|variables_hash_bucket_size|variables_hash_max_size|worker_connections|worker_cpu_affinity|worker_priority|worker_processes|worker_rlimit_core|worker_rlimit_nofile|worker_rlimit_sigpending|working_directory|xclient|xml_entities|xslt_entities|xslt_stylesheet|xslt_types)\b/i}),Prism.languages.insertBefore("nginx","keyword",{variable:/\$[a-z_]+/i}); +Prism.languages.perl={comment:[{pattern:/(^\s*)=\w+[\s\S]*?=cut.*/m,lookbehind:!0},{pattern:/(^|[^\\$])#.*/,lookbehind:!0}],string:[{pattern:/\b(?:q|qq|qx|qw)\s*([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/,greedy:!0},{pattern:/\b(?:q|qq|qx|qw)\s+([a-zA-Z0-9])(?:(?!\1)[^\\]|\\[\s\S])*\1/,greedy:!0},{pattern:/\b(?:q|qq|qx|qw)\s*\((?:[^()\\]|\\[\s\S])*\)/,greedy:!0},{pattern:/\b(?:q|qq|qx|qw)\s*\{(?:[^{}\\]|\\[\s\S])*\}/,greedy:!0},{pattern:/\b(?:q|qq|qx|qw)\s*\[(?:[^[\]\\]|\\[\s\S])*\]/,greedy:!0},{pattern:/\b(?:q|qq|qx|qw)\s*<(?:[^<>\\]|\\[\s\S])*>/,greedy:!0},{pattern:/("|`)(?:(?!\1)[^\\]|\\[\s\S])*\1/,greedy:!0},{pattern:/'(?:[^'\\\r\n]|\\.)*'/,greedy:!0}],regex:[{pattern:/\b(?:m|qr)\s*([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1[msixpodualngc]*/,greedy:!0},{pattern:/\b(?:m|qr)\s+([a-zA-Z0-9])(?:(?!\1)[^\\]|\\[\s\S])*\1[msixpodualngc]*/,greedy:!0},{pattern:/\b(?:m|qr)\s*\((?:[^()\\]|\\[\s\S])*\)[msixpodualngc]*/,greedy:!0},{pattern:/\b(?:m|qr)\s*\{(?:[^{}\\]|\\[\s\S])*\}[msixpodualngc]*/,greedy:!0},{pattern:/\b(?:m|qr)\s*\[(?:[^[\]\\]|\\[\s\S])*\][msixpodualngc]*/,greedy:!0},{pattern:/\b(?:m|qr)\s*<(?:[^<>\\]|\\[\s\S])*>[msixpodualngc]*/,greedy:!0},{pattern:/(^|[^-]\b)(?:s|tr|y)\s*([^a-zA-Z0-9\s{(\[<])(?:(?!\2)[^\\]|\\[\s\S])*\2(?:(?!\2)[^\\]|\\[\s\S])*\2[msixpodualngcer]*/,lookbehind:!0,greedy:!0},{pattern:/(^|[^-]\b)(?:s|tr|y)\s+([a-zA-Z0-9])(?:(?!\2)[^\\]|\\[\s\S])*\2(?:(?!\2)[^\\]|\\[\s\S])*\2[msixpodualngcer]*/,lookbehind:!0,greedy:!0},{pattern:/(^|[^-]\b)(?:s|tr|y)\s*\((?:[^()\\]|\\[\s\S])*\)\s*\((?:[^()\\]|\\[\s\S])*\)[msixpodualngcer]*/,lookbehind:!0,greedy:!0},{pattern:/(^|[^-]\b)(?:s|tr|y)\s*\{(?:[^{}\\]|\\[\s\S])*\}\s*\{(?:[^{}\\]|\\[\s\S])*\}[msixpodualngcer]*/,lookbehind:!0,greedy:!0},{pattern:/(^|[^-]\b)(?:s|tr|y)\s*\[(?:[^[\]\\]|\\[\s\S])*\]\s*\[(?:[^[\]\\]|\\[\s\S])*\][msixpodualngcer]*/,lookbehind:!0,greedy:!0},{pattern:/(^|[^-]\b)(?:s|tr|y)\s*<(?:[^<>\\]|\\[\s\S])*>\s*<(?:[^<>\\]|\\[\s\S])*>[msixpodualngcer]*/,lookbehind:!0,greedy:!0},{pattern:/\/(?:[^\/\\\r\n]|\\.)*\/[msixpodualngc]*(?=\s*(?:$|[\r\n,.;})&|\-+*~<>!?^]|(lt|gt|le|ge|eq|ne|cmp|not|and|or|xor|x)\b))/,greedy:!0}],variable:[/[&*$@%]\{\^[A-Z]+\}/,/[&*$@%]\^[A-Z_]/,/[&*$@%]#?(?=\{)/,/[&*$@%]#?(?:(?:::)*'?(?!\d)[\w$]+)+(?:::)*/i,/[&*$@%]\d+/,/(?!%=)[$@%][!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~]/],filehandle:{pattern:/<(?![<=])\S*>|\b_\b/,alias:"symbol"},vstring:{pattern:/v\d+(?:\.\d+)*|\d+(?:\.\d+){2,}/,alias:"string"},"function":{pattern:/sub [a-z0-9_]+/i,inside:{keyword:/sub/}},keyword:/\b(?:any|break|continue|default|delete|die|do|else|elsif|eval|for|foreach|given|goto|if|last|local|my|next|our|package|print|redo|require|say|state|sub|switch|undef|unless|until|use|when|while)\b/,number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0b[01](?:_?[01])*|(?:\d(?:_?\d)*)?\.?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)\b/,operator:/-[rwxoRWXOezsfdlpSbctugkTBMAC]\b|\+[+=]?|-[-=>]?|\*\*?=?|\/\/?=?|=[=~>]?|~[~=]?|\|\|?=?|&&?=?|<(?:=>?|<=?)?|>>?=?|![~=]?|[%^]=?|\.(?:=|\.\.?)?|[\\?]|\bx(?:=|\b)|\b(?:lt|gt|le|ge|eq|ne|cmp|not|and|or|xor)\b/,punctuation:/[{}[\];(),:]/}; +!function(e){e.languages.php=e.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:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0}}),e.languages.insertBefore("php","string",{"shell-comment":{pattern:/(^|[^\\])#.*/,lookbehind:!0,alias:"comment"}}),e.languages.insertBefore("php","keyword",{delimiter:{pattern:/\?>|<\?(?:php|=)?/i,alias:"important"},variable:/\$+(?:\w+\b|(?={))/i,"package":{pattern:/(\\|namespace\s+|use\s+)[\w\\]+/,lookbehind:!0,inside:{punctuation:/\\/}}}),e.languages.insertBefore("php","operator",{property:{pattern:/(->)[\w]+/,lookbehind:!0}}),e.languages.insertBefore("php","string",{"nowdoc-string":{pattern:/<<<'([^']+)'(?:\r\n?|\n)(?:.*(?:\r\n?|\n))*?\1;/,greedy:!0,alias:"string",inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},"heredoc-string":{pattern:/<<<(?:"([^"]+)"(?:\r\n?|\n)(?:.*(?:\r\n?|\n))*?\1;|([a-z_]\w*)(?:\r\n?|\n)(?:.*(?:\r\n?|\n))*?\2;)/i,greedy:!0,alias:"string",inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:null}},"single-quoted-string":{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0,alias:"string"},"double-quoted-string":{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,alias:"string",inside:{interpolation:null}}}),delete e.languages.php.string;var n={pattern:/{\$(?:{(?:{[^{}]+}|[^{}]+)}|[^{}])+}|(^|[^\\{])\$+(?:\w+(?:\[.+?]|->\w+)*)/,lookbehind:!0,inside:{rest:e.languages.php}};e.languages.php["heredoc-string"].inside.interpolation=n,e.languages.php["double-quoted-string"].inside.interpolation=n,e.hooks.add("before-tokenize",function(n){if(/(?:<\?php|<\?)/gi.test(n.code)){var i=/(?:<\?php|<\?)[\s\S]*?(?:\?>|$)/gi;e.languages["markup-templating"].buildPlaceholders(n,"php",i)}}),e.hooks.add("after-tokenize",function(n){e.languages["markup-templating"].tokenizePlaceholders(n,"php")})}(Prism); +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)\b/,scope:{pattern:/\b[\w\\]+::/,inside:{keyword:/static|self|parent/,punctuation:/::|\\/}}}); +Prism.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\])*\2/,greedy:!0,lookbehind:!0},variable:/@[\w.$]+|@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,"function":/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|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|HOUR|IDENTITY(?:_INSERT|COL)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|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|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURNS?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,"boolean":/\b(?:TRUE|FALSE|NULL)\b/i,number:/\b0x[\da-f]+\b|\b\d+\.?\d*|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|IN|LIKE|NOT|OR|IS|DIV|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/}; +Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0},"triple-quoted-string":{pattern:/("""|''')[\s\S]+?\1/,greedy:!0,alias:"string"},string:{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},"function":{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/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|nonlocal|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,"boolean":/\b(?:True|False|None)\b/,number:/(?:\b(?=\d)|\B(?=\.))(?:0[bo])?(?:(?:\d|0x[\da-f])[\da-f]*\.?\d*|\.\d+)(?:e[+-]?\d+)?j?\b/i,operator:/[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]|\b(?:or|and|not)\b/,punctuation:/[{}[\];(),.:]/}; +Prism.languages.yaml={scalar:{pattern:/([\-:]\s*(?:![^\s]+)?[ \t]*[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)[^\r\n]+(?:\2[^\r\n]+)*)/,lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:/(\s*(?:^|[:\-,[{\r\n?])[ \t]*(?:![^\s]+)?[ \t]*)[^\r\n{[\]},#\s]+?(?=\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]*)("|')(?:(?!\2)[^\\\r\n]|\\.)*\2(?=[ \t]*(?:$|,|]|}))/m,lookbehind:!0,greedy:!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:/---|[:[\]{}\-,|>?]|\.\.\./};
A templates/style-alt.css

@@ -0,0 +1,29 @@

+body { + color: #222; + background-color: #eee; +} + +a { + color: #3173b4; +} + +a:hover { + color: #014384; +} + +code, +pre { + color: darkgreen; +} + +.contrast svg { + transform: rotate(180deg); +} + +blockquote { + color: #555; +} + +td, th { + border: 1px solid #111; +}
D templates/style-dark.css

@@ -1,583 +0,0 @@

-* { - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; - transition: all 0.2s; - padding: 0; - margin: 0; -} - -html, -.content-footer, -.content-header { - position: relative; - background-color: #111; - color: #bbb; -} - -html, body { - min-height: 100%; - font-family: "Liberation Sans", sans-serif; - color: #ccc; - background-color: #222; - font-size: 102%; -} - -hr { - border: none; - border-top: 1px solid #777; - margin: 1em 0; - clear:both; -} - -a { - color: #5193D4; - border-bottom: 1px solid transparent; - text-decoration: none; -} - -a:hover { - color: #71B3F4; - border-bottom: 1px solid #71B3F4; -} - -ul, -ol { - margin-left: 2em; -} - -dd { - margin-left: 1em; -} - -dt { - font-weight: bold; - margin: 1em 0; -} - -li { - margin: 0.3em 0; -} - -p { - margin: 1.2em 0; - line-height: 1.3em; -} - -h1, -h2, -h3, -h4, -h5, -h6 { - margin: 1em 0 0.6em 0; - padding: 0.3em 0; - line-height: 1.2em; -} - -h1 { - font-size: 1.6em; -} - -h2 { - font-size: 1.4em; -} - -h3 { - font-size: 1.2em; -} - -h4 { - font-size: 1em; -} - -h5 { - font-size: 1em; -} - -h6 { - font-size: 1em; -} - -table { - border-collapse: collapse; - border-spacing: 0; - width: 100%; -} - -td, -th { - padding: 0.3em; - border: 1px solid #111; - text-align:left; -} - -th { - font-weight: bold; - background-color: #222; -} - -tr:nth-child(odd) { - background-color: #333; -} -tr:nth-child(even) { - background-color: #444; -} - -blockquote { - margin: 0.6em; - padding-left: 0.6em; - border-left: 3px solid #999; - color: #999; -} - -input { - border: none; - border-bottom: 3px solid #999; - background-color: transparent; - color: #ccc; -} - -input:focus, -input:hover { - border-bottom: 3px solid #fff; - color: #fff; -} - - -code, -pre, -q { - font-family: "Courier New", "Courier", monospace; - font-size: 0.94em; -} - -code, -pre { - color: limegreen; - background-color: #222; - border: 1px solid #666; - direction: ltr; - text-align: left; - tab-size: 2; -} - -pre code { - border: none; -} - -pre { - overflow: auto; - padding: 0.6em; -} - -code { - padding: 0.1em; -} - -.codehilite .hll { background-color: #222222 } -.codehilite { background: #000000; color: #cccccc } -.codehilite .c { color: #000080 } -.codehilite .err { color: #cccccc; border: 1px solid #FF0000 } -.codehilite .esc { color: #cccccc } -.codehilite .g { color: #cccccc } -.codehilite .k { color: #cdcd00 } -.codehilite .l { color: #cccccc } -.codehilite .n { color: #cccccc } -.codehilite .o { color: #3399cc } -.codehilite .x { color: #cccccc } -.codehilite .p { color: #cccccc } -.codehilite .ch { color: #000080 } -.codehilite .cm { color: #000080 } -.codehilite .cp { color: #000080 } -.codehilite .cpf { color: #000080 } -.codehilite .c1 { color: #000080 } -.codehilite .cs { color: #cd0000; font-weight: bold } -.codehilite .gd { color: #cd0000 } -.codehilite .ge { color: #cccccc; font-style: italic } -.codehilite .gr { color: #FF0000 } -.codehilite .gh { color: #000080; font-weight: bold } -.codehilite .gi { color: #00cd00 } -.codehilite .go { color: #888888 } -.codehilite .gp { color: #000080; font-weight: bold } -.codehilite .gs { color: #cccccc; font-weight: bold } -.codehilite .gu { color: #800080; font-weight: bold } -.codehilite .gt { color: #0044DD } -.codehilite .kc { color: #cdcd00 } -.codehilite .kd { color: #00cd00 } -.codehilite .kn { color: #cd00cd } -.codehilite .kp { color: #cdcd00 } -.codehilite .kr { color: #cdcd00 } -.codehilite .kt { color: #00cd00 } -.codehilite .ld { color: #cccccc } -.codehilite .m { color: #cd00cd } -.codehilite .s { color: #cd0000 } -.codehilite .na { color: #cccccc } -.codehilite .nb { color: #cd00cd } -.codehilite .nc { color: #00cdcd } -.codehilite .no { color: #cccccc } -.codehilite .nd { color: #cccccc } -.codehilite .ni { color: #cccccc } -.codehilite .ne { color: #666699; font-weight: bold } -.codehilite .nf { color: #cccccc } -.codehilite .nl { color: #cccccc } -.codehilite .nn { color: #cccccc } -.codehilite .nx { color: #cccccc } -.codehilite .py { color: #cccccc } -.codehilite .nt { color: #cccccc } -.codehilite .nv { color: #00cdcd } -.codehilite .ow { color: #cdcd00 } -.codehilite .w { color: #cccccc } -.codehilite .mb { color: #cd00cd } -.codehilite .mf { color: #cd00cd } -.codehilite .mh { color: #cd00cd } -.codehilite .mi { color: #cd00cd } -.codehilite .mo { color: #cd00cd } -.codehilite .sa { color: #cd0000 } -.codehilite .sb { color: #cd0000 } -.codehilite .sc { color: #cd0000 } -.codehilite .dl { color: #cd0000 } -.codehilite .sd { color: #cd0000 } -.codehilite .s2 { color: #cd0000 } -.codehilite .se { color: #cd0000 } -.codehilite .sh { color: #cd0000 } -.codehilite .si { color: #cd0000 } -.codehilite .sx { color: #cd0000 } -.codehilite .sr { color: #cd0000 } -.codehilite .s1 { color: #cd0000 } -.codehilite .ss { color: #cd0000 } -.codehilite .bp { color: #cd00cd } -.codehilite .fm { color: #cccccc } -.codehilite .vc { color: #00cdcd } -.codehilite .vg { color: #00cdcd } -.codehilite .vi { color: #00cdcd } -.codehilite .vm { color: #00cdcd } -.codehilite .il { color: #cd00cd } - -.limit, -.content-body { - max-width: 86ch; - margin: 0 auto; - padding: 0.6em; -} - -.icon { - transform: rotate(0deg); - width: 16px; - height: 16px; - display: inline-block; - fill: currentColor; - overflow: visible; - vertical-align:text-top; - margin: 0 0.1em; -} - -.content-header { - font-size: 1.1em; - text-align:center; - padding: 0 0 1em 0; -} - -.content-navigation ul { - list-style-type: none; - margin: 0; -} - -.content-navigation ul li { - display: inline-block; - padding-right: 0.6em; -} - -.content-header a { - font-weight: bold; - border-bottom: 3px solid transparent !important;; - color: #ccc !important;; -} - -.content-header a:hover { - border-bottom: 3px solid #fefefe !important;; -} - -.content-navigation ul li a.active { - border-bottom: 3px solid #ccc !important; -} - -.content-navigation ul li a svg { - display:block; - margin: 0.1em auto; -} - -.search-form label { - display: none; -} - -.search-form { - margin: 0.6em; -} - -.search-form .search-field { - width: 10em; -} - -.contrast { - position: absolute; - top:0.6em; - right: 0.6em; - margin: 0; - padding: 0; -} - -.contrast.active { - transform: rotate(180deg); -} - -@media all and (min-width: 56em) { - .content-header { - display: flex; - justify-content: space-between; - padding: 0.6em 0.3em; - } - - .content-navigation ul li a { - padding-bottom: 0.1em; - } - - .content-navigation ul li a svg { - display:inline-block; - } - - .search-form { - margin: 0.3em 2em 0 auto; - } - - .contrast { - top:1em; - } -} - -figure { - position:relative; - overflow: hidden; - margin: 2em 0; -} - -figure figcaption { - padding: 0.3em 0; - text-align: center; -} - -.adaptimg { - display: block; - max-height: 98vh; - max-width: 100%; - width:auto; - height:auto; - margin: 0 auto; - padding: 0; - border: 1px solid #000; -} - -.h-feed figcaption { - display: none; -} - -.exif { - font-size: 0.8em; - margin: 0.3em 0; -} - -.exif dt { - display: none; -} - -.exif dd { - display: inline-block; - margin: 0 0.6em 0 0; - padding: 0.3em 0; -} - -.exif .icon { - width: 1em; -} - -.footnote-ref { - border: 0; - white-space: nowrap; - margin-left: 0.2em; -} - -.footnote-ref::before { - content: '['; -} - -.footnote-ref::after { - content: ']'; -} - -.footnote ol li p { - margin: 0; - padding: 0; -} - -.footnote ol li a { - display: inline-block; - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; - vertical-align: top; - max-width: 80%; -} - -.footnote ol li a[href^="#"] { - margin-left: 0.6em; - max-width: 20%; - font-size: 0.6em; -} - -.footnote ol li a[href^="#"]:after { - content: "back to text"; - margin-left: 0.2em; - color: #666; -} - -.footnote ol li a[href^="#"]:hover:after { - color: #ccc; -} - -.twothird { - display: inline-block; - width: 65%; - vertical-align:text-top; -} - -.onethird { - display: inline-block; - width: 33%; - vertical-align:text-top; -} - - -.content-footer { - margin-top: 2em; - padding: 1em 0; - color: #999; -} - -.content-footer h2 { - display: none; - color: #999; -} - -.content-footer a { - color: #999; -} - -.content-footer a:hover { - color: #fff; -} - -.content-footer dl { - position: relative; -} - -.content-footer dt { - display: block; -} - -.content-footer dd { - display: block; - margin: -2.3em 0 0 4em; -} - -.content-footer img { - width: 1em; -} - -body svg, -body script { - display: none; -} - -.p-author img { - height: 1em; - width: auto; -} - -.reactions dt { - display: none; -} - -.reactions ul { - list-style-type: none; - margin: 0; -} - -.h-feed h2, -.h-entry.singular .e-content h2 { - border-bottom: 2px solid #999; -} - -.h-feed h3, -.h-entry.singular .e-content h3 { - border-bottom: 1px dotted #777; -} - -.h-feed > h1 { - display: none; -} - -.h-feed h3 { - font-size: 1.1em; -} - -.h-entry.singular h1 a { - color: #ccc; -} - -.pagination { - margin: 2em 0 0 0; - font-size: 1.4em; -} - -.pagination ul { - list-style-type: none; - text-align: center; -} - -.pagination li { - display: inline-block; - padding: 0.3em 0.6em; -} - -.pagination .current { - color: #999; -} - -.follow { - display: block; - text-align: right; -} - -.donation ul { - list-style-type: none; - margin: 0; -} - -.donation li { - padding: 0.3em; -} - -.donation li a { - color: #999; - border-bottom: 3px solid #933 !important; -} - -.donation li a:hover { - color: #fff; - border-bottom: 3px solid #c66 !important; -} - -.webring { - padding: 2em 0 0 0; - text-align: center; -}
D templates/style-light.css

@@ -1,115 +0,0 @@

-html, body { - color: #222; - background-color: #eee; -} - -a { - color: #3173b4; -} - -a:hover { - color: #115394; - border-bottom: 1px solid #115394; -} - -code, -pre { - color: darkgreen; - background-color: #eee; -} - -.codehilite .hll { background-color: #ffffcc } -.codehilite { background: #f8f8f8; } -.codehilite .c { color: #8f5902; font-style: italic } /* Comment */ -.codehilite .err { color: #a40000; border: 1px solid #ef2929 } /* Error */ -.codehilite .g { color: #000000 } /* Generic */ -.codehilite .k { color: #204a87; font-weight: bold } /* Keyword */ -.codehilite .l { color: #000000 } /* Literal */ -.codehilite .n { color: #000000 } /* Name */ -.codehilite .o { color: #ce5c00; font-weight: bold } /* Operator */ -.codehilite .x { color: #000000 } /* Other */ -.codehilite .p { color: #000000; font-weight: bold } /* Punctuation */ -.codehilite .ch { color: #8f5902; font-style: italic } /* Comment.Hashbang */ -.codehilite .cm { color: #8f5902; font-style: italic } /* Comment.Multiline */ -.codehilite .cp { color: #8f5902; font-style: italic } /* Comment.Preproc */ -.codehilite .cpf { color: #8f5902; font-style: italic } /* Comment.PreprocFile */ -.codehilite .c1 { color: #8f5902; font-style: italic } /* Comment.Single */ -.codehilite .cs { color: #8f5902; font-style: italic } /* Comment.Special */ -.codehilite .gd { color: #a40000 } /* Generic.Deleted */ -.codehilite .ge { color: #000000; font-style: italic } /* Generic.Emph */ -.codehilite .gr { color: #ef2929 } /* Generic.Error */ -.codehilite .gh { color: #000080; font-weight: bold } /* Generic.Heading */ -.codehilite .gi { color: #00A000 } /* Generic.Inserted */ -.codehilite .go { color: #000000; font-style: italic } /* Generic.Output */ -.codehilite .gp { color: #8f5902 } /* Generic.Prompt */ -.codehilite .gs { color: #000000; font-weight: bold } /* Generic.Strong */ -.codehilite .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ -.codehilite .gt { color: #a40000; font-weight: bold } /* Generic.Traceback */ -.codehilite .kc { color: #204a87; font-weight: bold } /* Keyword.Constant */ -.codehilite .kd { color: #204a87; font-weight: bold } /* Keyword.Declaration */ -.codehilite .kn { color: #204a87; font-weight: bold } /* Keyword.Namespace */ -.codehilite .kp { color: #204a87; font-weight: bold } /* Keyword.Pseudo */ -.codehilite .kr { color: #204a87; font-weight: bold } /* Keyword.Reserved */ -.codehilite .kt { color: #204a87; font-weight: bold } /* Keyword.Type */ -.codehilite .ld { color: #000000 } /* Literal.Date */ -.codehilite .m { color: #0000cf; font-weight: bold } /* Literal.Number */ -.codehilite .s { color: #4e9a06 } /* Literal.String */ -.codehilite .na { color: #c4a000 } /* Name.Attribute */ -.codehilite .nb { color: #204a87 } /* Name.Builtin */ -.codehilite .nc { color: #000000 } /* Name.Class */ -.codehilite .no { color: #000000 } /* Name.Constant */ -.codehilite .nd { color: #5c35cc; font-weight: bold } /* Name.Decorator */ -.codehilite .ni { color: #ce5c00 } /* Name.Entity */ -.codehilite .ne { color: #cc0000; font-weight: bold } /* Name.Exception */ -.codehilite .nf { color: #000000 } /* Name.Function */ -.codehilite .nl { color: #f57900 } /* Name.Label */ -.codehilite .nn { color: #000000 } /* Name.Namespace */ -.codehilite .nx { color: #000000 } /* Name.Other */ -.codehilite .py { color: #000000 } /* Name.Property */ -.codehilite .nt { color: #204a87; font-weight: bold } /* Name.Tag */ -.codehilite .nv { color: #000000 } /* Name.Variable */ -.codehilite .ow { color: #204a87; font-weight: bold } /* Operator.Word */ -.codehilite .w { color: #f8f8f8; text-decoration: underline } /* Text.Whitespace */ -.codehilite .mb { color: #0000cf; font-weight: bold } /* Literal.Number.Bin */ -.codehilite .mf { color: #0000cf; font-weight: bold } /* Literal.Number.Float */ -.codehilite .mh { color: #0000cf; font-weight: bold } /* Literal.Number.Hex */ -.codehilite .mi { color: #0000cf; font-weight: bold } /* Literal.Number.Integer */ -.codehilite .mo { color: #0000cf; font-weight: bold } /* Literal.Number.Oct */ -.codehilite .sa { color: #4e9a06 } /* Literal.String.Affix */ -.codehilite .sb { color: #4e9a06 } /* Literal.String.Backtick */ -.codehilite .sc { color: #4e9a06 } /* Literal.String.Char */ -.codehilite .dl { color: #4e9a06 } /* Literal.String.Delimiter */ -.codehilite .sd { color: #8f5902; font-style: italic } /* Literal.String.Doc */ -.codehilite .s2 { color: #4e9a06 } /* Literal.String.Double */ -.codehilite .se { color: #4e9a06 } /* Literal.String.Escape */ -.codehilite .sh { color: #4e9a06 } /* Literal.String.Heredoc */ -.codehilite .si { color: #4e9a06 } /* Literal.String.Interpol */ -.codehilite .sx { color: #4e9a06 } /* Literal.String.Other */ -.codehilite .sr { color: #4e9a06 } /* Literal.String.Regex */ -.codehilite .s1 { color: #4e9a06 } /* Literal.String.Single */ -.codehilite .ss { color: #4e9a06 } /* Literal.String.Symbol */ -.codehilite .bp { color: #3465a4 } /* Name.Builtin.Pseudo */ -.codehilite .fm { color: #000000 } /* Name.Function.Magic */ -.codehilite .vc { color: #000000 } /* Name.Variable.Class */ -.codehilite .vg { color: #000000 } /* Name.Variable.Global */ -.codehilite .vi { color: #000000 } /* Name.Variable.Instance */ -.codehilite .vm { color: #000000 } /* Name.Variable.Magic */ -.codehilite .il { color: #0000cf; font-weight: bold } /* Literal.Number.Integer.Long */ - -.donation li a { - color: #333; - border-bottom: 3px solid #933 !important; -} - -.donation li a:hover { - color: #600; - border-bottom: 3px solid #600 !important; -} - -.h-entry.singular h1 a { - color: #111; -} - -.contrast svg { - transform: rotate(180deg); -}
M templates/style-print.csstemplates/style-print.css

@@ -1,26 +1,25 @@

* { - background-color: #fff !important; - color: #222; + background-color: #fff !important; + color: #222; } html, body { - font-size: 11pt !important; - text-shadow: unset !important; - font-family: Helvetica, sans-serif !important; + font-size: 11pt !important; + font-family: Helvetica, sans-serif !important; } @page { - margin: 0.6in 0.5in; + margin: 0.6in 0.5in; } .limit, -.content-body { - max-width: 100% !important; - margin: 0 !important; +body > section { + max-width: 100% !important; + margin: 0 !important; } h1, h2, h3, h4, h5, h6 { - page-break-after: avoid; + page-break-after: avoid; } h3,

@@ -29,145 +28,55 @@ .footnotes ol li a,

.h-feed .h-entry, code, pre { - border: none; + border: none; } p, li, blockquote, figure, .footnotes { - page-break-inside: avoid !important; + page-break-inside: avoid !important; } a { - color: #000; + color: #000; } td, th { - border: 1pt solid #666; + border: 1pt solid #666; +} + +.footnote ol li a { + display: block; + overflow: visible; + white-space: normal; } -.content-note, -.content-header, -.content-footer, +body > header, +body > footer, video, audio, -.footnotes ol li a[href^="#"], -.footnotes ol li a[href^="#"]:after, -.exif svg, +.footnote-backref, .donation, .noprint { - display:none; -} - -.footnotes ol li a { - display: block; - overflow: visible; - white-space: normal; + display:none !important; } code, pre { max-width: 96%; - color: #222; - word-break: break-all; - word-wrap: break-word; - white-space: pre-wrap; - overflow:initial; page-break-inside: enabled; font-family: "Courier", "Courier New", monospace !important; } pre { - border: 1pt dotted #666; - padding: 0.6em; -} - -.codehilite .hll { background-color: #ffffcc } -.codehilite { background: #f8f8f8; } -.codehilite .c { color: #8f5902; font-style: italic } -.codehilite .err { color: #a40000; border: 1px solid #ef2929 } -.codehilite .g { color: #000000 } -.codehilite .k { color: #204a87; font-weight: bold } -.codehilite .l { color: #000000 } -.codehilite .n { color: #000000 } -.codehilite .o { color: #ce5c00; font-weight: bold } -.codehilite .x { color: #000000 } -.codehilite .p { color: #000000; font-weight: bold } -.codehilite .ch { color: #8f5902; font-style: italic } -.codehilite .cm { color: #8f5902; font-style: italic } -.codehilite .cp { color: #8f5902; font-style: italic } -.codehilite .cpf { color: #8f5902; font-style: italic } -.codehilite .c1 { color: #8f5902; font-style: italic } -.codehilite .cs { color: #8f5902; font-style: italic } -.codehilite .gd { color: #a40000 } -.codehilite .ge { color: #000000; font-style: italic } -.codehilite .gr { color: #ef2929 } -.codehilite .gh { color: #000080; font-weight: bold } -.codehilite .gi { color: #00A000 } -.codehilite .go { color: #000000; font-style: italic } -.codehilite .gp { color: #8f5902 } -.codehilite .gs { color: #000000; font-weight: bold } -.codehilite .gu { color: #800080; font-weight: bold } -.codehilite .gt { color: #a40000; font-weight: bold } -.codehilite .kc { color: #204a87; font-weight: bold } -.codehilite .kd { color: #204a87; font-weight: bold } -.codehilite .kn { color: #204a87; font-weight: bold } -.codehilite .kp { color: #204a87; font-weight: bold } -.codehilite .kr { color: #204a87; font-weight: bold } -.codehilite .kt { color: #204a87; font-weight: bold } -.codehilite .ld { color: #000000 } -.codehilite .m { color: #0000cf; font-weight: bold } -.codehilite .s { color: #4e9a06 } -.codehilite .na { color: #c4a000 } -.codehilite .nb { color: #204a87 } -.codehilite .nc { color: #000000 } -.codehilite .no { color: #000000 } -.codehilite .nd { color: #5c35cc; font-weight: bold } -.codehilite .ni { color: #ce5c00 } -.codehilite .ne { color: #cc0000; font-weight: bold } -.codehilite .nf { color: #000000 } -.codehilite .nl { color: #f57900 } -.codehilite .nn { color: #000000 } -.codehilite .nx { color: #000000 } -.codehilite .py { color: #000000 } -.codehilite .nt { color: #204a87; font-weight: bold } -.codehilite .nv { color: #000000 } -.codehilite .ow { color: #204a87; font-weight: bold } -.codehilite .w { color: #f8f8f8; text-decoration: underline } -.codehilite .mb { color: #0000cf; font-weight: bold } -.codehilite .mf { color: #0000cf; font-weight: bold } -.codehilite .mh { color: #0000cf; font-weight: bold } -.codehilite .mi { color: #0000cf; font-weight: bold } -.codehilite .mo { color: #0000cf; font-weight: bold } -.codehilite .sa { color: #4e9a06 } -.codehilite .sb { color: #4e9a06 } -.codehilite .sc { color: #4e9a06 } -.codehilite .dl { color: #4e9a06 } -.codehilite .sd { color: #8f5902; font-style: italic } -.codehilite .s2 { color: #4e9a06 } -.codehilite .se { color: #4e9a06 } -.codehilite .sh { color: #4e9a06 } -.codehilite .si { color: #4e9a06 } -.codehilite .sx { color: #4e9a06 } -.codehilite .sr { color: #4e9a06 } -.codehilite .s1 { color: #4e9a06 } -.codehilite .ss { color: #4e9a06 } -.codehilite .bp { color: #3465a4 } -.codehilite .fm { color: #000000 } -.codehilite .vc { color: #000000 } -.codehilite .vg { color: #000000 } -.codehilite .vi { color: #000000 } -.codehilite .vm { color: #000000 } -.codehilite .il { color: #0000cf; font-weight: bold } - -figcaption { - font-size: 0.9em; + border: 1pt dotted #666; + padding: 0.6em; } .adaptimg { - max-height: 35vh; - max-width: 90vw; - outline: none; - border: 1px solid #000; + max-height: 35vh; + max-width: 90vw; + outline: none; + border: 1px solid #000; } .h-feed .h-entry { - page-break-after:always; + page-break-after:always; }
A templates/style.css

@@ -0,0 +1,337 @@

+* { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + transition: all 0.2s; +} + +html { + background-color: #111; + color: #bbb; +} + +body { + margin: 0; + padding: 0; + font-family: "Liberation Sans", sans-serif; + color: #ccc; + background-color: #222; + font-size: 110%; + line-height: 1.3em; +} + +svg { + transform: rotate(0deg); + width: 16px; + height: 16px; + fill: currentColor; + vertical-align: text-top; +} + +a { + color: #5193D4; + text-decoration: none; +} + +a:hover { + color: #fff; +} + +h1 { + font-size: 1.6em; +} + +h2, h3 { + margin-top: 2em; +} + +hr { + border: none; + border-top: 1px solid #777; + margin: 1em 0; + clear:both; +} + +blockquote { + border-left: 3px solid #999; + margin: 2em 0 2em 1em; + padding: 0 0 0 1em; + color: #aaa; +} + +dt { + font-weight: bold; + margin: 1em 0 0.6em 0; +} + +dd img { + width: 1em; + height: auto; +} + +figure { + margin: 2em 0; +} + +figure > a { + border: none; +} + +figcaption { + padding: 0.3em 0; + text-align: center; +} + +figure img { + display: block; + max-height: 98vh; + max-width: 100%; + width:auto; + height:auto; + margin: 0 auto; + border: 1px solid #000; +} + +figcaption dt { + display: none; +} + +figcaption dd { + font-size: 0.8em; + display: inline-block; + margin:0.3em 0.3em; +} + +ul { + padding-left: 1.3em; +} + +li { + padding: 0.1em 0; +} + +li p { + margin: 0; +} + +input { + border: none; + border-bottom: 3px solid #ccc; + color: #ccc; + background-color: transparent; +} + +label { + display: none; +} + +nav ul { + list-style-type: none; + margin: 0; + padding: 0; +} + +nav li { + display: inline-block; + padding: 0 0.6em 0 0; +} + +code, pre, q, figcaption { + font-family: "Courier New", "Courier", monospace; + font-size: 0.8em; +} + +code, pre { + color: limegreen; + border: 1px solid #666; + direction: ltr; + word-break: break-all; + word-wrap: break-word; + white-space: pre-wrap; + overflow:initial; +} + +pre { + padding: 0.6em; +} + +code { + padding: 0.1em 0.2em; +} + +pre > code { + border: none; +} + +table { + border-collapse: collapse; + border-spacing: 0; + width: 100%; +} + +td, +th { + padding: 0.3em; + border: 1px solid #777; + text-align:left; +} + +th { + font-weight: bold; + background-color: rgba(0, 0, 0, .1); +} + +tr:nth-child(odd) { + +} + +tr:nth-child(even) { + background-color: rgba(0, 0, 0, .1); +} + +body > header, +body > footer { + text-align: center; + padding: 0.6em 0.3em; + background-color: #111; +} + +body > header form { + padding: 0.2em 0 0 0; +} + +body > header { + padding-right: 3em; +} + +body > svg, +body > script { + display: none; +} + +body > header nav { + margin: 0.3em 0; +} + +body > header nav li a { + font-weight: bold; + color: #ccc; + border-bottom: 3px solid transparent; + text-decoration: none; + padding-bottom: 0.3em; +} + +body > header a:hover, +body > header a.active, +input:active, +input:hover { + border-bottom: 3px solid #fefefe; + color: #fefefe; +} + +body > header a svg { + display: block; + margin: 0.1em auto; +} + +.limit, +body > section { + max-width: 86ch; + margin: 0 auto; + padding: 0.6em; +} + +body > nav { + margin: 2em 0 1em 0; + font-size: 1.4em; +} + +body > nav ul { + text-align: center; +} + +body > nav li { + margin: 0.3em 0.6em; +} + +body > nav .current { + color: #999; +} + +body > footer { + text-align: left; + color: #ccc; +} + +body > footer img { + width: 1em; +} + +body > footer h2 { + display: none; +} + +body > footer dt { + font-weight: bold; + margin: 1em 0 0 0; +} + +body > footer dd { + margin: -1.3em 0 0 4em; +} + +body > footer nav { + display: flex; + justify-content: space-between; +} + +.webring { + text-align: center; +} + +.footnote a { + display: inline-block; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + vertical-align: top; + max-width: 80%; +} + +.footnote-ref { + margin: 0 0 0 0.1em; +} + +.contrast, +.follow { + position: fixed; + right: 1em; +} + +.contrast { + top: 0.1em; +} + +.follow { + top: 3em; +} + +.h-feed h1 { + display: none; +} + +@media all and (min-width: 56em) { + body > header { + text-align: unset; + display: flex; + justify-content: space-between; + } + + body > header li svg { + display: inline-block; + } + + body > header form { + margin: 0; + } +}