diff --git a/docs/bundle-cb386d8a57de7c1c1c53.js b/docs/bundle-a53e02f327a2d1add33a.js similarity index 73% rename from docs/bundle-cb386d8a57de7c1c1c53.js rename to docs/bundle-a53e02f327a2d1add33a.js index df959c5..f21787a 100644 --- a/docs/bundle-cb386d8a57de7c1c1c53.js +++ b/docs/bundle-a53e02f327a2d1add33a.js @@ -1 +1 @@ -!function(e){var n={};function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)t.d(r,o,function(n){return e[n]}.bind(null,o));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s=99)}([function(e,n,t){"use strict";function r(e){return"(?:"+e+")"}function o(e,n){return r(n)+"{"+e+",}"}function i(){for(var e=[],n=0;n=this.lines.length},e.prototype.remaining=function(){return this.lines.slice(this._countLinesConsumed)},e.prototype.advance=function(e){this._countLinesConsumed+=e},e.prototype.consumeLineIfMatches=function(e,n){if(this.done())return null;var t=this.nextRemainingLine(),r=e.exec(t);if(r){var o={line:t,captures:r.slice(1)};if(!n||n.andIf(o))return this.advance(1),o}return null},e.prototype.consumeLine=function(){if(this.done())throw new Error("No remaining lines");var e=this.nextRemainingLine();return this.advance(1),e},e.prototype.nextRemainingLine=function(){return this.lines[this._countLinesConsumed]},e}();n.LineConsumer=r},function(e,n,t){"use strict";var r,o=this&&this.__extends||(r=function(e,n){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t])})(e,n)},function(e,n){function t(){this.constructor=e}r(e,n),e.prototype=null===n?Object.create(n):(t.prototype=n.prototype,new t)});Object.defineProperty(n,"__esModule",{value:!0}),n.RichInlineSyntaxNode=void 0;var i=t(37),a=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return o(n,e),n.prototype.textAppearingInline=function(){return i.getTextAppearingInline(this.children)},n}(t(6).InlineSyntaxNodeContainer);n.RichInlineSyntaxNode=a},function(e,n,t){"use strict";var r=this&&this.__spreadArrays||function(){for(var e=0,n=0,t=arguments.length;n=15&&(d=!1,l=!0);var w=y&&(c||d&&(null==T||T<12.11)),C=t||a&&s>=9;function x(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var S,L=function(e,n){var t=e.className,r=x(n).exec(t);if(r){var o=t.slice(r.index+r[0].length);e.className=t.slice(0,r.index)+(o?r[1]+o:"")}};function O(e){for(var n=e.childNodes.length;n>0;--n)e.removeChild(e.firstChild);return e}function I(e,n){return O(e).appendChild(n)}function A(e,n,t,r){var o=document.createElement(e);if(t&&(o.className=t),r&&(o.style.cssText=r),"string"==typeof n)o.appendChild(document.createTextNode(n));else if(n)for(var i=0;i=n)return a+(n-i);a+=s-i,a+=t-a%t,i=s+1}}m?P=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:a&&(P=function(e){try{e.select()}catch(e){}});var D=function(){this.id=null};function F(e,n){for(var t=0;t=n)return r+Math.min(a,n-o);if(o+=i-r,r=i+1,(o+=t-o%t)>=n)return r}}var V=[""];function Y(e){for(;V.length<=e;)V.push(X(V)+" ");return V[e]}function X(e){return e[e.length-1]}function Q(e,n){for(var t=[],r=0;r"€"&&(e.toUpperCase()!=e.toLowerCase()||Z.test(e))}function ne(e,n){return n?!!(n.source.indexOf("\\w")>-1&&ee(e))||n.test(e):ee(e)}function te(e){for(var n in e)if(e.hasOwnProperty(n)&&e[n])return!1;return!0}var re=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function oe(e){return e.charCodeAt(0)>=768&&re.test(e)}function ie(e,n,t){for(;(t<0?n>0:nt?-1:1;;){if(n==t)return n;var o=(n+t)/2,i=r<0?Math.ceil(o):Math.floor(o);if(i==n)return e(i)?n:t;e(i)?t=i:n=i+r}}var se=null;function le(e,n,t){var r;se=null;for(var o=0;on)return o;i.to==n&&(i.from!=i.to&&"before"==t?r=o:se=o),i.from==n&&(i.from!=i.to&&"before"!=t?r=o:se=o)}return null!=r?r:se}var ce=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",n="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111",t=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,r=/[stwN]/,o=/[LRr]/,i=/[Lb1n]/,a=/[1n]/;function s(e,n,t){this.level=e,this.from=n,this.to=t}return function(l,c){var u="ltr"==c?"L":"R";if(0==l.length||"ltr"==c&&!t.test(l))return!1;for(var d,p=l.length,h=[],f=0;f-1&&(r[n]=o.slice(0,i).concat(o.slice(i+1)))}}}function me(e,n){var t=he(e,n);if(t.length)for(var r=Array.prototype.slice.call(arguments,2),o=0;o0}function be(e){e.prototype.on=function(e,n){pe(this,e,n)},e.prototype.off=function(e,n){fe(this,e,n)}}function ke(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Te(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function we(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function Ce(e){ke(e),Te(e)}function xe(e){return e.target||e.srcElement}function Se(e){var n=e.which;return null==n&&(1&e.button?n=1:2&e.button?n=3:4&e.button&&(n=2)),y&&e.ctrlKey&&1==n&&(n=3),n}var Le,Oe,Ie=function(){if(a&&s<9)return!1;var e=A("div");return"draggable"in e||"dragDrop"in e}();function Ae(e){if(null==Le){var n=A("span","​");I(e,A("span",[n,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(Le=n.offsetWidth<=1&&n.offsetHeight>2&&!(a&&s<8))}var t=Le?A("span","​"):A("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return t.setAttribute("cm-text",""),t}function Me(e){if(null!=Oe)return Oe;var n=I(e,document.createTextNode("AخA")),t=S(n,0,1).getBoundingClientRect(),r=S(n,1,2).getBoundingClientRect();return O(e),!(!t||t.left==t.right)&&(Oe=r.right-t.right<3)}var Ne,Ee=3!="\n\nb".split(/\n/).length?function(e){for(var n=0,t=[],r=e.length;n<=r;){var o=e.indexOf("\n",n);-1==o&&(o=e.length);var i=e.slice(n,"\r"==e.charAt(o-1)?o-1:o),a=i.indexOf("\r");-1!=a?(t.push(i.slice(0,a)),n+=a+1):(t.push(i),n=o+1)}return t}:function(e){return e.split(/\r\n?|\n/)},_e=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(e){return!1}}:function(e){var n;try{n=e.ownerDocument.selection.createRange()}catch(e){}return!(!n||n.parentElement()!=e)&&0!=n.compareEndPoints("StartToEnd",n)},Re="oncopy"in(Ne=A("div"))||(Ne.setAttribute("oncopy","return;"),"function"==typeof Ne.oncopy),Pe=null,Be={},He={};function We(e,n){arguments.length>2&&(n.dependencies=Array.prototype.slice.call(arguments,2)),Be[e]=n}function De(e){if("string"==typeof e&&He.hasOwnProperty(e))e=He[e];else if(e&&"string"==typeof e.name&&He.hasOwnProperty(e.name)){var n=He[e.name];"string"==typeof n&&(n={name:n}),(e=J(n,e)).name=n.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return De("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return De("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Fe(e,n){n=De(n);var t=Be[n.name];if(!t)return Fe(e,"text/plain");var r=t(e,n);if(Ue.hasOwnProperty(n.name)){var o=Ue[n.name];for(var i in o)o.hasOwnProperty(i)&&(r.hasOwnProperty(i)&&(r["_"+i]=r[i]),r[i]=o[i])}if(r.name=n.name,n.helperType&&(r.helperType=n.helperType),n.modeProps)for(var a in n.modeProps)r[a]=n.modeProps[a];return r}var Ue={};function je(e,n){H(n,Ue.hasOwnProperty(e)?Ue[e]:Ue[e]={})}function ze(e,n){if(!0===n)return n;if(e.copyState)return e.copyState(n);var t={};for(var r in n){var o=n[r];o instanceof Array&&(o=o.concat([])),t[r]=o}return t}function Ge(e,n){for(var t;e.innerMode&&(t=e.innerMode(n))&&t.mode!=e;)n=t.state,e=t.mode;return t||{mode:e,state:n}}function qe(e,n,t){return!e.startState||e.startState(n,t)}var Ke=function(e,n,t){this.pos=this.start=0,this.string=e,this.tabSize=n||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=t};function Ve(e,n){if((n-=e.first)<0||n>=e.size)throw new Error("There is no line "+(n+e.first)+" in the document.");for(var t=e;!t.lines;)for(var r=0;;++r){var o=t.children[r],i=o.chunkSize();if(n=e.first&&nt?nn(t,Ve(e,t).text.length):function(e,n){var t=e.ch;return null==t||t>n?nn(e.line,n):t<0?nn(e.line,0):e}(n,Ve(e,n.line).text.length)}function un(e,n){for(var t=[],r=0;r=this.string.length},Ke.prototype.sol=function(){return this.pos==this.lineStart},Ke.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Ke.prototype.next=function(){if(this.posn},Ke.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Ke.prototype.skipToEnd=function(){this.pos=this.string.length},Ke.prototype.skipTo=function(e){var n=this.string.indexOf(e,this.pos);if(n>-1)return this.pos=n,!0},Ke.prototype.backUp=function(e){this.pos-=e},Ke.prototype.column=function(){return this.lastColumnPos0?null:(r&&!1!==n&&(this.pos+=r[0].length),r)}var o=function(e){return t?e.toLowerCase():e};if(o(this.string.substr(this.pos,e.length))==o(e))return!1!==n&&(this.pos+=e.length),!0},Ke.prototype.current=function(){return this.string.slice(this.start,this.pos)},Ke.prototype.hideFirstChars=function(e,n){this.lineStart+=e;try{return n()}finally{this.lineStart-=e}},Ke.prototype.lookAhead=function(e){var n=this.lineOracle;return n&&n.lookAhead(e)},Ke.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var dn=function(e,n){this.state=e,this.lookAhead=n},pn=function(e,n,t,r){this.state=n,this.doc=e,this.line=t,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};function hn(e,n,t,r){var o=[e.state.modeGen],i={};wn(e,n.text,e.doc.mode,t,function(e,n){return o.push(e,n)},i,r);for(var a=t.state,s=function(r){t.baseTokens=o;var s=e.state.overlays[r],l=1,c=0;t.state=!0,wn(e,n.text,s.mode,t,function(e,n){for(var t=l;ce&&o.splice(l,1,e,o[l+1],r),l+=2,c=Math.min(e,r)}if(n)if(s.opaque)o.splice(t,l-t,e,"overlay "+n),l=t+2;else for(;te.options.maxHighlightLength&&ze(e.doc.mode,r.state),i=hn(e,n,r);o&&(r.state=o),n.stateAfter=r.save(!o),n.styles=i.styles,i.classes?n.styleClasses=i.classes:n.styleClasses&&(n.styleClasses=null),t===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return n.styles}function mn(e,n,t){var r=e.doc,o=e.display;if(!r.mode.startState)return new pn(r,!0,n);var i=function(e,n,t){for(var r,o,i=e.doc,a=t?-1:n-(e.doc.mode.innerMode?1e3:100),s=n;s>a;--s){if(s<=i.first)return i.first;var l=Ve(i,s-1),c=l.stateAfter;if(c&&(!t||s+(c instanceof dn?c.lookAhead:0)<=i.modeFrontier))return s;var u=W(l.text,null,e.options.tabSize);(null==o||r>u)&&(o=s-1,r=u)}return o}(e,n,t),a=i>r.first&&Ve(r,i-1).stateAfter,s=a?pn.fromSaved(r,a,i):new pn(r,qe(r.mode),i);return r.iter(i,n,function(t){gn(e,t.text,s);var r=s.line;t.stateAfter=r==n-1||r%5==0||r>=o.viewFrom&&rn.start)return i}throw new Error("Mode "+e.name+" failed to advance stream.")}pn.prototype.lookAhead=function(e){var n=this.doc.getLine(this.line+e);return null!=n&&e>this.maxLookAhead&&(this.maxLookAhead=e),n},pn.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var n=this.baseTokens[this.baseTokenPos+1];return{type:n&&n.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},pn.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},pn.fromSaved=function(e,n,t){return n instanceof dn?new pn(e,ze(e.mode,n.state),t,n.lookAhead):new pn(e,ze(e.mode,n),t)},pn.prototype.save=function(e){var n=!1!==e?ze(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new dn(n,this.maxLookAhead):n};var bn=function(e,n,t){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=n||null,this.state=t};function kn(e,n,t,r){var o,i,a=e.doc,s=a.mode,l=Ve(a,(n=cn(a,n)).line),c=mn(e,n.line,t),u=new Ke(l.text,e.options.tabSize,c);for(r&&(i=[]);(r||u.pose.options.maxHighlightLength?(s=!1,a&&gn(e,n,r,d.pos),d.pos=n.length,l=null):l=Tn(yn(t,d,r.state,p),i),p){var h=p[0].name;h&&(l="m-"+(l?h+" "+l:h))}if(!s||u!=l){for(;c=n:i.to>n);(r||(r=[])).push(new Sn(a,i.from,s?null:i.to))}}return r}(t,o,a),l=function(e,n,t){var r;if(e)for(var o=0;o=n:i.to>n)||i.from==n&&"bookmark"==a.type&&(!t||i.marker.insertLeft)){var s=null==i.from||(a.inclusiveLeft?i.from<=n:i.from0&&s)for(var b=0;bn)&&(!t||Rn(t,i.marker)<0)&&(t=i.marker)}return t}function Dn(e,n,t,r,o){var i=Ve(e,n),a=xn&&i.markedSpans;if(a)for(var s=0;s=0&&d<=0||u<=0&&d>=0)&&(u<=0&&(l.marker.inclusiveRight&&o.inclusiveLeft?tn(c.to,t)>=0:tn(c.to,t)>0)||u>=0&&(l.marker.inclusiveRight&&o.inclusiveLeft?tn(c.from,r)<=0:tn(c.from,r)<0)))return!0}}}function Fn(e){for(var n;n=Bn(e);)e=n.find(-1,!0).line;return e}function Un(e,n){var t=Ve(e,n),r=Fn(t);return t==r?n:$e(r)}function jn(e,n){if(n>e.lastLine())return n;var t,r=Ve(e,n);if(!zn(e,r))return n;for(;t=Hn(r);)r=t.find(1,!0).line;return $e(r)+1}function zn(e,n){var t=xn&&n.markedSpans;if(t)for(var r=void 0,o=0;on.maxLineLength&&(n.maxLineLength=t,n.maxLine=e)})}var Yn=function(e,n,t){this.text=e,Nn(this,n),this.height=t?t(this):1};function Xn(e){e.parent=null,Mn(e)}Yn.prototype.lineNo=function(){return $e(this)},be(Yn);var Qn={},$n={};function Jn(e,n){if(!e||/^\s*$/.test(e))return null;var t=n.addModeClass?$n:Qn;return t[e]||(t[e]=e.replace(/\S+/g,"cm-$&"))}function Zn(e,n){var t=M("span",null,null,l?"padding-right: .1px":null),r={pre:M("pre",[t],"CodeMirror-line"),content:t,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};n.measure={};for(var o=0;o<=(n.rest?n.rest.length:0);o++){var i=o?n.rest[o-1]:n.line,a=void 0;r.pos=0,r.addToken=nt,Me(e.display.measure)&&(a=ue(i,e.doc.direction))&&(r.addToken=tt(r.addToken,a)),r.map=[],ot(i,r,fn(e,i,n!=e.display.externalMeasured&&$e(i))),i.styleClasses&&(i.styleClasses.bgClass&&(r.bgClass=R(i.styleClasses.bgClass,r.bgClass||"")),i.styleClasses.textClass&&(r.textClass=R(i.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(Ae(e.display.measure))),0==o?(n.measure.map=r.map,n.measure.cache={}):((n.measure.maps||(n.measure.maps=[])).push(r.map),(n.measure.caches||(n.measure.caches=[])).push({}))}if(l){var s=r.content.lastChild;(/\bcm-tab\b/.test(s.className)||s.querySelector&&s.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return me(e,"renderLine",e,n.line,r.pre),r.pre.className&&(r.textClass=R(r.pre.className,r.textClass||"")),r}function et(e){var n=A("span","•","cm-invalidchar");return n.title="\\u"+e.charCodeAt(0).toString(16),n.setAttribute("aria-label",n.title),n}function nt(e,n,t,r,o,i,l){if(n){var c,u=e.splitSpaces?function(e,n){if(e.length>1&&!/ /.test(e))return e;for(var t=n,r="",o=0;oc&&d.from<=c);p++);if(d.to>=u)return e(t,r,o,i,a,s,l);e(t,r.slice(0,d.to-c),o,i,null,s,l),i=null,r=r.slice(d.to-c),c=d.to}}}function rt(e,n,t,r){var o=!r&&t.widgetNode;o&&e.map.push(e.pos,e.pos+n,o),!r&&e.cm.display.input.needsContentAttribute&&(o||(o=e.content.appendChild(document.createElement("span"))),o.setAttribute("cm-marker",t.id)),o&&(e.cm.display.input.setUneditable(o),e.content.appendChild(o)),e.pos+=n,e.trailingSpace=!1}function ot(e,n,t){var r=e.markedSpans,o=e.text,i=0;if(r)for(var a,s,l,c,u,d,p,h=o.length,f=0,m=1,g="",v=0;;){if(v==f){l=c=u=s="",p=null,d=null,v=1/0;for(var y=[],b=void 0,k=0;kf||w.collapsed&&T.to==f&&T.from==f)){if(null!=T.to&&T.to!=f&&v>T.to&&(v=T.to,c=""),w.className&&(l+=" "+w.className),w.css&&(s=(s?s+";":"")+w.css),w.startStyle&&T.from==f&&(u+=" "+w.startStyle),w.endStyle&&T.to==v&&(b||(b=[])).push(w.endStyle,T.to),w.title&&((p||(p={})).title=w.title),w.attributes)for(var C in w.attributes)(p||(p={}))[C]=w.attributes[C];w.collapsed&&(!d||Rn(d.marker,w)<0)&&(d=T)}else T.from>f&&v>T.from&&(v=T.from)}if(b)for(var x=0;x=h)break;for(var L=Math.min(h,v);;){if(g){var O=f+g.length;if(!d){var I=O>L?g.slice(0,L-f):g;n.addToken(n,I,a?a+l:l,u,f+I.length==v?c:"",s,p)}if(O>=L){g=g.slice(L-f),f=L;break}f=O,u=""}g=o.slice(i,i=t[m++]),a=Jn(t[m++],n.cm.options)}}else for(var A=1;At)return{map:e.measure.maps[o],cache:e.measure.caches[o],before:!0}}function Nt(e,n,t,r){return Rt(e,_t(e,n),t,r)}function Et(e,n){if(n>=e.display.viewFrom&&n=t.lineN&&n2&&i.push((l.bottom+c.top)/2-t.top)}}i.push(t.bottom-t.top)}}(e,n.view,n.rect),n.hasHeights=!0),(i=function(e,n,t,r){var o,i=Ht(n.map,t,r),l=i.node,c=i.start,u=i.end,d=i.collapse;if(3==l.nodeType){for(var p=0;p<4;p++){for(;c&&oe(n.line.text.charAt(i.coverStart+c));)--c;for(;i.coverStart+u1}(e))return n;var t=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:n.left*t,right:n.right*t,top:n.top*r,bottom:n.bottom*r}}(e.display.measure,o))}else{var h;c>0&&(d=r="right"),o=e.options.lineWrapping&&(h=l.getClientRects()).length>1?h["right"==r?h.length-1:0]:l.getBoundingClientRect()}if(a&&s<9&&!c&&(!o||!o.left&&!o.right)){var f=l.parentNode.getClientRects()[0];o=f?{left:f.left,right:f.left+ir(e.display),top:f.top,bottom:f.bottom}:Bt}for(var m=o.top-n.rect.top,g=o.bottom-n.rect.top,v=(m+g)/2,y=n.view.measure.heights,b=0;bn)&&(o=(i=l-s)-1,n>=l&&(a="right")),null!=o){if(r=e[c+2],s==l&&t==(r.insertLeft?"left":"right")&&(a=t),"left"==t&&0==o)for(;c&&e[c-2]==e[c-3]&&e[c-1].insertLeft;)r=e[2+(c-=3)],a="left";if("right"==t&&o==l-s)for(;c=0&&(t=e[o]).left==t.right;o--);return t}function Dt(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var n=0;n=r.text.length?(l=r.text.length,c="before"):l<=0&&(l=0,c="after"),!s)return a("before"==c?l-1:l,"before"==c);function u(e,n,t){return a(t?e-1:e,1==s[n].level!=t)}var d=le(s,l,c),p=se,h=u(l,d,"before"==c);return null!=p&&(h.other=u(l,p,"before"!=c)),h}function Xt(e,n){var t=0;n=cn(e.doc,n),e.options.lineWrapping||(t=ir(e.display)*n.ch);var r=Ve(e.doc,n.line),o=qn(r)+xt(e.display);return{left:t,right:t,top:o,bottom:o+r.height}}function Qt(e,n,t,r,o){var i=nn(e,n,t);return i.xRel=o,r&&(i.outside=r),i}function $t(e,n,t){var r=e.doc;if((t+=e.display.viewOffset)<0)return Qt(r.first,0,null,-1,-1);var o=Je(r,t),i=r.first+r.size-1;if(o>i)return Qt(r.first+r.size-1,Ve(r,i).text.length,null,1,1);n<0&&(n=0);for(var a=Ve(r,o);;){var s=nr(e,a,o,n,t),l=Wn(a,s.ch+(s.xRel>0||s.outside>0?1:0));if(!l)return s;var c=l.find(1);if(c.line==o)return c;a=Ve(r,o=c.line)}}function Jt(e,n,t,r){r-=Gt(n);var o=n.text.length,i=ae(function(n){return Rt(e,t,n-1).bottom<=r},o,0);return{begin:i,end:o=ae(function(n){return Rt(e,t,n).top>r},i,o)}}function Zt(e,n,t,r){return t||(t=_t(e,n)),Jt(e,n,t,qt(e,n,Rt(e,t,r),"line").top)}function er(e,n,t,r){return!(e.bottom<=t)&&(e.top>t||(r?e.left:e.right)>n)}function nr(e,n,t,r,o){o-=qn(n);var i=_t(e,n),a=Gt(n),s=0,l=n.text.length,c=!0,u=ue(n,e.doc.direction);if(u){var d=(e.options.lineWrapping?rr:tr)(e,n,t,i,u,r,o);s=(c=1!=d.level)?d.from:d.to-1,l=c?d.to:d.from-1}var p,h,f=null,m=null,g=ae(function(n){var t=Rt(e,i,n);return t.top+=a,t.bottom+=a,!!er(t,r,o,!1)&&(t.top<=o&&t.left<=r&&(f=n,m=t),!0)},s,l),v=!1;if(m){var y=r-m.left=k.bottom?1:0}return Qt(t,g=ie(n.text,g,1),h,v,r-p)}function tr(e,n,t,r,o,i,a){var s=ae(function(s){var l=o[s],c=1!=l.level;return er(Yt(e,nn(t,c?l.to:l.from,c?"before":"after"),"line",n,r),i,a,!0)},0,o.length-1),l=o[s];if(s>0){var c=1!=l.level,u=Yt(e,nn(t,c?l.from:l.to,c?"after":"before"),"line",n,r);er(u,i,a,!0)&&u.top>a&&(l=o[s-1])}return l}function rr(e,n,t,r,o,i,a){var s=Jt(e,n,r,a),l=s.begin,c=s.end;/\s/.test(n.text.charAt(c-1))&&c--;for(var u=null,d=null,p=0;p=c||h.to<=l)){var f=Rt(e,r,1!=h.level?Math.min(c,h.to)-1:Math.max(l,h.from)).right,m=fm)&&(u=h,d=m)}}return u||(u=o[o.length-1]),u.fromc&&(u={from:u.from,to:c,level:u.level}),u}function or(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==Pt){Pt=A("pre",null,"CodeMirror-line-like");for(var n=0;n<49;++n)Pt.appendChild(document.createTextNode("x")),Pt.appendChild(A("br"));Pt.appendChild(document.createTextNode("x"))}I(e.measure,Pt);var t=Pt.offsetHeight/50;return t>3&&(e.cachedTextHeight=t),O(e.measure),t||1}function ir(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var n=A("span","xxxxxxxxxx"),t=A("pre",[n],"CodeMirror-line-like");I(e.measure,t);var r=n.getBoundingClientRect(),o=(r.right-r.left)/10;return o>2&&(e.cachedCharWidth=o),o||10}function ar(e){for(var n=e.display,t={},r={},o=n.gutters.clientLeft,i=n.gutters.firstChild,a=0;i;i=i.nextSibling,++a){var s=e.display.gutterSpecs[a].className;t[s]=i.offsetLeft+i.clientLeft+o,r[s]=i.clientWidth}return{fixedPos:sr(n),gutterTotalWidth:n.gutters.offsetWidth,gutterLeft:t,gutterWidth:r,wrapperWidth:n.wrapper.clientWidth}}function sr(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function lr(e){var n=or(e.display),t=e.options.lineWrapping,r=t&&Math.max(5,e.display.scroller.clientWidth/ir(e.display)-3);return function(o){if(zn(e.doc,o))return 0;var i=0;if(o.widgets)for(var a=0;a=e.display.viewTo)return null;if((n-=e.display.viewFrom)<0)return null;for(var t=e.display.view,r=0;rn)&&(o.updateLineNumbers=n),e.curOp.viewChanged=!0,n>=o.viewTo)xn&&Un(e.doc,n)o.viewFrom?fr(e):(o.viewFrom+=r,o.viewTo+=r);else if(n<=o.viewFrom&&t>=o.viewTo)fr(e);else if(n<=o.viewFrom){var i=mr(e,t,t+r,1);i?(o.view=o.view.slice(i.index),o.viewFrom=i.lineN,o.viewTo+=r):fr(e)}else if(t>=o.viewTo){var a=mr(e,n,n,-1);a?(o.view=o.view.slice(0,a.index),o.viewTo=a.lineN):fr(e)}else{var s=mr(e,n,n,-1),l=mr(e,t,t+r,1);s&&l?(o.view=o.view.slice(0,s.index).concat(at(e,s.lineN,l.lineN)).concat(o.view.slice(l.index)),o.viewTo+=r):fr(e)}var c=o.externalMeasured;c&&(t=o.lineN&&n=r.viewTo)){var i=r.view[dr(e,n)];if(null!=i.node){var a=i.changes||(i.changes=[]);-1==F(a,t)&&a.push(t)}}}function fr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function mr(e,n,t,r){var o,i=dr(e,n),a=e.display.view;if(!xn||t==e.doc.first+e.doc.size)return{index:i,lineN:t};for(var s=e.display.viewFrom,l=0;l0){if(i==a.length-1)return null;o=s+a[i].size-n,i++}else o=s-n;n+=o,t+=o}for(;Un(e.doc,t)!=t;){if(i==(r<0?0:a.length-1))return null;t+=r*a[i-(r<0?1:0)].size,i+=r}return{index:i,lineN:t}}function gr(e){for(var n=e.display.view,t=0,r=0;r=e.display.viewTo||s.to().linen||n==t&&a.to==n)&&(r(Math.max(a.from,n),Math.min(a.to,t),1==a.level?"rtl":"ltr",i),o=!0)}o||r(n,t,"ltr")}(m,t||0,null==r?p:r,function(e,n,o,d){var g="ltr"==o,v=h(e,g?"left":"right"),y=h(n-1,g?"right":"left"),b=null==t&&0==e,k=null==r&&n==p,T=0==d,w=!m||d==m.length-1;if(y.top-v.top<=3){var C=(c?k:b)&&w,x=(c?b:k)&&T?s:(g?v:y).left,S=C?l:(g?y:v).right;u(x,v.top,S-x,v.bottom)}else{var L,O,I,A;g?(L=c&&b&&T?s:v.left,O=c?l:f(e,o,"before"),I=c?s:f(n,o,"after"),A=c&&k&&w?l:y.right):(L=c?f(e,o,"before"):s,O=!c&&b&&T?l:v.right,I=!c&&k&&w?s:y.left,A=c?f(n,o,"after"):l),u(L,v.top,O-L,v.bottom),v.bottom0?n.blinker=setInterval(function(){return n.cursorDiv.style.visibility=(t=!t)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(n.cursorDiv.style.visibility="hidden")}}function Cr(e){e.state.focused||(e.display.input.focus(),Sr(e))}function xr(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,Lr(e))},100)}function Sr(e,n){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(me(e,"focus",e,n),e.state.focused=!0,_(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),l&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),wr(e))}function Lr(e,n){e.state.delayingBlurEvent||(e.state.focused&&(me(e,"blur",e,n),e.state.focused=!1,L(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function Or(e){for(var n=e.display,t=n.lineDiv.offsetTop,r=0;r.005||p<-.005)&&(Qe(o.line,l),Ir(o.line),o.rest))for(var h=0;he.display.sizerWidth){var f=Math.ceil(c/ir(e.display));f>e.display.maxLineLength&&(e.display.maxLineLength=f,e.display.maxLine=o.line,e.display.maxLineChanged=!0)}}}}function Ir(e){if(e.widgets)for(var n=0;n=a&&(i=Je(n,qn(Ve(n,l))-e.wrapper.clientHeight),a=l)}return{from:i,to:Math.max(a,i+1)}}function Mr(e,n){var t=e.display,r=or(e.display);n.top<0&&(n.top=0);var o=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:t.scroller.scrollTop,i=At(e),a={};n.bottom-n.top>i&&(n.bottom=n.top+i);var s=e.doc.height+St(t),l=n.tops-r;if(n.topo+i){var u=Math.min(n.top,(c?s:n.bottom)-i);u!=o&&(a.scrollTop=u)}var d=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:t.scroller.scrollLeft,p=It(e)-(e.options.fixedGutter?t.gutters.offsetWidth:0),h=n.right-n.left>p;return h&&(n.right=n.left+p),n.left<10?a.scrollLeft=0:n.leftp+d-3&&(a.scrollLeft=n.right+(h?0:10)-p),a}function Nr(e,n){null!=n&&(Rr(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+n)}function Er(e){Rr(e);var n=e.getCursor();e.curOp.scrollToPos={from:n,to:n,margin:e.options.cursorScrollMargin}}function _r(e,n,t){null==n&&null==t||Rr(e),null!=n&&(e.curOp.scrollLeft=n),null!=t&&(e.curOp.scrollTop=t)}function Rr(e){var n=e.curOp.scrollToPos;n&&(e.curOp.scrollToPos=null,Pr(e,Xt(e,n.from),Xt(e,n.to),n.margin))}function Pr(e,n,t,r){var o=Mr(e,{left:Math.min(n.left,t.left),top:Math.min(n.top,t.top)-r,right:Math.max(n.right,t.right),bottom:Math.max(n.bottom,t.bottom)+r});_r(e,o.scrollLeft,o.scrollTop)}function Br(e,n){Math.abs(e.doc.scrollTop-n)<2||(t||lo(e,{top:n}),Hr(e,n,!0),t&&lo(e),ro(e,100))}function Hr(e,n,t){n=Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,n),(e.display.scroller.scrollTop!=n||t)&&(e.doc.scrollTop=n,e.display.scrollbars.setScrollTop(n),e.display.scroller.scrollTop!=n&&(e.display.scroller.scrollTop=n))}function Wr(e,n,t,r){n=Math.min(n,e.display.scroller.scrollWidth-e.display.scroller.clientWidth),(t?n==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-n)<2)&&!r||(e.doc.scrollLeft=n,po(e),e.display.scroller.scrollLeft!=n&&(e.display.scroller.scrollLeft=n),e.display.scrollbars.setScrollLeft(n))}function Dr(e){var n=e.display,t=n.gutters.offsetWidth,r=Math.round(e.doc.height+St(e.display));return{clientHeight:n.scroller.clientHeight,viewHeight:n.wrapper.clientHeight,scrollWidth:n.scroller.scrollWidth,clientWidth:n.scroller.clientWidth,viewWidth:n.wrapper.clientWidth,barLeft:e.options.fixedGutter?t:0,docHeight:r,scrollHeight:r+Ot(e)+n.barHeight,nativeBarWidth:n.nativeBarWidth,gutterWidth:t}}var Fr=function(e,n,t){this.cm=t;var r=this.vert=A("div",[A("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),o=this.horiz=A("div",[A("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=o.tabIndex=-1,e(r),e(o),pe(r,"scroll",function(){r.clientHeight&&n(r.scrollTop,"vertical")}),pe(o,"scroll",function(){o.clientWidth&&n(o.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,a&&s<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Fr.prototype.update=function(e){var n=e.scrollWidth>e.clientWidth+1,t=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(t){this.vert.style.display="block",this.vert.style.bottom=n?r+"px":"0";var o=e.viewHeight-(n?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+o)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(n){this.horiz.style.display="block",this.horiz.style.right=t?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var i=e.viewWidth-e.barLeft-(t?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+i)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==r&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:t?r:0,bottom:n?r:0}},Fr.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Fr.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Fr.prototype.zeroWidthHack=function(){var e=y&&!h?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new D,this.disableVert=new D},Fr.prototype.enableZeroWidthBar=function(e,n,t){e.style.pointerEvents="auto",n.set(1e3,function r(){var o=e.getBoundingClientRect();("vert"==t?document.elementFromPoint(o.right-1,(o.top+o.bottom)/2):document.elementFromPoint((o.right+o.left)/2,o.bottom-1))!=e?e.style.pointerEvents="none":n.set(1e3,r)})},Fr.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Ur=function(){};function jr(e,n){n||(n=Dr(e));var t=e.display.barWidth,r=e.display.barHeight;zr(e,n);for(var o=0;o<4&&t!=e.display.barWidth||r!=e.display.barHeight;o++)t!=e.display.barWidth&&e.options.lineWrapping&&Or(e),zr(e,Dr(e)),t=e.display.barWidth,r=e.display.barHeight}function zr(e,n){var t=e.display,r=t.scrollbars.update(n);t.sizer.style.paddingRight=(t.barWidth=r.right)+"px",t.sizer.style.paddingBottom=(t.barHeight=r.bottom)+"px",t.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(t.scrollbarFiller.style.display="block",t.scrollbarFiller.style.height=r.bottom+"px",t.scrollbarFiller.style.width=r.right+"px"):t.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(t.gutterFiller.style.display="block",t.gutterFiller.style.height=r.bottom+"px",t.gutterFiller.style.width=n.gutterWidth+"px"):t.gutterFiller.style.display=""}Ur.prototype.update=function(){return{bottom:0,right:0}},Ur.prototype.setScrollLeft=function(){},Ur.prototype.setScrollTop=function(){},Ur.prototype.clear=function(){};var Gr={native:Fr,null:Ur};function qr(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&L(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Gr[e.options.scrollbarStyle](function(n){e.display.wrapper.insertBefore(n,e.display.scrollbarFiller),pe(n,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),n.setAttribute("cm-not-content","true")},function(n,t){"horizontal"==t?Wr(e,n):Br(e,n)},e),e.display.scrollbars.addClass&&_(e.display.wrapper,e.display.scrollbars.addClass)}var Kr=0;function Vr(e){var n;e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Kr},n=e.curOp,st?st.ops.push(n):n.ownsGroup=st={ops:[n],delayedCallbacks:[]}}function Yr(e){var n=e.curOp;n&&function(e,n){var t=e.ownsGroup;if(t)try{!function(e){var n=e.delayedCallbacks,t=0;do{for(;t=t.viewTo)||t.maxLineChanged&&n.options.lineWrapping,e.update=e.mustUpdate&&new io(n,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Qr(e){var n=e.cm,t=n.display;e.updatedDisplay&&Or(n),e.barMeasure=Dr(n),t.maxLineChanged&&!n.options.lineWrapping&&(e.adjustWidthTo=Nt(n,t.maxLine,t.maxLine.text.length).left+3,n.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(t.scroller.clientWidth,t.sizer.offsetLeft+e.adjustWidthTo+Ot(n)+n.display.barWidth),e.maxScrollLeft=Math.max(0,t.sizer.offsetLeft+e.adjustWidthTo-It(n))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=t.input.prepareSelection())}function $r(e){var n=e.cm;null!=e.adjustWidthTo&&(n.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft(window.innerHeight||document.documentElement.clientHeight)&&(o=!1),null!=o&&!f){var i=A("div","​",null,"position: absolute;\n top: "+(n.top-t.viewOffset-xt(e.display))+"px;\n height: "+(n.bottom-n.top+Ot(e)+t.barHeight)+"px;\n left: "+n.left+"px; width: "+Math.max(2,n.right-n.left)+"px;");e.display.lineSpace.appendChild(i),i.scrollIntoView(o),e.display.lineSpace.removeChild(i)}}}(n,function(e,n,t,r){var o;null==r&&(r=0),e.options.lineWrapping||n!=t||(t="before"==(n=n.ch?nn(n.line,"before"==n.sticky?n.ch-1:n.ch,"after"):n).sticky?nn(n.line,n.ch+1,"before"):n);for(var i=0;i<5;i++){var a=!1,s=Yt(e,n),l=t&&t!=n?Yt(e,t):s,c=Mr(e,o={left:Math.min(s.left,l.left),top:Math.min(s.top,l.top)-r,right:Math.max(s.left,l.left),bottom:Math.max(s.bottom,l.bottom)+r}),u=e.doc.scrollTop,d=e.doc.scrollLeft;if(null!=c.scrollTop&&(Br(e,c.scrollTop),Math.abs(e.doc.scrollTop-u)>1&&(a=!0)),null!=c.scrollLeft&&(Wr(e,c.scrollLeft),Math.abs(e.doc.scrollLeft-d)>1&&(a=!0)),!a)break}return o}(n,cn(r,e.scrollToPos.from),cn(r,e.scrollToPos.to),e.scrollToPos.margin));var o=e.maybeHiddenMarkers,i=e.maybeUnhiddenMarkers;if(o)for(var a=0;a=e.display.viewTo)){var t=+new Date+e.options.workTime,r=mn(e,n.highlightFrontier),o=[];n.iter(r.line,Math.min(n.first+n.size,e.display.viewTo+500),function(i){if(r.line>=e.display.viewFrom){var a=i.styles,s=i.text.length>e.options.maxHighlightLength?ze(n.mode,r.state):null,l=hn(e,i,r,!0);s&&(r.state=s),i.styles=l.styles;var c=i.styleClasses,u=l.classes;u?i.styleClasses=u:c&&(i.styleClasses=null);for(var d=!a||a.length!=i.styles.length||c!=u&&(!c||!u||c.bgClass!=u.bgClass||c.textClass!=u.textClass),p=0;!d&&pt)return ro(e,e.options.workDelay),!0}),n.highlightFrontier=r.line,n.modeFrontier=Math.max(n.modeFrontier,r.line),o.length&&Zr(e,function(){for(var n=0;n=t.viewFrom&&n.visible.to<=t.viewTo&&(null==t.updateLineNumbers||t.updateLineNumbers>=t.viewTo)&&t.renderedView==t.view&&0==gr(e))return!1;ho(e)&&(fr(e),n.dims=ar(e));var o=r.first+r.size,i=Math.max(n.visible.from-e.options.viewportMargin,r.first),a=Math.min(o,n.visible.to+e.options.viewportMargin);t.viewFroma&&t.viewTo-a<20&&(a=Math.min(o,t.viewTo)),xn&&(i=Un(e.doc,i),a=jn(e.doc,a));var s=i!=t.viewFrom||a!=t.viewTo||t.lastWrapHeight!=n.wrapperHeight||t.lastWrapWidth!=n.wrapperWidth;!function(e,n,t){var r=e.display;0==r.view.length||n>=r.viewTo||t<=r.viewFrom?(r.view=at(e,n,t),r.viewFrom=n):(r.viewFrom>n?r.view=at(e,n,r.viewFrom).concat(r.view):r.viewFromt&&(r.view=r.view.slice(0,dr(e,t)))),r.viewTo=t}(e,i,a),t.viewOffset=qn(Ve(e.doc,t.viewFrom)),e.display.mover.style.top=t.viewOffset+"px";var c=gr(e);if(!s&&0==c&&!n.force&&t.renderedView==t.view&&(null==t.updateLineNumbers||t.updateLineNumbers>=t.viewTo))return!1;var u=function(e){if(e.hasFocus())return null;var n=E();if(!n||!N(e.display.lineDiv,n))return null;var t={activeElt:n};if(window.getSelection){var r=window.getSelection();r.anchorNode&&r.extend&&N(e.display.lineDiv,r.anchorNode)&&(t.anchorNode=r.anchorNode,t.anchorOffset=r.anchorOffset,t.focusNode=r.focusNode,t.focusOffset=r.focusOffset)}return t}(e);return c>4&&(t.lineDiv.style.display="none"),function(e,n,t){var r=e.display,o=e.options.lineNumbers,i=r.lineDiv,a=i.firstChild;function s(n){var t=n.nextSibling;return l&&y&&e.display.currentWheelTarget==n?n.style.display="none":n.parentNode.removeChild(n),t}for(var c=r.view,u=r.viewFrom,d=0;d-1&&(h=!1),dt(e,p,u,t)),h&&(O(p.lineNumber),p.lineNumber.appendChild(document.createTextNode(en(e.options,u)))),a=p.node.nextSibling}else{var f=yt(e,p,u,t);i.insertBefore(f,a)}u+=p.size}for(;a;)a=s(a)}(e,t.updateLineNumbers,n.dims),c>4&&(t.lineDiv.style.display=""),t.renderedView=t.view,function(e){if(e&&e.activeElt&&e.activeElt!=E()&&(e.activeElt.focus(),e.anchorNode&&N(document.body,e.anchorNode)&&N(document.body,e.focusNode))){var n=window.getSelection(),t=document.createRange();t.setEnd(e.anchorNode,e.anchorOffset),t.collapse(!1),n.removeAllRanges(),n.addRange(t),n.extend(e.focusNode,e.focusOffset)}}(u),O(t.cursorDiv),O(t.selectionDiv),t.gutters.style.height=t.sizer.style.minHeight=0,s&&(t.lastWrapHeight=n.wrapperHeight,t.lastWrapWidth=n.wrapperWidth,ro(e,400)),t.updateLineNumbers=null,!0}function so(e,n){for(var t=n.viewport,r=!0;(r&&e.options.lineWrapping&&n.oldDisplayWidth!=It(e)||(t&&null!=t.top&&(t={top:Math.min(e.doc.height+St(e.display)-At(e),t.top)}),n.visible=Ar(e.display,e.doc,t),!(n.visible.from>=e.display.viewFrom&&n.visible.to<=e.display.viewTo)))&&ao(e,n);r=!1){Or(e);var o=Dr(e);vr(e),jr(e,o),uo(e,o),n.force=!1}n.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(n.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function lo(e,n){var t=new io(e,n);if(ao(e,t)){Or(e),so(e,t);var r=Dr(e);vr(e),jr(e,r),uo(e,r),t.finish()}}function co(e){var n=e.gutters.offsetWidth;e.sizer.style.marginLeft=n+"px"}function uo(e,n){e.display.sizer.style.minHeight=n.docHeight+"px",e.display.heightForcer.style.top=n.docHeight+"px",e.display.gutters.style.height=n.docHeight+e.display.barHeight+Ot(e)+"px"}function po(e){var n=e.display,t=n.view;if(n.alignWidgets||n.gutters.firstChild&&e.options.fixedGutter){for(var r=sr(n)-n.scroller.scrollLeft+e.doc.scrollLeft,o=n.gutters.offsetWidth,i=r+"px",a=0;as.clientWidth,u=s.scrollHeight>s.clientHeight;if(o&&c||i&&u){if(i&&y&&l)e:for(var p=n.target,h=a.view;p!=s;p=p.parentNode)for(var f=0;f=0&&tn(e,r.to())<=0)return t}return-1};var xo=function(e,n){this.anchor=e,this.head=n};function So(e,n,t){var r=e&&e.options.selectionsMayTouch,o=n[t];n.sort(function(e,n){return tn(e.from(),n.from())}),t=F(n,o);for(var i=1;i0:l>=0){var c=sn(s.from(),a.from()),u=an(s.to(),a.to()),d=s.empty()?a.from()==a.head:s.from()==s.head;i<=t&&--t,n.splice(--i,2,new xo(d?u:c,d?c:u))}}return new Co(n,t)}function Lo(e,n){return new Co([new xo(e,n||e)],0)}function Oo(e){return e.text?nn(e.from.line+e.text.length-1,X(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function Io(e,n){if(tn(e,n.from)<0)return e;if(tn(e,n.to)<=0)return Oo(n);var t=e.line+n.text.length-(n.to.line-n.from.line)-1,r=e.ch;return e.line==n.to.line&&(r+=Oo(n).ch-n.to.ch),nn(t,r)}function Ao(e,n){for(var t=[],r=0;r1&&e.remove(s.line+1,f-1),e.insert(s.line+1,v)}ct(e,"change",e,n)}function Po(e,n,t){!function e(r,o,i){if(r.linked)for(var a=0;as-(e.cm?e.cm.options.historyEventDelay:500)||"*"==n.origin.charAt(0)))&&(i=function(e,n){return n?(Fo(e.done),X(e.done)):e.done.length&&!X(e.done).ranges?X(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),X(e.done)):void 0}(o,o.lastOp==r)))a=X(i.changes),0==tn(n.from,n.to)&&0==tn(n.from,a.to)?a.to=Oo(n):i.changes.push(Do(e,n));else{var l=X(o.done);for(l&&l.ranges||zo(e.sel,o.done),i={changes:[Do(e,n)],generation:o.generation},o.done.push(i);o.done.length>o.undoDepth;)o.done.shift(),o.done[0].ranges||o.done.shift()}o.done.push(t),o.generation=++o.maxGeneration,o.lastModTime=o.lastSelTime=s,o.lastOp=o.lastSelOp=r,o.lastOrigin=o.lastSelOrigin=n.origin,a||me(e,"historyAdded")}function jo(e,n,t,r){var o=e.history,i=r&&r.origin;t==o.lastSelOp||i&&o.lastSelOrigin==i&&(o.lastModTime==o.lastSelTime&&o.lastOrigin==i||function(e,n,t,r){var o=n.charAt(0);return"*"==o||"+"==o&&t.ranges.length==r.ranges.length&&t.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}(e,i,X(o.done),n))?o.done[o.done.length-1]=n:zo(n,o.done),o.lastSelTime=+new Date,o.lastSelOrigin=i,o.lastSelOp=t,r&&!1!==r.clearRedo&&Fo(o.undone)}function zo(e,n){var t=X(n);t&&t.ranges&&t.equals(e)||n.push(e)}function Go(e,n,t,r){var o=n["spans_"+e.id],i=0;e.iter(Math.max(e.first,t),Math.min(e.first+e.size,r),function(t){t.markedSpans&&((o||(o=n["spans_"+e.id]={}))[i]=t.markedSpans),++i})}function qo(e){if(!e)return null;for(var n,t=0;t-1&&(X(s)[d]=c[d],delete c[d])}}}return r}function Yo(e,n,t,r){if(r){var o=e.anchor;if(t){var i=tn(n,o)<0;i!=tn(t,o)<0?(o=n,n=t):i!=tn(n,t)<0&&(n=t)}return new xo(o,n)}return new xo(t||n,n)}function Xo(e,n,t,r,o){null==o&&(o=e.cm&&(e.cm.display.shift||e.extend)),ei(e,new Co([Yo(e.sel.primary(),n,t,o)],0),r)}function Qo(e,n,t){for(var r=[],o=e.cm&&(e.cm.display.shift||e.extend),i=0;i=n.ch:s.to>n.ch))){if(o&&(me(l,"beforeCursorEnter"),l.explicitlyCleared)){if(i.markedSpans){--a;continue}break}if(!l.atomic)continue;if(t){var d=l.find(r<0?1:-1),p=void 0;if((r<0?u:c)&&(d=si(e,d,-r,d&&d.line==n.line?i:null)),d&&d.line==n.line&&(p=tn(d,t))&&(r<0?p<0:p>0))return ii(e,d,n,r,o)}var h=l.find(r<0?-1:1);return(r<0?c:u)&&(h=si(e,h,r,h.line==n.line?i:null)),h?ii(e,h,n,r,o):null}}return n}function ai(e,n,t,r,o){var i=r||1,a=ii(e,n,t,i,o)||!o&&ii(e,n,t,i,!0)||ii(e,n,t,-i,o)||!o&&ii(e,n,t,-i,!0);return a||(e.cantEdit=!0,nn(e.first,0))}function si(e,n,t,r){return t<0&&0==n.ch?n.line>e.first?cn(e,nn(n.line-1)):null:t>0&&n.ch==(r||Ve(e,n.line)).text.length?n.line0)){var u=[l,1],d=tn(c.from,s.from),p=tn(c.to,s.to);(d<0||!a.inclusiveLeft&&!d)&&u.push({from:c.from,to:s.from}),(p>0||!a.inclusiveRight&&!p)&&u.push({from:s.to,to:c.to}),o.splice.apply(o,u),l+=u.length-3}}return o}(e,n.from,n.to);if(r)for(var o=r.length-1;o>=0;--o)di(e,{from:r[o].from,to:r[o].to,text:o?[""]:n.text,origin:n.origin});else di(e,n)}}function di(e,n){if(1!=n.text.length||""!=n.text[0]||0!=tn(n.from,n.to)){var t=Ao(e,n);Uo(e,n,t,e.cm?e.cm.curOp.id:NaN),fi(e,n,t,In(e,n));var r=[];Po(e,function(e,t){t||-1!=F(r,e.history)||(yi(e.history,n),r.push(e.history)),fi(e,n,null,In(e,n))})}}function pi(e,n,t){var r=e.cm&&e.cm.state.suppressEdits;if(!r||t){for(var o,i=e.history,a=e.sel,s="undo"==n?i.done:i.undone,l="undo"==n?i.undone:i.done,c=0;c=0;--h){var f=p(h);if(f)return f.v}}}}function hi(e,n){if(0!=n&&(e.first+=n,e.sel=new Co(Q(e.sel.ranges,function(e){return new xo(nn(e.anchor.line+n,e.anchor.ch),nn(e.head.line+n,e.head.ch))}),e.sel.primIndex),e.cm)){pr(e.cm,e.first,e.first-n,n);for(var t=e.cm.display,r=t.viewFrom;re.lastLine())){if(n.from.linei&&(n={from:n.from,to:nn(i,Ve(e,i).text.length),text:[n.text[0]],origin:n.origin}),n.removed=Ye(e,n.from,n.to),t||(t=Ao(e,n)),e.cm?function(e,n,t){var r=e.doc,o=e.display,i=n.from,a=n.to,s=!1,l=i.line;e.options.lineWrapping||(l=$e(Fn(Ve(r,i.line))),r.iter(l,a.line+1,function(e){if(e==o.maxLine)return s=!0,!0})),r.sel.contains(n.from,n.to)>-1&&ve(e),Ro(r,n,t,lr(e)),e.options.lineWrapping||(r.iter(l,i.line+n.text.length,function(e){var n=Kn(e);n>o.maxLineLength&&(o.maxLine=e,o.maxLineLength=n,o.maxLineChanged=!0,s=!1)}),s&&(e.curOp.updateMaxLine=!0)),function(e,n){if(e.modeFrontier=Math.min(e.modeFrontier,n),!(e.highlightFrontiert;r--){var o=Ve(e,r).stateAfter;if(o&&(!(o instanceof dn)||r+o.lookAhead1||!(this.children[0]instanceof ki))){var s=[];this.collapse(s),this.children=[new ki(s)],this.children[0].parent=this}},collapse:function(e){for(var n=0;n50){for(var a=o.lines.length%25+25,s=a;s10);e.parent.maybeSpill()}},iterN:function(e,n,t){for(var r=0;r0||0==a&&!1!==i.clearWhenEmpty)return i;if(i.replacedWith&&(i.collapsed=!0,i.widgetNode=M("span",[i.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||i.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(i.widgetNode.insertLeft=!0)),i.collapsed){if(Dn(e,n.line,n,t,i)||n.line!=t.line&&Dn(e,t.line,n,t,i))throw new Error("Inserting collapsed marker partially overlapping an existing one");xn=!0}i.addToHistory&&Uo(e,{from:n,to:t,origin:"markText"},e.sel,NaN);var s,l=n.line,c=e.cm;if(e.iter(l,t.line+1,function(e){c&&i.collapsed&&!c.options.lineWrapping&&Fn(e)==c.display.maxLine&&(s=!0),i.collapsed&&l!=n.line&&Qe(e,0),function(e,n){e.markedSpans=e.markedSpans?e.markedSpans.concat([n]):[n],n.marker.attachLine(e)}(e,new Sn(i,l==n.line?n.ch:null,l==t.line?t.ch:null)),++l}),i.collapsed&&e.iter(n.line,t.line+1,function(n){zn(e,n)&&Qe(n,0)}),i.clearOnEnter&&pe(i,"beforeCursorEnter",function(){return i.clear()}),i.readOnly&&(Cn=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),i.collapsed&&(i.id=++xi,i.atomic=!0),c){if(s&&(c.curOp.updateMaxLine=!0),i.collapsed)pr(c,n.line,t.line+1);else if(i.className||i.startStyle||i.endStyle||i.css||i.attributes||i.title)for(var u=n.line;u<=t.line;u++)hr(c,u,"text");i.atomic&&ri(c.doc),ct(c,"markerAdded",c,i)}return i}Si.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,n=e&&!e.curOp;if(n&&Vr(e),ye(this,"clear")){var t=this.find();t&&ct(this,"clear",t.from,t.to)}for(var r=null,o=null,i=0;ie.display.maxLineLength&&(e.display.maxLine=c,e.display.maxLineLength=u,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&pr(e,r,o+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&ri(e.doc)),e&&ct(e,"markerCleared",e,this,r,o),n&&Yr(e),this.parent&&this.parent.clear()}},Si.prototype.find=function(e,n){var t,r;null==e&&"bookmark"==this.type&&(e=1);for(var o=0;o=0;l--)ui(this,r[l]);s?Zo(this,s):this.cm&&Er(this.cm)}),undo:to(function(){pi(this,"undo")}),redo:to(function(){pi(this,"redo")}),undoSelection:to(function(){pi(this,"undo",!0)}),redoSelection:to(function(){pi(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,n=0,t=0,r=0;r=e.ch)&&n.push(o.marker.parent||o.marker)}return n},findMarks:function(e,n,t){e=cn(this,e),n=cn(this,n);var r=[],o=e.line;return this.iter(e.line,n.line+1,function(i){var a=i.markedSpans;if(a)for(var s=0;s=l.to||null==l.from&&o!=e.line||null!=l.from&&o==n.line&&l.from>=n.ch||t&&!t(l.marker)||r.push(l.marker.parent||l.marker)}++o}),r},getAllMarks:function(){var e=[];return this.iter(function(n){var t=n.markedSpans;if(t)for(var r=0;re)return n=e,!0;e-=i,++t}),cn(this,nn(t,n))},indexFromPos:function(e){var n=(e=cn(this,e)).ch;if(e.linen&&(n=e.from),null!=e.to&&e.to-1)return n.state.draggingText(e),void setTimeout(function(){return n.display.input.focus()},20);try{var u=e.dataTransfer.getData("Text");if(u){var d;if(n.state.draggingText&&!n.state.draggingText.copy&&(d=n.listSelections()),ni(n.doc,Lo(t,t)),d)for(var p=0;p=0;n--)mi(e.doc,"",r[n].from,r[n].to,"+delete");Er(e)})}function Ji(e,n,t){var r=ie(e.text,n+t,t);return r<0||r>e.text.length?null:r}function Zi(e,n,t){var r=Ji(e,n.ch,t);return null==r?null:new nn(n.line,r,t<0?"after":"before")}function ea(e,n,t,r,o){if(e){var i=ue(t,n.doc.direction);if(i){var a,s=o<0?X(i):i[0],l=o<0==(1==s.level)?"after":"before";if(s.level>0||"rtl"==n.doc.direction){var c=_t(n,t);a=o<0?t.text.length-1:0;var u=Rt(n,c,a).top;a=ae(function(e){return Rt(n,c,e).top==u},o<0==(1==s.level)?s.from:s.to-1,a),"before"==l&&(a=Ji(t,a,1))}else a=o<0?s.to:s.from;return new nn(r,a,l)}}return new nn(r,o<0?t.text.length:0,o<0?"before":"after")}zi.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},zi.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},zi.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},zi.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},zi.default=y?zi.macDefault:zi.pcDefault;var na={selectAll:li,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),z)},killLine:function(e){return $i(e,function(n){if(n.empty()){var t=Ve(e.doc,n.head.line).text.length;return n.head.ch==t&&n.head.line0)o=new nn(o.line,o.ch+1),e.replaceRange(i.charAt(o.ch-1)+i.charAt(o.ch-2),nn(o.line,o.ch-2),o,"+transpose");else if(o.line>e.doc.first){var a=Ve(e.doc,o.line-1).text;a&&(o=new nn(o.line,1),e.replaceRange(i.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),nn(o.line-1,a.length-1),o,"+transpose"))}t.push(new xo(o,o))}e.setSelections(t)})},newlineAndIndent:function(e){return Zr(e,function(){for(var n=e.listSelections(),t=n.length-1;t>=0;t--)e.replaceRange(e.doc.lineSeparator(),n[t].anchor,n[t].head,"+input");n=e.listSelections();for(var r=0;r-1&&(tn((o=c.ranges[o]).from(),n)<0||n.xRel>0)&&(tn(o.to(),n)>0||n.xRel<0)?function(e,n,t,r){var o=e.display,i=!1,c=eo(e,function(n){l&&(o.scroller.draggable=!1),e.state.draggingText=!1,fe(o.wrapper.ownerDocument,"mouseup",c),fe(o.wrapper.ownerDocument,"mousemove",u),fe(o.scroller,"dragstart",d),fe(o.scroller,"drop",c),i||(ke(n),r.addNew||Xo(e.doc,t,null,null,r.extend),l||a&&9==s?setTimeout(function(){o.wrapper.ownerDocument.body.focus(),o.input.focus()},20):o.input.focus())}),u=function(e){i=i||Math.abs(n.clientX-e.clientX)+Math.abs(n.clientY-e.clientY)>=10},d=function(){return i=!0};l&&(o.scroller.draggable=!0),e.state.draggingText=c,c.copy=!r.moveOnDrag,o.scroller.dragDrop&&o.scroller.dragDrop(),pe(o.wrapper.ownerDocument,"mouseup",c),pe(o.wrapper.ownerDocument,"mousemove",u),pe(o.scroller,"dragstart",d),pe(o.scroller,"drop",c),xr(e),setTimeout(function(){return o.input.focus()},20)}(e,r,n,i):function(e,n,t,r){var o=e.display,i=e.doc;ke(n);var a,s,l=i.sel,c=l.ranges;if(r.addNew&&!r.extend?(s=i.sel.contains(t),a=s>-1?c[s]:new xo(t,t)):(a=i.sel.primary(),s=i.sel.primIndex),"rectangle"==r.unit)r.addNew||(a=new xo(t,t)),t=ur(e,n,!0,!0),s=-1;else{var u=va(e,t,r.unit);a=r.extend?Yo(a,u.anchor,u.head,r.extend):u}r.addNew?-1==s?(s=c.length,ei(i,So(e,c.concat([a]),s),{scroll:!1,origin:"*mouse"})):c.length>1&&c[s].empty()&&"char"==r.unit&&!r.extend?(ei(i,So(e,c.slice(0,s).concat(c.slice(s+1)),0),{scroll:!1,origin:"*mouse"}),l=i.sel):$o(i,s,a,G):(s=0,ei(i,new Co([a],0),G),l=i.sel);var d=t;function p(n){if(0!=tn(d,n))if(d=n,"rectangle"==r.unit){for(var o=[],c=e.options.tabSize,u=W(Ve(i,t.line).text,t.ch,c),p=W(Ve(i,n.line).text,n.ch,c),h=Math.min(u,p),f=Math.max(u,p),m=Math.min(t.line,n.line),g=Math.min(e.lastLine(),Math.max(t.line,n.line));m<=g;m++){var v=Ve(i,m).text,y=K(v,h,c);h==f?o.push(new xo(nn(m,y),nn(m,y))):v.length>y&&o.push(new xo(nn(m,y),nn(m,K(v,f,c))))}o.length||o.push(new xo(t,t)),ei(i,So(e,l.ranges.slice(0,s).concat(o),s),{origin:"*mouse",scroll:!1}),e.scrollIntoView(n)}else{var b,k=a,T=va(e,n,r.unit),w=k.anchor;tn(T.anchor,w)>0?(b=T.head,w=sn(k.from(),T.anchor)):(b=T.anchor,w=an(k.to(),T.head));var C=l.ranges.slice(0);C[s]=function(e,n){var t=n.anchor,r=n.head,o=Ve(e.doc,t.line);if(0==tn(t,r)&&t.sticky==r.sticky)return n;var i=ue(o);if(!i)return n;var a=le(i,t.ch,t.sticky),s=i[a];if(s.from!=t.ch&&s.to!=t.ch)return n;var l,c=a+(s.from==t.ch==(1!=s.level)?0:1);if(0==c||c==i.length)return n;if(r.line!=t.line)l=(r.line-t.line)*("ltr"==e.doc.direction?1:-1)>0;else{var u=le(i,r.ch,r.sticky),d=u-a||(r.ch-t.ch)*(1==s.level?-1:1);l=u==c-1||u==c?d<0:d>0}var p=i[c+(l?-1:0)],h=l==(1==p.level),f=h?p.from:p.to,m=h?"after":"before";return t.ch==f&&t.sticky==m?n:new xo(new nn(t.line,f,m),r)}(e,new xo(cn(i,w),b)),ei(i,So(e,C,s),G)}}var h=o.wrapper.getBoundingClientRect(),f=0;function m(n){e.state.selectingText=!1,f=1/0,n&&(ke(n),o.input.focus()),fe(o.wrapper.ownerDocument,"mousemove",g),fe(o.wrapper.ownerDocument,"mouseup",v),i.history.lastSelOrigin=null}var g=eo(e,function(n){0!==n.buttons&&Se(n)?function n(t){var a=++f,s=ur(e,t,!0,"rectangle"==r.unit);if(s)if(0!=tn(s,d)){e.curOp.focus=E(),p(s);var l=Ar(o,i);(s.line>=l.to||s.lineh.bottom?20:0;c&&setTimeout(eo(e,function(){f==a&&(o.scroller.scrollTop+=c,n(t))}),50)}}(n):m(n)}),v=eo(e,m);e.state.selectingText=v,pe(o.wrapper.ownerDocument,"mousemove",g),pe(o.wrapper.ownerDocument,"mouseup",v)}(e,r,n,i)}(n,r,i,e):xe(e)==t.scroller&&ke(e):2==o?(r&&Xo(n.doc,r),setTimeout(function(){return t.input.focus()},20)):3==o&&(C?n.display.input.onContextMenu(e):xr(n)))}}function va(e,n,t){if("char"==t)return new xo(n,n);if("word"==t)return e.findWordAt(n);if("line"==t)return new xo(nn(n.line,0),cn(e.doc,nn(n.line+1,0)));var r=t(e,n);return new xo(r.from,r.to)}function ya(e,n,t,r){var o,i;if(n.touches)o=n.touches[0].clientX,i=n.touches[0].clientY;else try{o=n.clientX,i=n.clientY}catch(n){return!1}if(o>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&ke(n);var a=e.display,s=a.lineDiv.getBoundingClientRect();if(i>s.bottom||!ye(e,t))return we(n);i-=s.top-a.viewOffset;for(var l=0;l=o)return me(e,t,e,Je(e.doc,i),e.display.gutterSpecs[l].className,n),we(n)}}function ba(e,n){return ya(e,n,"gutterClick",!0)}function ka(e,n){Ct(e.display,n)||function(e,n){return!!ye(e,"gutterContextMenu")&&ya(e,n,"gutterContextMenu",!1)}(e,n)||ge(e,n,"contextmenu")||C||e.display.input.onContextMenu(n)}function Ta(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Ut(e)}ma.prototype.compare=function(e,n,t){return this.time+400>e&&0==tn(n,this.pos)&&t==this.button};var wa={toString:function(){return"CodeMirror.Init"}},Ca={},xa={};function Sa(e,n,t){if(!n!=!(t&&t!=wa)){var r=e.display.dragFunctions,o=n?pe:fe;o(e.display.scroller,"dragstart",r.start),o(e.display.scroller,"dragenter",r.enter),o(e.display.scroller,"dragover",r.over),o(e.display.scroller,"dragleave",r.leave),o(e.display.scroller,"drop",r.drop)}}function La(e){e.options.lineWrapping?(_(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(L(e.display.wrapper,"CodeMirror-wrap"),Vn(e)),cr(e),pr(e),Ut(e),setTimeout(function(){return jr(e)},100)}function Oa(e,n){var t=this;if(!(this instanceof Oa))return new Oa(e,n);this.options=n=n?H(n):{},H(Ca,n,!1);var r=n.value;"string"==typeof r?r=new Ni(r,n.mode,null,n.lineSeparator,n.direction):n.mode&&(r.modeOption=n.mode),this.doc=r;var o=new Oa.inputStyles[n.inputStyle](this),i=this.display=new vo(e,r,o,n);for(var c in i.wrapper.CodeMirror=this,Ta(this),n.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),qr(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new D,keySeq:null,specialChars:null},n.autofocus&&!v&&i.input.focus(),a&&s<11&&setTimeout(function(){return t.display.input.reset(!0)},20),function(e){var n=e.display;pe(n.scroller,"mousedown",eo(e,ga)),pe(n.scroller,"dblclick",a&&s<11?eo(e,function(n){if(!ge(e,n)){var t=ur(e,n);if(t&&!ba(e,n)&&!Ct(e.display,n)){ke(n);var r=e.findWordAt(t);Xo(e.doc,r.anchor,r.head)}}}):function(n){return ge(e,n)||ke(n)}),pe(n.scroller,"contextmenu",function(n){return ka(e,n)});var t,r={end:0};function o(){n.activeTouch&&(t=setTimeout(function(){return n.activeTouch=null},1e3),(r=n.activeTouch).end=+new Date)}function i(e,n){if(null==n.left)return!0;var t=n.left-e.left,r=n.top-e.top;return t*t+r*r>400}pe(n.scroller,"touchstart",function(o){if(!ge(e,o)&&!function(e){if(1!=e.touches.length)return!1;var n=e.touches[0];return n.radiusX<=1&&n.radiusY<=1}(o)&&!ba(e,o)){n.input.ensurePolled(),clearTimeout(t);var i=+new Date;n.activeTouch={start:i,moved:!1,prev:i-r.end<=300?r:null},1==o.touches.length&&(n.activeTouch.left=o.touches[0].pageX,n.activeTouch.top=o.touches[0].pageY)}}),pe(n.scroller,"touchmove",function(){n.activeTouch&&(n.activeTouch.moved=!0)}),pe(n.scroller,"touchend",function(t){var r=n.activeTouch;if(r&&!Ct(n,t)&&null!=r.left&&!r.moved&&new Date-r.start<300){var a,s=e.coordsChar(n.activeTouch,"page");a=!r.prev||i(r,r.prev)?new xo(s,s):!r.prev.prev||i(r,r.prev.prev)?e.findWordAt(s):new xo(nn(s.line,0),cn(e.doc,nn(s.line+1,0))),e.setSelection(a.anchor,a.head),e.focus(),ke(t)}o()}),pe(n.scroller,"touchcancel",o),pe(n.scroller,"scroll",function(){n.scroller.clientHeight&&(Br(e,n.scroller.scrollTop),Wr(e,n.scroller.scrollLeft,!0),me(e,"scroll",e))}),pe(n.scroller,"mousewheel",function(n){return wo(e,n)}),pe(n.scroller,"DOMMouseScroll",function(n){return wo(e,n)}),pe(n.wrapper,"scroll",function(){return n.wrapper.scrollTop=n.wrapper.scrollLeft=0}),n.dragFunctions={enter:function(n){ge(e,n)||Ce(n)},over:function(n){ge(e,n)||(function(e,n){var t=ur(e,n);if(t){var r=document.createDocumentFragment();br(e,t,r),e.display.dragCursor||(e.display.dragCursor=A("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),I(e.display.dragCursor,r)}}(e,n),Ce(n))},start:function(n){return function(e,n){if(a&&(!e.state.draggingText||+new Date-Ei<100))Ce(n);else if(!ge(e,n)&&!Ct(e.display,n)&&(n.dataTransfer.setData("Text",e.getSelection()),n.dataTransfer.effectAllowed="copyMove",n.dataTransfer.setDragImage&&!p)){var t=A("img",null,null,"position: fixed; left: 0; top: 0;");t.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",d&&(t.width=t.height=1,e.display.wrapper.appendChild(t),t._top=t.offsetTop),n.dataTransfer.setDragImage(t,0,0),d&&t.parentNode.removeChild(t)}}(e,n)},drop:eo(e,_i),leave:function(n){ge(e,n)||Ri(e)}};var l=n.input.getField();pe(l,"keyup",function(n){return da.call(e,n)}),pe(l,"keydown",eo(e,ua)),pe(l,"keypress",eo(e,pa)),pe(l,"focus",function(n){return Sr(e,n)}),pe(l,"blur",function(n){return Lr(e,n)})}(this),Hi(),Vr(this),this.curOp.forceUpdate=!0,Bo(this,r),n.autofocus&&!v||this.hasFocus()?setTimeout(B(Sr,this),20):Lr(this),xa)xa.hasOwnProperty(c)&&xa[c](t,n[c],wa);ho(this),n.finishInit&&n.finishInit(this);for(var u=0;u150)){if(!r)return;t="prev"}}else c=0,t="not";"prev"==t?c=n>i.first?W(Ve(i,n-1).text,null,a):0:"add"==t?c=l+e.options.indentUnit:"subtract"==t?c=l-e.options.indentUnit:"number"==typeof t&&(c=l+t),c=Math.max(0,c);var d="",p=0;if(e.options.indentWithTabs)for(var h=Math.floor(c/a);h;--h)p+=a,d+="\t";if(pa,l=Ee(n),c=null;if(s&&r.ranges.length>1)if(Ma&&Ma.text.join("\n")==n){if(r.ranges.length%Ma.text.length==0){c=[];for(var u=0;u=0;p--){var h=r.ranges[p],f=h.from(),m=h.to();h.empty()&&(t&&t>0?f=nn(f.line,f.ch-t):e.state.overwrite&&!s?m=nn(m.line,Math.min(Ve(i,m.line).text.length,m.ch+X(l).length)):s&&Ma&&Ma.lineWise&&Ma.text.join("\n")==n&&(f=m=nn(f.line,0)));var g={from:f,to:m,text:c?c[p%c.length]:l,origin:o||(s?"paste":e.state.cutIncoming>a?"cut":"+input")};ui(e.doc,g),ct(e,"inputRead",e,g)}n&&!s&&Ra(e,n),Er(e),e.curOp.updateInput<2&&(e.curOp.updateInput=d),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function _a(e,n){var t=e.clipboardData&&e.clipboardData.getData("Text");if(t)return e.preventDefault(),n.isReadOnly()||n.options.disableInput||Zr(n,function(){return Ea(n,t,0,null,"paste")}),!0}function Ra(e,n){if(e.options.electricChars&&e.options.smartIndent)for(var t=e.doc.sel,r=t.ranges.length-1;r>=0;r--){var o=t.ranges[r];if(!(o.head.ch>100||r&&t.ranges[r-1].head.line==o.head.line)){var i=e.getModeAt(o.head),a=!1;if(i.electricChars){for(var s=0;s-1){a=Aa(e,o.head.line,"smart");break}}else i.electricInput&&i.electricInput.test(Ve(e.doc,o.head.line).text.slice(0,o.head.ch))&&(a=Aa(e,o.head.line,"smart"));a&&ct(e,"electricInput",e,o.head.line)}}}function Pa(e){for(var n=[],t=[],r=0;r=n.text.length?(t.ch=n.text.length,t.sticky="before"):t.ch<=0&&(t.ch=0,t.sticky="after");var i=le(o,t.ch,t.sticky),a=o[i];if("ltr"==e.doc.direction&&a.level%2==0&&(r>0?a.to>t.ch:a.from=a.from&&p>=u.begin)){var h=d?"before":"after";return new nn(t.line,p,h)}}var f=function(e,n,r){for(var i=function(e,n){return n?new nn(t.line,l(e,1),"before"):new nn(t.line,e,"after")};e>=0&&e0==(1!=a.level),c=s?r.begin:l(r.end,-1);if(a.from<=c&&c0?u.end:l(u.begin,-1);return null==g||r>0&&g==n.text.length||!(m=f(r>0?0:o.length-1,r,c(g)))?null:m}(e.cm,s,n,t):Zi(s,n,t))){if(r||(a=n.line+t)=e.first+e.size||(n=new nn(a,n.ch,n.sticky),!(s=Ve(e,a))))return!1;n=ea(o,e.cm,s,n.line,t)}else n=i;return!0}if("char"==r)l();else if("column"==r)l(!0);else if("word"==r||"group"==r)for(var c=null,u="group"==r,d=e.cm&&e.cm.getHelper(n,"wordChars"),p=!0;!(t<0)||l(!p);p=!1){var h=s.text.charAt(n.ch)||"\n",f=ne(h,d)?"w":u&&"\n"==h?"n":!u||/\s/.test(h)?null:"p";if(!u||p||f||(f="s"),c&&c!=f){t<0&&(t=1,l(),n.sticky="after");break}if(f&&(c=f),t>0&&!l(!p))break}var m=ai(e,n,i,a,!0);return rn(i,m)&&(m.hitSide=!0),m}function Da(e,n,t,r){var o,i,a=e.doc,s=n.left;if("page"==r){var l=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),c=Math.max(l-.5*or(e.display),3);o=(t>0?n.bottom:n.top)+t*c}else"line"==r&&(o=t>0?n.bottom+3:n.top-3);for(;(i=$t(e,s,o)).outside;){if(t<0?o<=0:o>=a.height){i.hitSide=!0;break}o+=5*t}return i}var Fa=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new D,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function Ua(e,n){var t=Et(e,n.line);if(!t||t.hidden)return null;var r=Ve(e.doc,n.line),o=Mt(t,r,n.line),i=ue(r,e.doc.direction),a="left";i&&(a=le(i,n.ch)%2?"right":"left");var s=Ht(o.map,n.ch,a);return s.offset="right"==s.collapse?s.end:s.start,s}function ja(e,n){return n&&(e.bad=!0),e}function za(e,n,t){var r;if(n==e.display.lineDiv){if(!(r=e.display.lineDiv.childNodes[t]))return ja(e.clipPos(nn(e.display.viewTo-1)),!0);n=null,t=0}else for(r=n;;r=r.parentNode){if(!r||r==e.display.lineDiv)return null;if(r.parentNode&&r.parentNode==e.display.lineDiv)break}for(var o=0;o=n.display.viewTo||i.line=n.display.viewFrom&&Ua(n,o)||{node:l[0].measure.map[2],offset:0},u=i.liner.firstLine()&&(a=nn(a.line-1,Ve(r.doc,a.line-1).length)),s.ch==Ve(r.doc,s.line).text.length&&s.lineo.viewTo-1)return!1;a.line==o.viewFrom||0==(e=dr(r,a.line))?(n=$e(o.view[0].line),t=o.view[0].node):(n=$e(o.view[e].line),t=o.view[e-1].node.nextSibling);var l,c,u=dr(r,s.line);if(u==o.view.length-1?(l=o.viewTo-1,c=o.lineDiv.lastChild):(l=$e(o.view[u+1].line)-1,c=o.view[u+1].node.previousSibling),!t)return!1;for(var d=r.doc.splitLines(function(e,n,t,r,o){var i="",a=!1,s=e.doc.lineSeparator(),l=!1;function c(){a&&(i+=s,l&&(i+=s),a=l=!1)}function u(e){e&&(c(),i+=e)}function d(n){if(1==n.nodeType){var t=n.getAttribute("cm-text");if(t)return void u(t);var i,p=n.getAttribute("cm-marker");if(p){var h=e.findMarks(nn(r,0),nn(o+1,0),(g=+p,function(e){return e.id==g}));return void(h.length&&(i=h[0].find(0))&&u(Ye(e.doc,i.from,i.to).join(s)))}if("false"==n.getAttribute("contenteditable"))return;var f=/^(pre|div|p|li|table|br)$/i.test(n.nodeName);if(!/^br$/i.test(n.nodeName)&&0==n.textContent.length)return;f&&c();for(var m=0;m1&&p.length>1;)if(X(d)==X(p))d.pop(),p.pop(),l--;else{if(d[0]!=p[0])break;d.shift(),p.shift(),n++}for(var h=0,f=0,m=d[0],g=p[0],v=Math.min(m.length,g.length);ha.ch&&y.charCodeAt(y.length-f-1)==b.charCodeAt(b.length-f-1);)h--,f++;d[d.length-1]=y.slice(0,y.length-f).replace(/^\u200b+/,""),d[0]=d[0].slice(h).replace(/\u200b+$/,"");var T=nn(n,h),w=nn(l,p.length?X(p).length-f:0);return d.length>1||d[0]||tn(T,w)?(mi(r.doc,d,T,w,"+input"),!0):void 0},Fa.prototype.ensurePolled=function(){this.forceCompositionEnd()},Fa.prototype.reset=function(){this.forceCompositionEnd()},Fa.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Fa.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}e.updateFromDOM()},80))},Fa.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||Zr(this.cm,function(){return pr(e.cm)})},Fa.prototype.setUneditable=function(e){e.contentEditable="false"},Fa.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||eo(this.cm,Ea)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},Fa.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},Fa.prototype.onContextMenu=function(){},Fa.prototype.resetPosition=function(){},Fa.prototype.needsContentAttribute=!0;var qa=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new D,this.hasSelection=!1,this.composing=null};qa.prototype.init=function(e){var n=this,t=this,r=this.cm;this.createField(e);var o=this.textarea;function i(e){if(!ge(r,e)){if(r.somethingSelected())Na({lineWise:!1,text:r.getSelections()});else{if(!r.options.lineWiseCopyCut)return;var n=Pa(r);Na({lineWise:!0,text:n.text}),"cut"==e.type?r.setSelections(n.ranges,null,z):(t.prevInput="",o.value=n.text.join("\n"),P(o))}"cut"==e.type&&(r.state.cutIncoming=+new Date)}}e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),m&&(o.style.width="0px"),pe(o,"input",function(){a&&s>=9&&n.hasSelection&&(n.hasSelection=null),t.poll()}),pe(o,"paste",function(e){ge(r,e)||_a(e,r)||(r.state.pasteIncoming=+new Date,t.fastPoll())}),pe(o,"cut",i),pe(o,"copy",i),pe(e.scroller,"paste",function(n){if(!Ct(e,n)&&!ge(r,n)){if(!o.dispatchEvent)return r.state.pasteIncoming=+new Date,void t.focus();var i=new Event("paste");i.clipboardData=n.clipboardData,o.dispatchEvent(i)}}),pe(e.lineSpace,"selectstart",function(n){Ct(e,n)||ke(n)}),pe(o,"compositionstart",function(){var e=r.getCursor("from");t.composing&&t.composing.range.clear(),t.composing={start:e,range:r.markText(e,r.getCursor("to"),{className:"CodeMirror-composing"})}}),pe(o,"compositionend",function(){t.composing&&(t.poll(),t.composing.range.clear(),t.composing=null)})},qa.prototype.createField=function(e){this.wrapper=Ha(),this.textarea=this.wrapper.firstChild},qa.prototype.prepareSelection=function(){var e=this.cm,n=e.display,t=e.doc,r=yr(e);if(e.options.moveInputWithCursor){var o=Yt(e,t.sel.primary().head,"div"),i=n.wrapper.getBoundingClientRect(),a=n.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(n.wrapper.clientHeight-10,o.top+a.top-i.top)),r.teLeft=Math.max(0,Math.min(n.wrapper.clientWidth-10,o.left+a.left-i.left))}return r},qa.prototype.showSelection=function(e){var n=this.cm.display;I(n.cursorDiv,e.cursors),I(n.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},qa.prototype.reset=function(e){if(!this.contextMenuPending&&!this.composing){var n=this.cm;if(n.somethingSelected()){this.prevInput="";var t=n.getSelection();this.textarea.value=t,n.state.focused&&P(this.textarea),a&&s>=9&&(this.hasSelection=t)}else e||(this.prevInput=this.textarea.value="",a&&s>=9&&(this.hasSelection=null))}},qa.prototype.getField=function(){return this.textarea},qa.prototype.supportsTouch=function(){return!1},qa.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!v||E()!=this.textarea))try{this.textarea.focus()}catch(e){}},qa.prototype.blur=function(){this.textarea.blur()},qa.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},qa.prototype.receivedFocus=function(){this.slowPoll()},qa.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},qa.prototype.fastPoll=function(){var e=!1,n=this;n.pollingFast=!0,n.polling.set(20,function t(){n.poll()||e?(n.pollingFast=!1,n.slowPoll()):(e=!0,n.polling.set(60,t))})},qa.prototype.poll=function(){var e=this,n=this.cm,t=this.textarea,r=this.prevInput;if(this.contextMenuPending||!n.state.focused||_e(t)&&!r&&!this.composing||n.isReadOnly()||n.options.disableInput||n.state.keySeq)return!1;var o=t.value;if(o==r&&!n.somethingSelected())return!1;if(a&&s>=9&&this.hasSelection===o||y&&/[\uf700-\uf7ff]/.test(o))return n.display.input.reset(),!1;if(n.doc.sel==n.display.selForContextMenu){var i=o.charCodeAt(0);if(8203!=i||r||(r="​"),8666==i)return this.reset(),this.cm.execCommand("undo")}for(var l=0,c=Math.min(r.length,o.length);l1e3||o.indexOf("\n")>-1?t.value=e.prevInput="":e.prevInput=o,e.composing&&(e.composing.range.clear(),e.composing.range=n.markText(e.composing.start,n.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},qa.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},qa.prototype.onKeyPress=function(){a&&s>=9&&(this.hasSelection=null),this.fastPoll()},qa.prototype.onContextMenu=function(e){var n=this,t=n.cm,r=t.display,o=n.textarea;n.contextMenuPending&&n.contextMenuPending();var i=ur(t,e),c=r.scroller.scrollTop;if(i&&!d){t.options.resetSelectionOnContextMenu&&-1==t.doc.sel.contains(i)&&eo(t,ei)(t.doc,Lo(i),z);var u,p=o.style.cssText,h=n.wrapper.style.cssText,f=n.wrapper.offsetParent.getBoundingClientRect();if(n.wrapper.style.cssText="position: static",o.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-f.top-5)+"px; left: "+(e.clientX-f.left-5)+"px;\n z-index: 1000; background: "+(a?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",l&&(u=window.scrollY),r.input.focus(),l&&window.scrollTo(null,u),r.input.reset(),t.somethingSelected()||(o.value=n.prevInput=" "),n.contextMenuPending=v,r.selForContextMenu=t.doc.sel,clearTimeout(r.detectingSelectAll),a&&s>=9&&g(),C){Ce(e);var m=function(){fe(window,"mouseup",m),setTimeout(v,20)};pe(window,"mouseup",m)}else setTimeout(v,50)}function g(){if(null!=o.selectionStart){var e=t.somethingSelected(),i="​"+(e?o.value:"");o.value="⇚",o.value=i,n.prevInput=e?"":"​",o.selectionStart=1,o.selectionEnd=i.length,r.selForContextMenu=t.doc.sel}}function v(){if(n.contextMenuPending==v&&(n.contextMenuPending=!1,n.wrapper.style.cssText=h,o.style.cssText=p,a&&s<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=c),null!=o.selectionStart)){(!a||a&&s<9)&&g();var e=0,i=function(){r.selForContextMenu==t.doc.sel&&0==o.selectionStart&&o.selectionEnd>0&&"​"==n.prevInput?eo(t,li)(t):e++<10?r.detectingSelectAll=setTimeout(i,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(i,200)}}},qa.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e},qa.prototype.setUneditable=function(){},qa.prototype.needsContentAttribute=!1,function(e){var n=e.optionHandlers;function t(t,r,o,i){e.defaults[t]=r,o&&(n[t]=i?function(e,n,t){t!=wa&&o(e,n,t)}:o)}e.defineOption=t,e.Init=wa,t("value","",function(e,n){return e.setValue(n)},!0),t("mode",null,function(e,n){e.doc.modeOption=n,No(e)},!0),t("indentUnit",2,No,!0),t("indentWithTabs",!1),t("smartIndent",!0),t("tabSize",4,function(e){Eo(e),Ut(e),pr(e)},!0),t("lineSeparator",null,function(e,n){if(e.doc.lineSep=n,n){var t=[],r=e.doc.first;e.doc.iter(function(e){for(var o=0;;){var i=e.text.indexOf(n,o);if(-1==i)break;o=i+n.length,t.push(nn(r,i))}r++});for(var o=t.length-1;o>=0;o--)mi(e.doc,n,t[o],nn(t[o].line,t[o].ch+n.length))}}),t("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(e,n,t){e.state.specialChars=new RegExp(n.source+(n.test("\t")?"":"|\t"),"g"),t!=wa&&e.refresh()}),t("specialCharPlaceholder",et,function(e){return e.refresh()},!0),t("electricChars",!0),t("inputStyle",v?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),t("spellcheck",!1,function(e,n){return e.getInputField().spellcheck=n},!0),t("autocorrect",!1,function(e,n){return e.getInputField().autocorrect=n},!0),t("autocapitalize",!1,function(e,n){return e.getInputField().autocapitalize=n},!0),t("rtlMoveVisually",!k),t("wholeLineUpdateBefore",!0),t("theme","default",function(e){Ta(e),go(e)},!0),t("keyMap","default",function(e,n,t){var r=Qi(n),o=t!=wa&&Qi(t);o&&o.detach&&o.detach(e,r),r.attach&&r.attach(e,o||null)}),t("extraKeys",null),t("configureMouse",null),t("lineWrapping",!1,La,!0),t("gutters",[],function(e,n){e.display.gutterSpecs=fo(n,e.options.lineNumbers),go(e)},!0),t("fixedGutter",!0,function(e,n){e.display.gutters.style.left=n?sr(e.display)+"px":"0",e.refresh()},!0),t("coverGutterNextToScrollbar",!1,function(e){return jr(e)},!0),t("scrollbarStyle","native",function(e){qr(e),jr(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)},!0),t("lineNumbers",!1,function(e,n){e.display.gutterSpecs=fo(e.options.gutters,n),go(e)},!0),t("firstLineNumber",1,go,!0),t("lineNumberFormatter",function(e){return e},go,!0),t("showCursorWhenSelecting",!1,vr,!0),t("resetSelectionOnContextMenu",!0),t("lineWiseCopyCut",!0),t("pasteLinesPerSelection",!0),t("selectionsMayTouch",!1),t("readOnly",!1,function(e,n){"nocursor"==n&&(Lr(e),e.display.input.blur()),e.display.input.readOnlyChanged(n)}),t("disableInput",!1,function(e,n){n||e.display.input.reset()},!0),t("dragDrop",!0,Sa),t("allowDropFileTypes",null),t("cursorBlinkRate",530),t("cursorScrollMargin",0),t("cursorHeight",1,vr,!0),t("singleCursorHeightPerLine",!0,vr,!0),t("workTime",100),t("workDelay",100),t("flattenSpans",!0,Eo,!0),t("addModeClass",!1,Eo,!0),t("pollInterval",100),t("undoDepth",200,function(e,n){return e.doc.history.undoDepth=n}),t("historyEventDelay",1250),t("viewportMargin",10,function(e){return e.refresh()},!0),t("maxHighlightLength",1e4,Eo,!0),t("moveInputWithCursor",!0,function(e,n){n||e.display.input.resetPosition()}),t("tabindex",null,function(e,n){return e.display.input.getField().tabIndex=n||""}),t("autofocus",null),t("direction","ltr",function(e,n){return e.doc.setDirection(n)},!0),t("phrases",null)}(Oa),function(e){var n=e.optionHandlers,t=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,t){var r=this.options,o=r[e];r[e]==t&&"mode"!=e||(r[e]=t,n.hasOwnProperty(e)&&eo(this,n[e])(this,t,o),me(this,"optionChange",this,e))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,n){this.state.keyMaps[n?"push":"unshift"](Qi(e))},removeKeyMap:function(e){for(var n=this.state.keyMaps,t=0;tt&&(Aa(this,o.head.line,e,!0),t=o.head.line,r==this.doc.sel.primIndex&&Er(this));else{var i=o.from(),a=o.to(),s=Math.max(t,i.line);t=Math.min(this.lastLine(),a.line-(a.ch?0:1))+1;for(var l=s;l0&&$o(this.doc,r,new xo(i,c[r].to()),z)}}}),getTokenAt:function(e,n){return kn(this,e,n)},getLineTokens:function(e,n){return kn(this,nn(e),n,!0)},getTokenTypeAt:function(e){e=cn(this.doc,e);var n,t=fn(this,Ve(this.doc,e.line)),r=0,o=(t.length-1)/2,i=e.ch;if(0==i)n=t[2];else for(;;){var a=r+o>>1;if((a?t[2*a-1]:0)>=i)o=a;else{if(!(t[2*a+1]i&&(e=i,o=!0),r=Ve(this.doc,e)}else r=e;return qt(this,r,{top:0,left:0},n||"page",t||o).top+(o?this.doc.height-qn(r):0)},defaultTextHeight:function(){return or(this.display)},defaultCharWidth:function(){return ir(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,n,t,r,o){var i,a,s,l=this.display,c=(e=Yt(this,cn(this.doc,e))).bottom,u=e.left;if(n.style.position="absolute",n.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(n),l.sizer.appendChild(n),"over"==r)c=e.top;else if("above"==r||"near"==r){var d=Math.max(l.wrapper.clientHeight,this.doc.height),p=Math.max(l.sizer.clientWidth,l.lineSpace.clientWidth);("above"==r||e.bottom+n.offsetHeight>d)&&e.top>n.offsetHeight?c=e.top-n.offsetHeight:e.bottom+n.offsetHeight<=d&&(c=e.bottom),u+n.offsetWidth>p&&(u=p-n.offsetWidth)}n.style.top=c+"px",n.style.left=n.style.right="","right"==o?(u=l.sizer.clientWidth-n.offsetWidth,n.style.right="0px"):("left"==o?u=0:"middle"==o&&(u=(l.sizer.clientWidth-n.offsetWidth)/2),n.style.left=u+"px"),t&&(i=this,a={left:u,top:c,right:u+n.offsetWidth,bottom:c+n.offsetHeight},null!=(s=Mr(i,a)).scrollTop&&Br(i,s.scrollTop),null!=s.scrollLeft&&Wr(i,s.scrollLeft))},triggerOnKeyDown:no(ua),triggerOnKeyPress:no(pa),triggerOnKeyUp:da,triggerOnMouseDown:no(ga),execCommand:function(e){if(na.hasOwnProperty(e))return na[e].call(null,this)},triggerElectric:no(function(e){Ra(this,e)}),findPosH:function(e,n,t,r){var o=1;n<0&&(o=-1,n=-n);for(var i=cn(this.doc,e),a=0;a0&&a(n.charAt(t-1));)--t;for(;r.5)&&cr(this),me(this,"refresh",this)}),swapDoc:no(function(e){var n=this.doc;return n.cm=null,this.state.selectingText&&this.state.selectingText(),Bo(this,e),Ut(this),this.display.input.reset(),_r(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,ct(this,"swapDoc",this,n),n}),phrase:function(e){var n=this.options.phrases;return n&&Object.prototype.hasOwnProperty.call(n,e)?n[e]:e},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},be(e),e.registerHelper=function(n,r,o){t.hasOwnProperty(n)||(t[n]=e[n]={_global:[]}),t[n][r]=o},e.registerGlobalHelper=function(n,r,o,i){e.registerHelper(n,r,i),t[n]._global.push({pred:o,val:i})}}(Oa);var Ka="iter insert remove copy getEditor constructor".split(" ");for(var Va in Ni.prototype)Ni.prototype.hasOwnProperty(Va)&&F(Ka,Va)<0&&(Oa.prototype[Va]=function(e){return function(){return e.apply(this.doc,arguments)}}(Ni.prototype[Va]));return be(Ni),Oa.inputStyles={textarea:qa,contenteditable:Fa},Oa.defineMode=function(e){Oa.defaults.mode||"null"==e||(Oa.defaults.mode=e),We.apply(this,arguments)},Oa.defineMIME=function(e,n){He[e]=n},Oa.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Oa.defineMIME("text/plain","null"),Oa.defineExtension=function(e,n){Oa.prototype[e]=n},Oa.defineDocExtension=function(e,n){Ni.prototype[e]=n},Oa.fromTextArea=function(e,n){if((n=n?H(n):{}).value=e.value,!n.tabindex&&e.tabIndex&&(n.tabindex=e.tabIndex),!n.placeholder&&e.placeholder&&(n.placeholder=e.placeholder),null==n.autofocus){var t=E();n.autofocus=t==e||null!=e.getAttribute("autofocus")&&t==document.body}function r(){e.value=s.getValue()}var o;if(e.form&&(pe(e.form,"submit",r),!n.leaveSubmitMethodAlone)){var i=e.form;o=i.submit;try{var a=i.submit=function(){r(),i.submit=o,i.submit(),i.submit=a}}catch(e){}}n.finishInit=function(n){n.save=r,n.getTextArea=function(){return e},n.toTextArea=function(){n.toTextArea=isNaN,r(),e.parentNode.removeChild(n.getWrapperElement()),e.style.display="",e.form&&(fe(e.form,"submit",r),"function"==typeof e.form.submit&&(e.form.submit=o))}},e.style.display="none";var s=Oa(function(n){return e.parentNode.insertBefore(n,e.nextSibling)},n);return s},function(e){e.off=fe,e.on=pe,e.wheelEventPixels=To,e.Doc=Ni,e.splitLines=Ee,e.countColumn=W,e.findColumn=K,e.isWordChar=ee,e.Pass=j,e.signal=me,e.Line=Yn,e.changeEnd=Oo,e.scrollbarModel=Gr,e.Pos=nn,e.cmpPos=tn,e.modes=Be,e.mimeModes=He,e.resolveMode=De,e.getMode=Fe,e.modeExtensions=Ue,e.extendMode=je,e.copyState=ze,e.startState=qe,e.innerMode=Ge,e.commands=na,e.keyMap=zi,e.keyName=Xi,e.isModifierKey=Vi,e.lookupKey=Ki,e.normalizeKeyMap=qi,e.StringStream=Ke,e.SharedTextMarker=Oi,e.TextMarker=Si,e.LineWidget=wi,e.e_preventDefault=ke,e.e_stopPropagation=Te,e.e_stop=Ce,e.addClass=_,e.contains=N,e.rmClass=L,e.keyNames=Di}(Oa),Oa.version="5.48.4",Oa}()},function(e,n,t){"use strict";var r=this&&this.__spreadArrays||function(){for(var e=0,n=0,t=arguments.length;n=2,c=l?i:t.length;return{lines:t.slice(0,i).map(function(e){return e.replace(r.INDENTED_PATTERN,"")}),countLinesConsumed:c,hasMultipleTrailingBlankLines:l}}},function(e,n,t){"use strict";var r,o=this&&this.__extends||(r=function(e,n){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t])})(e,n)},function(e,n){function t(){this.constructor=e}r(e,n),e.prototype=null===n?Object.create(n):(t.prototype=n.prototype,new t)});Object.defineProperty(n,"__esModule",{value:!0}),n.Document=void 0;var i=t(1),a=t(19),s=t(74),l=t(7),c=t(27),u=function(e){function n(t,r){void 0===r&&(r=new n.TableOfContents);var o=e.call(this,t)||this;return o.tableOfContents=r,o}return o(n,e),n.create=function(e){var t=n.TableOfContents.createThenAssociateSectionLinksWithEntries(e),r=new n(e,t);return s.insertFootnoteBlocksAndAssignFootnoteReferenceNumbers(r),r},n}(l.OutlineSyntaxNodeContainer);n.Document=u,function(e){var n=function(){function e(e){void 0===e&&(e=[]),this.entries=e}return e.createThenAssociateSectionLinksWithEntries=function(n){for(var t=e.getEntries(n),r=0;rt?"desc":"asc"},e.prototype.descendantsToIncludeInTableOfContents=function(){return i.concat(this.items.map(function(e){return e.descendantsToIncludeInTableOfContents()}))},e.prototype.inlineDescendants=function(){return i.concat(this.items.map(function(e){return e.inlineDescendants()}))},e.prototype.render=function(e){return e.numberedList(this)},e}();n.NumberedList=s,function(e){var n=function(e){function n(n,t){var r=e.call(this,n)||this;return r.children=n,r.NUMBERED_LIST_ITEM=void 0,r.ordinal=null==t?void 0:t.ordinal,r}return o(n,e),n}(a.OutlineSyntaxNodeContainer);e.Item=n}(s=n.NumberedList||(n.NumberedList={})),n.NumberedList=s},function(e,n,t){"use strict";var r,o=this&&this.__extends||(r=function(e,n){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t])})(e,n)},function(e,n){function t(){this.constructor=e}r(e,n),e.prototype=null===n?Object.create(n):(t.prototype=n.prototype,new t)});Object.defineProperty(n,"__esModule",{value:!0}),n.RevealableBlock=void 0;var i=function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n.REVEALABLE_BLOCK=void 0,n}return o(n,e),n.prototype.render=function(e){return e.revealableBlock(this)},n.prototype.descendantsToIncludeInTableOfContents=function(){return[]},n}(t(26).RichOutlineSyntaxNode);n.RevealableBlock=i},function(e,n,t){"use strict";var r,o=this&&this.__extends||(r=function(e,n){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t])})(e,n)},function(e,n){function t(){this.constructor=e}r(e,n),e.prototype=null===n?Object.create(n):(t.prototype=n.prototype,new t)});Object.defineProperty(n,"__esModule",{value:!0}),n.RichOutlineSyntaxNode=void 0;var i=function(e){function n(n,t){var r=e.call(this,n)||this;return r.sourceLineNumber=null==t?void 0:t.sourceLineNumber,r}return o(n,e),n}(t(7).OutlineSyntaxNodeContainer);n.RichOutlineSyntaxNode=i},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.SectionLink=void 0;var r=t(39),o=t(13),i=t(37),a=function(){function e(e,n){this.markupSnippetFromSectionTitle=e,this.entry=n}return e.prototype.referenceMostAppropriateTableOfContentsEntry=function(e){if(this.markupSnippetFromSectionTitle)for(var n=0,t=e.entries;n=this.entireText.length},e.prototype.consume=function(e){var n=e.exec(this._remaining);if(!n)return null;var t=n[0],r=n.slice(1),o=this.entireText[this._index+t.length];return this.advance(t.length),{match:t,charAfterMatch:o,captures:r}},e}();n.TextConsumer=r},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Token=void 0;var r=function(){function e(e,n){this.role=e,this.value=n}return e.prototype.enclosesContentBetweenItselfAnd=function(e){this.correspondingEnclosingToken=e,e.correspondingEnclosingToken=this},e}();n.Token=r},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.tryToParseBlockquote=void 0;var r=t(0),o=t(5),i=t(59),a=t(8),s=t(3);n.tryToParseBlockquote=function(e){for(var n=new s.LineConsumer(e.markupLines),t=[];;){var r=n.consumeLineIfMatches(l);if(!r)break;t.push(r.line.replace(l,""))}if(!t.length)return null;var o=a.getOutlineSyntaxNodes({markupLines:t,sourceLineNumber:e.sourceLineNumber,headingLeveler:e.headingLeveler,settings:e.settings});return{parsedNodes:[new i.Blockquote(o)],countLinesConsumed:n.countLinesConsumed()}};var l=r.patternStartingWith(o.ANY_OPTIONAL_WHITESPACE+">"+r.optional(" "))},function(e,n,t){"use strict";var r,o=this&&this.__extends||(r=function(e,n){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t])})(e,n)},function(e,n){function t(){this.constructor=e}r(e,n),e.prototype=null===n?Object.create(n):(t.prototype=n.prototype,new t)});Object.defineProperty(n,"__esModule",{value:!0}),n.Blockquote=void 0;var i=function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n.BLOCKQUOTE=void 0,n}return o(n,e),n.prototype.render=function(e){return e.blockquote(this)},n}(t(26).RichOutlineSyntaxNode);n.Blockquote=i},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.tryToParseBulletedList=void 0;var r=t(0),o=t(5),i=t(20),a=t(17),s=t(8),l=t(3);n.tryToParseBulletedList=function(e){for(var n=new l.LineConsumer(e.markupLines),t=[];!n.done();){var r=[],o=e.sourceLineNumber+n.countLinesConsumed(),u=n.consumeLineIfMatches(c);if(!u)break;r.push(u.line.replace(c,""));var d=a.getIndentedBlock(n.remaining()),p=!1;if(d&&(r.push.apply(r,d.lines),n.advance(d.countLinesConsumed),p=d.hasMultipleTrailingBlankLines),t.push(new i.BulletedList.Item(s.getOutlineSyntaxNodes({markupLines:r,sourceLineNumber:o,headingLeveler:e.headingLeveler,settings:e.settings}))),p)break}return t.length?{parsedNodes:[new i.BulletedList(t)],countLinesConsumed:n.countLinesConsumed()}:null};var c=r.patternStartingWith(r.optional(" ")+r.anyCharFrom("*","-","•")+o.INLINE_WHITESPACE_CHAR)},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.tryToParseCodeBlock=void 0;var r=t(0),o=t(62),i=t(3);n.tryToParseCodeBlock=function(e){var n=new i.LineConsumer(e.markupLines),t=n.consumeLineIfMatches(a);if(!t)return null;for(var r=t.line.trim(),l=[];!n.done();){var c=n.consumeLineIfMatches(a);if(c){var u=c.line.trim();if(u.length===r.length)break;l.push(u)}else l.push(n.consumeLine())}return{parsedNodes:[new o.CodeBlock(l.join(s))],countLinesConsumed:n.countLinesConsumed()}};var a=r.streakOf("`"),s="\n"},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.CodeBlock=void 0;var r=function(){function e(e,n){this.code=e,this.sourceLineNumber=null==n?void 0:n.sourceLineNumber}return e.prototype.descendantsToIncludeInTableOfContents=function(){return[]},e.prototype.inlineDescendants=function(){return[]},e.prototype.render=function(e){return e.codeBlock(this)},e}();n.CodeBlock=r},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.INTEGER=n.tryToParseNumberedList=void 0;var r=t(0),o=t(5),i=t(2),a=t(24),s=t(17),l=t(8),c=t(3);n.tryToParseNumberedList=function(e){for(var n,t=new c.LineConsumer(e.markupLines),r=[];!t.done();){var o=t.countLinesConsumed(),d=t.consumeLineIfMatches(p,{andIf:function(e){return!i.DIVIDER_STREAK_PATTERN.test(e.line)}});if(!d)break;var m=d.captures[0],g=new u({bullet:m,firstLineOfMarkup:d.line.replace(p,""),sourceLineNumber:e.sourceLineNumber+o}),v=s.getIndentedBlock(t.remaining()),y=!1;if(v&&((n=g.markupLines).push.apply(n,v.lines),t.advance(v.countLinesConsumed),y=v.hasMultipleTrailingBlankLines),r.push(g),y)break}if(!function(e){var n=e.length;return n>0&&(n>1||!h.test(e[0].bullet))}(r))return null;var b=r.map(function(n){var t=l.getOutlineSyntaxNodes({markupLines:n.markupLines,sourceLineNumber:n.sourceLineNumber,headingLeveler:e.headingLeveler,settings:e.settings}),r=function(e){var n=f.exec(e.bullet);return n?parseInt(n[0],10):void 0}(n);return new a.NumberedList.Item(t,{ordinal:r})});return{parsedNodes:[new a.NumberedList(b)],countLinesConsumed:t.countLinesConsumed()}};var u=function(e){this.bullet=e.bullet,this.markupLines=[e.firstLineOfMarkup],this.sourceLineNumber=e.sourceLineNumber};n.INTEGER=r.optional(r.escapeForRegex("-"))+r.oneOrMore(o.DIGIT);var d=r.either("#",r.capture(r.either(n.INTEGER,"#")+r.anyCharFrom(".",")"))),p=r.patternStartingWith(r.optional(" ")+d+o.INLINE_WHITESPACE_CHAR),h=r.patternStartingWith(n.INTEGER+"\\."),f=new RegExp(n.INTEGER)},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.tryToParseThematicBreakStreak=void 0;var r=t(2),o=t(34),i=t(3);n.tryToParseThematicBreakStreak=function(e){var n=new i.LineConsumer(e.markupLines);return n.consumeLineIfMatches(r.DIVIDER_STREAK_PATTERN)?{parsedNodes:e.mostRecentSibling instanceof o.ThematicBreak?[]:[new o.ThematicBreak],countLinesConsumed:n.countLinesConsumed()}:null}},function(e,n,t){"use strict";var r,o=this&&this.__extends||(r=function(e,n){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t])})(e,n)},function(e,n){function t(){this.constructor=e}r(e,n),e.prototype=null===n?Object.create(n):(t.prototype=n.prototype,new t)});Object.defineProperty(n,"__esModule",{value:!0}),n.InlineDocument=void 0;var i=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return o(n,e),n.prototype.INLINE_DOCUMENT=function(){},n}(t(6).InlineSyntaxNodeContainer);n.InlineDocument=i},function(e,n,t){"use strict";function r(e,n){return e.replace(n,function(e){return o[e]})}Object.defineProperty(n,"__esModule",{value:!0}),n.escapeHtmlAttrValue=n.escapeHtmlContent=void 0,n.escapeHtmlContent=function(e){return r(e,/[&<]/g)},n.escapeHtmlAttrValue=function(e){return r(String(e),/[&"]/g)};var o={"&":"&","<":"<",'"':"""}},function(e,n){e.exports={parsing:{createSourceMap:!0},rendering:{idPrefix:""}}},function(e,n,t){var r=t(69);"string"==typeof r&&(r=[[e.i,r,""]]);var o={insert:"head",singleton:!1};t(71)(r,o);r.locals&&(e.exports=r.locals)},function(e,n,t){(e.exports=t(70)(!1)).push([e.i,'/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace, monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}#tab-container{align-items:center;display:flex;height:44px}#documentation-container{margin-left:510px;padding:0 15px}#documentation-container #table-of-contents{display:none}#documentation-container #documentation,#documentation-container #table-of-contents{margin:0 auto;max-width:580px;overflow-x:hidden}@media only screen and (min-width: 981px){#editor-container{border-right:1px solid #aaa;position:fixed;left:0;top:0;width:510px}#editor-container .CodeMirror{height:100vh}}@media only screen and (max-width: 980px){#editor-container{display:none}#documentation-container{margin-left:0}}.CodeMirror{font-size:14px;line-height:1.3;font-family:Menlo,Consolas,monospace !important}.CodeMirror .CodeMirror-scroll{-webkit-overflow-scrolling:touch}#tab-container{display:flex;justify-content:center}#tab-container span[role="tab"]{box-shadow:0 1px 3px rgba(0,0,0,0.12),0 1px 2px rgba(0,0,0,0.24);background-color:#c00;border-radius:3px;color:white;cursor:pointer;display:inline-block;font-size:75%;margin:10px 0;padding:7px 12px 5px 12px;text-transform:uppercase;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#tab-container span[role="tab"]:hover{background:#b00}#tab-container span[role="tab"]:active{background:#a00}#tab-container span[role="tab"][aria-selected="true"]{display:none}#documentation-container{font:1em/1.6 -apple-system,BlinkMacSystemFont,sans-serif}#documentation-container #table-of-contents{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#documentation-container #table-of-contents h1,#documentation-container #table-of-contents h2,#documentation-container #table-of-contents h3,#documentation-container #table-of-contents h4,#documentation-container #table-of-contents h5,#documentation-container #table-of-contents h6,#documentation-container #table-of-contents [role="heading"]{font-weight:normal;font-size:100%;margin:0;padding:0}#documentation-container #table-of-contents kbd{border-color:#aaa;box-shadow:0 .25em 0 rgba(13,13,13,0.2),.125em .25em 0 rgba(13,13,13,0.2),-.125em .25em 0 rgba(13,13,13,0.2);color:#444}#documentation-container #table-of-contents code{text-decoration:none}#documentation-container #table-of-contents small{display:none}#documentation-container #table-of-contents h1,#documentation-container #table-of-contents h2{font-weight:bold}#documentation-container #table-of-contents h1 small,#documentation-container #table-of-contents h2 small{display:inline}#documentation-container #table-of-contents a{box-sizing:border-box;color:black;display:inline-block;padding:3px 0 0 270px;text-decoration:none;width:100%}@media only screen and (max-width: 420px){#documentation-container #table-of-contents a{padding-left:180px}}#documentation-container #table-of-contents a:hover{text-decoration:underline}#documentation-container #table-of-contents h1 a{padding-left:0}@media only screen and (max-width: 420px){#documentation-container #table-of-contents h1 a{padding-left:0}}#documentation-container #table-of-contents h2 a{padding-left:0px}@media only screen and (max-width: 420px){#documentation-container #table-of-contents h2 a{padding-left:0px}}#documentation-container #table-of-contents h3 a{padding-left:30px}@media only screen and (max-width: 420px){#documentation-container #table-of-contents h3 a{padding-left:20px}}#documentation-container #table-of-contents h4 a{padding-left:60px}@media only screen and (max-width: 420px){#documentation-container #table-of-contents h4 a{padding-left:40px}}#documentation-container #table-of-contents h5 a{padding-left:90px}@media only screen and (max-width: 420px){#documentation-container #table-of-contents h5 a{padding-left:60px}}#documentation-container #table-of-contents h6 a{padding-left:120px}@media only screen and (max-width: 420px){#documentation-container #table-of-contents h6 a{padding-left:80px}}#documentation-container #table-of-contents [aria-level="7"] a{padding-left:150px}@media only screen and (max-width: 420px){#documentation-container #table-of-contents [aria-level="7"] a{padding-left:100px}}#documentation-container #table-of-contents [aria-level="8"] a{padding-left:180px}@media only screen and (max-width: 420px){#documentation-container #table-of-contents [aria-level="8"] a{padding-left:120px}}#documentation-container #table-of-contents [aria-level="9"] a{padding-left:210px}@media only screen and (max-width: 420px){#documentation-container #table-of-contents [aria-level="9"] a{padding-left:140px}}#documentation-container #table-of-contents [aria-level="10"] a{padding-left:240px}@media only screen and (max-width: 420px){#documentation-container #table-of-contents [aria-level="10"] a{padding-left:160px}}#documentation-container #table-of-contents h1 a{padding-top:25px;padding-bottom:6px}#documentation-container #table-of-contents h2 a{padding-top:10px}#documentation-container blockquote{border-left:20px solid #ddd;background-color:#fcfcfc;margin:15px 0;padding:5px 20px}#documentation-container blockquote blockquote{border-color:#d3d3d3;background-color:#f2f2f2}#documentation-container blockquote blockquote blockquote{border-color:#c9c9c9;background-color:#e8e8e8}#documentation-container blockquote blockquote blockquote blockquote{border-color:#bebebe;background-color:#ddd}#documentation-container pre,#documentation-container code{background:#234;color:white;font-family:Menlo,Consolas,monospace;font-size:87.5%}#documentation-container .up-inline-code{box-shadow:0 1px 3px rgba(0,0,0,0.12),0 1px 2px rgba(0,0,0,0.24);border-radius:.125em;font-weight:normal;margin:0 .0625em;padding:0 .2em;white-space:pre}#documentation-container a code{text-decoration:underline}#documentation-container a:hover code{text-decoration:none}#documentation-container pre{box-shadow:0 3px 6px rgba(0,0,0,0.16),0 3px 6px rgba(0,0,0,0.23);border-radius:.1875em;line-height:1.5;margin:20px 0;overflow-x:auto;padding:7px 9px}@media only screen and (max-width: 420px){#documentation-container pre{font-size:85%;line-height:1.4}}#documentation-container pre>code{box-shadow:none;border-radius:0;padding:0}#documentation-container dl{margin-bottom:25px}#documentation-container dl dl{margin-bottom:0}#documentation-container dl dt{color:#000;font-family:-apple-system,BlinkMacSystemFont,sans-serif;font-weight:bold}#documentation-container dl dd{margin-left:20px}#documentation-container dl+dl{margin-top:45px}#documentation-container i i,#documentation-container i em,#documentation-container em i,#documentation-container em em,#documentation-container caption i,#documentation-container caption em{display:inline-block;transform:skewX(-20deg)}#documentation-container kbd{border-color:#aaa;box-shadow:0 .25em 0 rgba(13,13,13,0.2),.125em .25em 0 rgba(13,13,13,0.2),-.125em .25em 0 rgba(13,13,13,0.2);color:#444;border-radius:.25em;border-style:solid;border-width:.125em;display:inline-block;font-family:-apple-system,BlinkMacSystemFont,sans-serif;font-size:70%;line-height:1.4;margin:0 .1em;padding:.1em .6em;text-shadow:0 .1em 0 white;white-space:nowrap}#documentation-container a kbd{border-color:#579;box-shadow:0 .25em 0 rgba(85,119,153,0.3),.125em .25em 0 rgba(85,119,153,0.3),-.125em .25em 0 rgba(85,119,153,0.3);color:#579}#documentation-container .up-footnote-reference a{font-size:110%;margin-left:.125em;text-decoration:none}#documentation-container .up-footnote-reference a:before{content:\'[\'}#documentation-container .up-footnote-reference a:after{content:\']\'}#documentation-container .up-footnotes{font-size:85%}#documentation-container .up-footnotes dt{font-weight:normal}#documentation-container .up-footnotes dt a:before{content:\'↑\'}#documentation-container img{max-width:100%}#documentation-container h1,#documentation-container h2,#documentation-container h3,#documentation-container h4,#documentation-container h5,#documentation-container h6,#documentation-container [role="heading"]{color:#000;font-family:-apple-system,BlinkMacSystemFont,sans-serif;line-height:1.5;overflow-x:auto;padding-top:10px}#documentation-container h1{font-size:180%;padding-bottom:15px;text-align:center}#documentation-container h2{font-size:140%}#documentation-container h3{font-size:120%}#documentation-container h4{font-size:110%}#documentation-container h5{font-size:100%}#documentation-container h6{font-size:90%}#documentation-container [role="heading"]{font-size:60%;margin:1.5em 0}#documentation-container [aria-level="7"]{font-size:85%}#documentation-container [aria-level="8"]{font-size:80%}#documentation-container [aria-level="9"]{font-size:75%}#documentation-container [aria-level="10"]{font-size:70%}#documentation-container mark{background-color:yellow;padding:.0625em}#documentation-container mark mark{background-color:gold}#documentation-container mark mark mark{background-color:orange}#documentation-container q{margin:0 .0625em;quotes:\'“\' \'”\' "‘" "’"}#documentation-container q:before,#documentation-container q:after{font-family:serif}#documentation-container q:before{content:open-quote}#documentation-container q:after{content:close-quote}#documentation-container .up-lines{text-align:center}#documentation-container .up-lines+.up-lines{margin-top:20px}#documentation-container .up-lines>div{margin-bottom:5px}#documentation-container a{color:#579}#documentation-container a:hover{text-decoration:none}#documentation-container ul+ul{margin-top:40px}#documentation-container ol+ol{margin-top:40px}#documentation-container small{font-size:100%;opacity:.5}#documentation-container .up-square-brackets{font-style:italic}@-webkit-keyframes reveal{0%{opacity:1}30%{opacity:.5}100%{opacity:1}}@keyframes reveal{0%{opacity:1}30%{opacity:.5}100%{opacity:1}}#documentation-container .up-revealable>label{box-shadow:0 1px 3px rgba(0,0,0,0.12),0 1px 2px rgba(0,0,0,0.24);background-color:#c00;border-radius:3px;color:white;cursor:pointer;display:inline-block;font-size:75%;margin:10px 0;padding:7px 12px 5px 12px;text-transform:uppercase;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#documentation-container .up-revealable>label:hover{background:#b00}#documentation-container .up-revealable>label:active{background:#a00}#documentation-container .up-revealable>input[type="radio"]{display:none}#documentation-container .up-revealable>input[type="radio"] ~ span,#documentation-container .up-revealable>input[type="radio"] ~ div{display:none}#documentation-container .up-revealable>input[type="radio"].up-hide:checked+label{display:none}#documentation-container .up-revealable>input[type="radio"].up-reveal:checked+label{display:none}#documentation-container .up-revealable>input[type="radio"].up-reveal:checked ~ span,#documentation-container .up-revealable>input[type="radio"].up-reveal:checked ~ div{-webkit-animation:1s reveal;animation:1s reveal}#documentation-container .up-revealable>input[type="radio"].up-reveal:checked ~ span{display:inline}#documentation-container .up-revealable>input[type="radio"].up-reveal:checked ~ div{display:block}#documentation-container .up-revealable>div{margin-left:20px}#documentation-container span.up-revealable>label{box-shadow:0 1px 3px rgba(0,0,0,0.12),0 1px 2px rgba(0,0,0,0.24);background-color:#c00;border-radius:3px;color:white;cursor:pointer;display:inline-block;font-size:75%;margin:10px 0;padding:7px 12px 5px 12px;text-transform:uppercase;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:inline;font-size:65%;margin:0 5px;padding:4px 12px 3px 12px}#documentation-container span.up-revealable>label:hover{background:#b00}#documentation-container span.up-revealable>label:active{background:#a00}#documentation-container div.up-revealable>label{box-shadow:0 1px 3px rgba(0,0,0,0.12),0 1px 2px rgba(0,0,0,0.24);background-color:#c00;border-radius:3px;color:white;cursor:pointer;display:inline-block;font-size:75%;margin:10px 0;padding:7px 12px 5px 12px;text-transform:uppercase;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#documentation-container div.up-revealable>label:hover{background:#b00}#documentation-container div.up-revealable>label:active{background:#a00}#documentation-container table{border-collapse:collapse;margin:20px 0}@media only screen and (max-width: 420px){#documentation-container table{font-size:80%}}#documentation-container table caption{font-style:italic}#documentation-container table tbody tr:hover td{background:#ddd}#documentation-container table tbody tr:nth-child(even) td{background-color:#eee}#documentation-container table tbody tr:nth-child(even):hover td{background-color:#ccc}#documentation-container table tbody tr:nth-child(even):hover td{border-color:#999}#documentation-container table td,#documentation-container table th{padding:10px;border:1px solid #bbb}#documentation-container table td.up-numeric,#documentation-container table th.up-numeric{text-align:right}#documentation-container table td[colspan],#documentation-container table th[colspan]{text-align:center}#documentation-container table th{border:0;color:#000;font-family:-apple-system,BlinkMacSystemFont,sans-serif}#documentation-container table th[scope="row"]{text-align:right}#documentation-container hr{border:0;padding-bottom:30px;text-align:center}#documentation-container hr:after{color:#ccc;content:\'☆ ☆ ☆\';font-size:10px}@media speech, braille{#documentation-container hr:after{content:none}}#documentation-container video{max-width:100%}@-webkit-keyframes clean{from{opacity:0.5;transition:0.5s}to{opacity:1}}@keyframes clean{from{opacity:0.5;transition:0.5s}to{opacity:1}}.dirty{opacity:0.5;transition:0.5s}.clean{-webkit-animation:0.2s clean;animation:0.2s clean}.CodeMirror{font-family:monospace;height:300px;color:black}.CodeMirror-lines{padding:4px 0}.CodeMirror pre{padding:0 4px}.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{background-color:white}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:black}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid black;border-right:none;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{width:auto;border:0 !important;background:#7e7}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-animate-fat-cursor{width:auto;border:0;-webkit-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite;background-color:#7e7}@-webkit-keyframes blink{0%{}50%{background-color:transparent}100%{}}@keyframes blink{0%{}50%{background-color:transparent}100%{}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-rulers{position:absolute;left:0;right:0;top:-50px;bottom:-20px;overflow:hidden}.CodeMirror-ruler{border-left:1px solid #ccc;top:0;bottom:0;position:absolute}.cm-s-default .cm-header{color:blue}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:bold}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta{color:#555}.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-s-default .cm-error{color:#f00}.cm-invalidchar{color:#f00}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0f0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#f22}.CodeMirror-matchingtag{background:rgba(255,150,0,0.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden;background:white}.CodeMirror-scroll{overflow:scroll !important;margin-bottom:-30px;margin-right:-30px;padding-bottom:30px;height:100%;outline:none;position:relative}.CodeMirror-sizer{position:relative;border-right:30px solid transparent}.CodeMirror-vscrollbar,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{position:absolute;z-index:6;display:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;min-height:100%;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-30px;*zoom:1;*display:inline}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:none !important;border:none !important}.CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-gutter-wrapper{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre{border-radius:0;border-width:0;background:transparent;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent;font-variant-ligatures:none}.CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;overflow:auto}.CodeMirror-code{outline:none}.CodeMirror-scroll,.CodeMirror-sizer,.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber{box-sizing:content-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-cursor{position:absolute;pointer-events:none}.CodeMirror-measure pre{position:static}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}div.CodeMirror-dragcursors{visibility:visible}.CodeMirror-focused div.CodeMirror-cursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background:#ffa;background:rgba(255,255,0,0.4)}.CodeMirror span{*vertical-align:text-bottom}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:\'\'}span.CodeMirror-selectedtext{background:none}\n',""])},function(e,n,t){"use strict";e.exports=function(e){var n=[];return n.toString=function(){return this.map(function(n){var t=function(e,n){var t=e[1]||"",r=e[3];if(!r)return t;if(n&&"function"==typeof btoa){var o=(a=r,s=btoa(unescape(encodeURIComponent(JSON.stringify(a)))),l="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(s),"/*# ".concat(l," */")),i=r.sources.map(function(e){return"/*# sourceURL=".concat(r.sourceRoot).concat(e," */")});return[t].concat(i).concat([o]).join("\n")}var a,s,l;return[t].join("\n")}(n,e);return n[2]?"@media ".concat(n[2],"{").concat(t,"}"):t}).join("")},n.i=function(e,t){"string"==typeof e&&(e=[[null,e,""]]);for(var r={},o=0;o=0;a--){var c=n[a];if(c.correspondingEnclosingToken.role===o.role){n.splice(a,1);break}i.push(c.correspondingEnclosingToken)}this.closeAndReopenConventionsAroundTokenAtIndex(t,i),t+=2*i.length}}},e.prototype.resolveOverlapping=function(e,n){for(var t=0;t1&&(t.colspan=n.countColumnsSpanned),l.htmlElementWithAlreadyEscapedChildren(e,this.renderEach(n.children),t)},n.prototype.htmlElement=function(e,n,t){return void 0===t&&(t={}),l.htmlElementWithAlreadyEscapedChildren(e,this.renderEach(n),t)},n.prototype.htmlIdOfActualEntryInDocument=function(e){return this.idFor(this.settings.terms.sectionReferencedByTableOfContents,e.ordinalInTableOfContents)},n.prototype.footnoteHtmlId=function(e){return this.idFor(this.settings.terms.footnote,e)},n.prototype.footnoteReferenceHtmlId=function(e){return this.idFor(this.settings.terms.footnoteReference,e)},n.prototype.isUrlAllowed=function(e){return this.settings.renderDangerousContent||!f.test(e)},n.prototype.reset=function(e){this.revealableContentCount=0,this.isInsideLink=!1,this.isInsideTableOfContents=null!=e&&e.isInsideTableOfContents},n}(s.Renderer);function d(e,n){return void 0===n&&(n={}),e.sourceLineNumber&&(n["data-up-source-line"]=e.sourceLineNumber),n}function p(){for(var e=[],n=0;n"}function a(e,t){return"<"+r([e],function(e){return Object.keys(e).sort().map(function(t){return function(e,t){var r=e[t];return r===n.EMPTY_ATTRBUTE_VALUE?t:t+'="'+o.escapeHtmlAttrValue(r)+'"'}(e,t)})}(t)).join(" ")+">"}n.htmlElement=function(e,n,t){return void 0===t&&(t={}),i(e,[o.escapeHtmlContent(n)],t)},n.htmlElementWithAlreadyEscapedChildren=i,n.singleTagHtmlElement=function(e,n){return void 0===n&&(n={}),a(e,n)},n.EMPTY_ATTRBUTE_VALUE=void 0},function(e,n,t){"use strict";t.r(n),n.default='##########\nWhat\'s Up?\n##########\n\nUp is a markup language for writing structured documents in plain text.\n\nFor software developers, Up offers a software library that converts Up markup into HTML. To learn more, please see [topic: using the Up library].\n\n\n\n===========\nWhy use Up?\n===========\n\nUp isn\'t the only markup language that produces HTML. What makes it special?\n\n\nUp uses customizable keywords\n=============================\n\nToo many markup languages devolve into a dense soup of symbols and punctuation.\n\nWhen a keyword would provide more clarity than a symbol, Up takes advantage of that! Several writing conventions, including [topic: tables] and [topic: revealable content], incorporate keywords.\n\nIf you\'re a software developer using the Up library, you can provide multiple custom variations for each keyword. To learn more, please see [topic: customizing keywords].\n\n\nUp has a flexible, forgiving syntax\n===================================\n\nUp recognizes [topic: numbered lists] that count backwards.\n\nMarkup\n ````\n 3) Buy milk\n 2) Buy bread\n #) Buy happiness\n ````\n\nOutput\n 3) Buy milk\n 2) Buy bread\n #) Buy happiness\n\nUp usually ignores [topic: excessive delimiter characters].\n\nFor example, you don\'t need to perfectly balance asterisks when stressing or emphasizing text.\n\nMarkup\n ````\n I ***love****** asterisks!\n ````\n\nOutput\n I ***love****** asterisks!\n\nUp isn\'t picky about which brackets you use for [topic: links].\n\nMarkup\n ````\n - Buy [milk] (en.wikipedia.org/wiki/Milk)\n - Buy (bread) [en.wikipedia.org/wiki/Bread]\n - Buy [sugar] [en.wikipedia.org/wiki/Sugar]\n - Buy (happiness) (en.wikipedia.org/wiki/Happiness)\n ````\n\nOutput\n - Buy [milk] (en.wikipedia.org/wiki/Milk)\n - Buy (bread) [en.wikipedia.org/wiki/Bread]\n - Buy [sugar] [en.wikipedia.org/wiki/Sugar]\n - Buy (happiness) (en.wikipedia.org/wiki/Happiness)\n\nUp even supports [topic: overlapping]!\n\nMarkup\n ````\n John **enjoys ==sleeping** late== whenever he can.\n ````\n\nOutput\n John **enjoys ==sleeping** late== whenever he can.\n\n\nUp produces fully accessible HTML\n=================================\n\nFrom the table of contents to the last movie-ruining spoiler, Up produces fully accessible HTML. This means people who have trouble viewing a screen or a using mouse can enjoy every document.\n\n\n\n=================\nWhy *not* use Up?\n=================\n\nYou want a rich ecosystem of tools\n==================================\n\nSo far, there is only one [software library for Up] (npmjs.com/package/up-lang), written and maintained by a [single person] (github.com/start). In contrast, [other markup languages] (duckduckgo.com/?q=markdown) have countless tools and plugins.\n\n\nYou need speed\n==============\n\nUp is not terribly slow, but it\'s not terribly fast, either---at least not yet! If you need instant, real-time parsing and rendering of large documents, Up isn\'t the best markup language for you.\n\n\n\n###################\nWriting conventions\n###################\n\nDon\'t get lost! The following terms are occasionally used throughout this section.\n\nWriting convention\n Any special annotation or formatting recognized by Up.\n\nInline writing convention\n Any writing convention that can be used within paragraphs. This includes [topic: emphasis] and [topic: highlighting].\n\nOutline writing convention\n Any non-inline writing convention. This includes [topic: paragraphs] and [topic: tables].\n\n\n==========\nParagraphs\n==========\n\nParagraphs are the simplest writing convention in Up.\n\nMarkup\n ````\n Unlike regular dental floss, you can use floss picks even if you\'re not a trained dental hygienist.\n\n Floss picks are sold in stylish, resealable plastic bags. You have no excuse not to buy some today.\n ````\n\nOutput\n Unlike regular dental floss, you can use floss picks even if you\'re not a trained dental hygienist.\n\n Floss picks are sold in stylish, resealable plastic bags. You have no excuse not to buy some today.\n\nTo produce a paragraph, write a line of text. That\'s all there is to it!\n\nTypically, paragraphs are separated by one or two blank lines. Three or more blank lines between paragraphs indicates a meaningful change of subject. To learn more, see [topic: thematic breaks].\n\nIn contrast, *consecutive* non-blank lines produce [topic: line blocks], not consecutive paragraphs.\n\n\n===========\nLine blocks\n===========\n\nUse the line block convention for addresses, lyrics, or anything consisting of *lines* instead of actual [topic: paragraphs].\n\nMarkup\n ````\n Have you read my new poem?\n\n Roses are red\n Violets *aren\'t* blue\n Lyrics have lines\n And addresses do, too\n\n Poetry is just too easy.\n ````\n\nOutput\n Have you read my new poem?\n\n Roses are red\n Violets *aren\'t* blue\n Lyrics have lines\n And addresses do, too\n\n Poetry is just too easy.\n\nConsecutive non-blank lines produce a line block, unless those lines represent another writing convention, like [topic: numbered lists].\n\n\n========\nEmphasis\n========\n\nUse the emphasis convention to emphasize a word or phrase.\n\nIf the reader should pronounce a word or phrase differently (e.g. to indicate contrast or sarcasm), consider emphasizing it.\n\nMarkup\n ````\n Only eat the *green* grapes. The red grapes are for Pikachu.\n ````\n\nOutput\n Only eat the *green* grapes. The red grapes are for Pikachu.\n\nTo emphasize text, enclose it within single asterisks.\n\nLike most inline writing conventions, emphasis can be nested within itself.\n\nMarkup\n ````\n John really, *really, *really** hates Red Delicious apples.\n ````\n\nOutput\n John really, *really, *really** hates Red Delicious apples.\n\n\n======\nStress\n======\n\nUse the stress convention to indicate a word or phrase is particularly important.\n\nIf the reader should raise their voice while reading a word or phrase, consider stressing it.\n\nMarkup\n ````\n Do **not** step on the dinosaur!\n ````\n\nOutput\n Do **not** step on the dinosaur!\n\nTo stress text, enclose it within double asterisks.\n\nLike most inline writing conventions, stress can be nested within itself.\n\nMarkup\n ````\n John really, **really, **really**** hates Red Delicious apples.\n ````\n\nOutput\n John really, **really, **really**** hates Red Delicious apples.\n\n\n=======\nItalics\n=======\n\nUse the italic convention to stylistically offset a word or phrase from the surrounding text *without* conveying emphasis. The titles of books and movies should probably be italicized.\n\nIf you want to emphasize text, see [topic: emphasis].\n\nMarkup\n ````\n My favorite video game is _Chrono Cross_.\n ````\n\nOutput\n My favorite video game is _Chrono Cross_.\n\nTo italicize text, enclose it within single underscores.\n\nLike most inline writing conventions, italicized text can be nested within itself.\n\nMarkup\n ````\n My favorite show is _Real Recipes _Redux_: Super Suppers_.\n ````\n\nOutput\n My favorite show is _Real Recipes _Redux_: Super Suppers_.\n\n\n====\nBold\n====\n\nTypically, people use bold text to convey extra importance---that\'s what the [topic: stress] convention is for!\n\nTo make a word or phrase bold *without* conveying any extra importance, use the plain old bold convention.\n\nMarkup\n ````\n Has anyone actually used __KABOOM__ cleaning products?\n ````\n\nOutput\n Has anyone actually used __KABOOM__ cleaning products?\n\nTo make text bold, enclose it within double underscores.\n\nLike most inline writing conventions, bold text can be nested within itself.\n\nMarkup\n ````\n We\'ve all seen the ads.\n\n __No hard scrubbing! __KABOOM__... and the stains are gone!__\n ````\n\nOutput\n We\'ve all seen the ads.\n\n __No hard scrubbing! __KABOOM__... and the stains are gone!__\n\n\n============\nHighlighting\n============\n\nTo draw attention to text without altering its semantics, using the highlighting convention.\n\nHighlighting should not be used to emphasize or stress text! If that\'s your purpose, see [topic: emphasis] or [topic: stress].\n\nMarkup\n ````\n Our cupcakes are organic, ==gluten-free==, and made using only the most expensive ingredients.\n ````\n\nOutput\n Our cupcakes are organic, ==gluten-free==, and made using only the most expensive ingredients.\n\nTo highlight text, enclose it within two or more equal signs.\n\nLike most inline writing conventions, highlighting can be nested within itself.\n\nMarkup\n ````\n Our cupcakes are ==organic, ==gluten-free==, vegan==, and made using only the most expensive ingredients.\n ````\n\nOutput\n Our cupcakes are ==organic, ==gluten-free==, vegan==, and made using only the most expensive ingredients.\n\n\n=====\nLinks\n=====\n\nYou already know what a link is!\n\nMarkup\n ````\n The [Game Boy] (en.wikipedia.org/wiki/Game_Boy) was my first video game system.\n ````\n\nOutput\n The [Game Boy] (en.wikipedia.org/wiki/Game_Boy) was my first video game system.\n\nA link consists of two parts: content and a URL.\n\nTo produce a link, simply enclose its content in square brackets or parentheses, then enclose its URL in square brackets or parentheses.\n\nYou can use mix and match either type of bracket---they\'re totally interchangeable.\n\nMarkup\n ````\n - Buy [milk] (en.wikipedia.org/wiki/Milk)\n - Buy (bread) [en.wikipedia.org/wiki/Bread]\n - Buy [sugar] [en.wikipedia.org/wiki/Sugar]\n - Buy (happiness) (en.wikipedia.org/wiki/Happiness)\n ````\n\nOutput\n - Buy [milk] (en.wikipedia.org/wiki/Milk)\n - Buy (bread) [en.wikipedia.org/wiki/Bread]\n - Buy [sugar] [en.wikipedia.org/wiki/Sugar]\n - Buy (happiness) (en.wikipedia.org/wiki/Happiness)\n\nAs demonstrated above, you can omit a link\'s URL scheme. [^ `http://` and `https://` are examples of URL schemes.] If you do, Up uses `https://` for the URL scheme.\n\nIf you\'re a software developer using the Up library, you can specify a different default URL scheme. To learn more, see [topic: `defaultUrlScheme`].\n\nOther settings affecting links are:\n\n- [topic: `baseForUrlsStartingWithSlash`]\n- [topic: `baseForUrlsStartingWithHashmark`]\n- [topic: `renderDangerousContent`]\n\n\nLinks with URLs containing spaces\n=================================\n\nIf your link URL contains spaces, Up assumes you *aren\'t* actually trying to produce a link. So it avoids producing one!\n\nMarkup\n ````\n Warlocked is the best game for GameBoy [sic] (other than Pokémon).\n ````\n\nOutput\n Warlocked is the best game for GameBoy [sic] (other than Pokémon).\n\nIf your link URL really does contain spaces, you can make it clear that you intend to produce a link by omitting the space between your link\'s content and its URL.\n\nMarkup\n ````\n I love the [music](duckduckgo.com/?q=chrono cross music) for Chrono Cross.\n ````\n\nOutput\n I love the [music](duckduckgo.com/?q=chrono cross music) for Chrono Cross.\n\nWhen you omit the space between your link\'s content and its URL, Up always produces a link.\n\nThese rules also apply when [topic: linkifying].\n\n\nBare URLs\n=========\n\nAlternatively, if you include a bare URL in your document, Up will automatically produce a link for you.\n\nMarkup\n ````\n https://en.wikipedia.org/wiki/John_Carmack\n ````\n\nOutput\n https://en.wikipedia.org/wiki/John_Carmack\n\n\n=============\nInline quotes\n=============\n\nUp automatically recognizes quoted text.\n\nIf you want to quote more a few sentences, considering using [topic: blockquotes].\n\nMarkup\n ````\n "Only eat the green grapes," John said.\n ````\n\nOutput\n "Only eat the green grapes," John said.\n\nYou already know how to use quotation marks! Just keep doing what you\'re doing.\n\nLike most inline writing conventions, inline quotes can be nested within themselves.\n\nMarkup\n ````\n Bob replied, "Yesterday, Harvey yelled "I\'ll take the case!", but I doubt he will."\n ````\n\nOutput\n Bob replied, "Yesterday, Harvey yelled "I\'ll take the case!", but I doubt he will."\n\n\n==================\nParenthetical text\n==================\n\nUp automatically recognizes parenthetical text.\n\nMarkup\n ````\n When I was ten years old, I left my home (in Pallet Town) to search for Pokémon.\n ````\n\nOutput\n When I was ten years old, I left my home (in Pallet Town) to search for Pokémon.\n\nUp understands that text enclosed within parentheses or square brackets represents supplemental content.\n\n\n==================\nExample user input\n==================\n\nUse the example user input convention to represent user input, including:\n\n- Keys the user should press\n- Buttons the user should click\n- Menu items the user should access\n\nMarkup\n ````\n Press {esc} to quit.\n ````\n\nOutput\n Press {esc} to quit.\n\nTo indicate that text represents user input, enclose the text within curly brackets.\n\nUp ignores any spaces separating the curly brackets from the content they enclose.\n\nMarkup\n ````\n Press { Start Game } when you are ready.\n ````\nOutput\n Press { Start Game } when you are ready.\n\nWithin example user input, most writing conventions are ignored. However, [topic: typographical writing conventions] are supported.\n\n\n===========\nInline code\n===========\n\nUse the inline code convention to represent a small fragment of computer code.\n\nWhen you need to represent more than a small fragment of computer code, use [topic: code blocks] instead.\n\nMarkup\n ````\n In HTML, you probably shouldn\'t use the `` element.\n ````\n\nOutput\n In HTML, you probably shouldn\'t use the `` element.\n\nTo produce inline code, enclose text within an equal number of backticks on either side. You can use any number of backticks---simply make sure both sides match.\n\nMarkup\n ````\n In HTML, you probably shouldn\'t use the ```` element.\n ````\n\nOutput\n In HTML, you probably shouldn\'t use the ```` element.\n\nWithin inline code, other writing conventions are ignored. Characters that normally have special meaning are preserved as plain text.\n\nMarkup\n ````\n In Up, surround text with `*asterisks*` to emphasize it.\n ````\n\nOutput\n In Up, surround text with `*asterisks*` to emphasize it.\n\n\nIncluding backticks in your code\n================================\n\nTo include backticks within inline code, you can precede each backtick with a backslash.\n\nMarkup\n ````\n `let output = \\`score:\\` + 5`\n ````\n\nOutput\n `let output = \\`score:\\` + 5`\n\nFor more information about the behavior of backslashes, see [topic: disabling].\n\nAlternatively, inline code can contain streaks of backticks that aren\'t exactly as long as the inline code\'s outer delimiters. No backslashes are necessary.\n\nIn this example, the delimiters are **1** backtick long, so the inline code can contain streaks of **2** backticks:\n\nMarkup\n ````\n `let output = ``score:`` + 5`\n ````\n\nOutput\n `let output = ``score:`` + 5`\n\nIn this example, the delimiters are **2** backticks long, so the inline code can contain "streaks" of **1** backtick:\n\nMarkup\n ````\n ``let output = `score:` + 5``\n ````\n\nOutput\n ``let output = `score:` + 5``\n\n--------------------------------------\nCode starting or ending with backticks\n--------------------------------------\n\nIf your inline code starts or ends with backticks, place a single space between the offending backticks and the outer delimiter. This single space is trimmed away.\n\nIn this example, the inline code both starts and ends with a backtick:\n\nMarkup\n ````\n `` `inline_code` ``\n ````\n\nOutput\n `` `inline_code` ``\n\nAny spaces beyond that single space are preserved---if there are multiple spaces between the delimiter and the starting/ending backticks, only one space is trimmed away.\n\nMarkup\n ````\n `` `inline_code` ``\n ````\n\nOutput\n `` `inline_code` ``\n\nFurthermore, that single space is only trimmed away when it\'s necessary to separate a delimiter from backticks in your inline code. If a given "side" of inline code has any non-space characters between the delimiter and the outermost backtick, no spaces are trimmed from that side.\n\nMarkup\n ````\n `` (`inline_code`) ``\n ````\n\nOutput\n `` (`inline_code`) ``\n\n\n========\nHeadings\n========\n\nUse headings to introduce a new section in the document.\n\nMarkup\n ````\n Example heading\n ===============\n ````\n\nOutput\n Example heading\n ===============\n\nIf text is underlined, it\'s treated as a heading. The underline can consist of any combination of the following characters (you can mix and match):\n\n- Hyphens: `-`\n- Number signs: `#`\n- Equal signs: `=`\n- Plus signs: `+`\n- Tildes: `~`\n- Colons: `:`\n- Asterisks: `*`\n- At signs: `@`\n\nA heading\'s underline must be at least three characters long, but it does *not* need to be the same length as the text of the heading.\n\nMarkup\n ````\n Example heading with a short underline\n ===\n ````\n\nOutput\n Example heading with a short underline\n ===\n\n\nHeading levels\n==============\n\nThe first heading in a document is always a top-level heading. All subsequent headings with underlines consisting of the same characters are considered top-level.\n\nThe first heading with a different combination of underline characters is considered a second-level heading. Unsurprisingly, all subsequent headings with underlines consisting of the same characters are also considered second-level.\n\nThis process continues _ad infinitum_. Every new combination of heading underline characters introduces a new heading level. There is no limit to the number of heading levels in a document.\n\n\nHeadings with "overlines"\n=========================\n\nA heading can have an optional "overline", but its overline must consist of the same combination of characters as its underline.\n\nMarkup\n ````\n --------------------------------\n Example heading with an overline\n --------------------------------\n ````\n\nOutput\n --------------------------------\n Example heading with an overline\n --------------------------------\n\nFor the purpose of determining heading levels, a heading with an overline is always considered distinct from a heading without one, even if both headings use the same combination of underline characters.\n\nTherefore, a heading with an overline will never have the same level as a heading without an overline.\n\n\n=============\nSection links\n=============\n\nUse the section link convention to link to another section (heading) in your document.\n\nMarkup\n ````\n Up even supports [topic: overlapping]!\n ````\n\nOutput\n Up even supports [topic: overlapping]!\n\nTo link to a heading, choose a unique snippet of markup from that heading\'s content line. [^ Don\'t worry about the heading\'s underline or overline! Section links ignore both.] Enclose that markup snippet within square brackets or parentheses, then insert `topic:` or `section:` directly inside your opening bracket.\n\nUp automatically matches your snippet to the most appropriate heading, then produces a link for you.\n\n\nMatching the most appropriate heading\n=====================================\n\nInitially, Up tries to match your section link to the first heading whose content line\'s markup *exactly matches* your snippet. [^ Up totally ignores the capitalization of section links\' markup snippets, so a section link and a heading can be an "exact match" without being capitalized the same way.] If there isn\'t an exact match, Up matches your section link to the first heading whose content line markup *contains* your snippet.\n\n\n=========\nFootnotes\n=========\n\nUse the footnote convention for asides or citations---anything you want to say without breaking the flow of a paragraph.\n\nFootnotes are automatically extracted into blocks for you.\n\nMarkup\n ````\n Warlocked [^ No relation to Warcraft!] is a real-time strategy game.\n ````\n\nOutput\n Warlocked [^ No relation to Warcraft!] is a real-time strategy game.\n\nTo produce a footnote, enclose its content within parentheses or square brackets. Then, insert a caret `^` directly after your opening bracket.\n\n\n=====\nMedia\n=====\n\nUp allows you to embed [topic: images], [topic: video], or [topic: audio] in your document.\n\n\nImages\n======\n\nMarkup\n ````\n [image: Super Mario Land box art] (i.imgur.com/TxlFlkX.jpg)\n ````\n\nOutput\n [image: Super Mario Land box art] (i.imgur.com/TxlFlkX.jpg)\n\nIf you want to link your image to another page, please see [topic: linkifying].\n\n\nVideo\n=====\n\nMarkup\n ````\n [video: Professor Leonard] (i.imgur.com/32fBpnh.mp4)\n ````\n\nOutput\n [video: Professor Leonard] (i.imgur.com/32fBpnh.mp4)\n\n\nAudio\n=====\n\nMarkup\n ````\n [audio: Sadness theme from Infinity for Game Boy] (a.clyp.it/ybct5hcl.mp3)\n ````\n\nOutput\n [audio: Sadness theme from Infinity for Game Boy] (a.clyp.it/ybct5hcl.mp3)\n\n\nSyntax\n======\n\nTo embed media in your document, simply enclose its description in square brackets or parentheses, then enclose its URL in square brackets or parentheses.\n\nYou can use mix and match either type of bracket---they\'re totally interchangeable.\n\n------------------\nMedia descriptions\n------------------\n\nMedia descriptions always start with `image:`, `audio:`, or `video:`, depending on the type of media you wish to include.\n\nWithin media descriptions, most writing conventions are ignored. However, [topic: typographical writing conventions] are supported.\n\n----------\nMedia URLs\n----------\n\nAs demonstrated above, you can omit the URL scheme for media URLs. If you do, Up uses `https://` for the URL scheme.\n\nIf you\'re a software developer using the Up library, you can specify a different default URL scheme. To learn more, see [topic: `defaultUrlScheme`].\n\nOther settings affecting media are:\n\n- [topic: `baseForUrlsStartingWithSlash`]\n- [topic: `baseForUrlsStartingWithHashmark`]\n- [topic: `renderDangerousContent`]\n\n\n==================\nRevealable content\n==================\n\nBoth [topic: inline revealables] and [topic: revealable blocks] recognize any of the following keywords:\n\n- `spoiler`\n- `nsfw`\n- `nsfl`\n- `revealable`\n\nLike all keywords in Up, you can capitalize them however you want.\n\n\nInline revealables\n==================\n\nUse the inline revealable convention to hide content within a paragraph.\n\nWhen you want to hide more than a sentence or two, use [topic: revealable blocks] instead.\n\nMarkup\n ````\n At the end of Pokémon Red, [SPOILER: you battle your rival] before the credits roll.\n ````\n\nOutput\n At the end of Pokémon Red, [SPOILER: you battle your rival] before the credits roll.\n\nTo hide content within a paragraph, first enclose that content within square brackets or parentheses.\n\nThen, directly inside your opening bracket, insert one of the revealable keywords followed by a colon: `spoiler:`, `nsfw:`, `nsfl:`, or `revealable:`.\n\nInline revealables can contain any inline writing convention.\n\n\nRevealable blocks\n==================\n\nUse revealable block convention to hide a block of content.\n\nWhen you want to hide content within a paragraph, use [topic: inline revealables] instead.\n\nMarkup\n ````\n SPOILER:\n After defeating the Elite Four at the end of Pokémon Red, you still have to battle your rival one last time.\n\n Your rival\'s specific lineup depends on the Pokémon you selected at the beginning of the game. However, his first three Pokémon are always the same:\n\n 1. Pidgeot\n 2. Alakazam\n 3. Rhydon\n ````\n\nOutput\n SPOILER:\n After defeating the Elite Four at the end of Pokémon Red, you still have to battle your rival one last time.\n\n Your rival\'s specific lineup depends on the Pokémon you selected at the beginning of the game. However, his first three Pokémon are always the same:\n\n 1. Pidgeot\n 2. Alakazam\n 3. Rhydon\n\nTo hide a block of content, first indent it two spaces (or a tab).\n\nThen, on the line *before* your indented block, put one of the revealable keywords: `spoiler`, `nsfw`, `nsfl`, or `revealable`.\n\nIn the example above, the chosen revealable keyword (`spoiler`) is followed by a colon. The colon is optional.\n\n\n===========\nBlockquotes\n===========\n\nUse the blockquote convention to quote a large section of text.\n\nFor typical dialog, you should probably use [topic: inline quotes] instead.\n\nMarkup\n ````\n > I hate oranges for the following reasons:\n >\n > 1. They\'re not apples.\n > 2. They\'re not bananas.\n ````\n\nOutput\n > I hate oranges for the following reasons:\n >\n > 1. They\'re not apples.\n > 2. They\'re not bananas.\n\nA blockquote consists of consecutive lines starting with `> ` (a greater-than symbol followed by a space).\n\nBlockquotes can contain any outline writing convention, including other blockquotes.\n\nMarkup\n ````\n > Thank you for replying to my blog!\n >\n > > I hate oranges for the following reasons:\n > >\n > > 1. They\'re not apples.\n > > 2. They\'re not bananas.\n >\n > I completely understand.\n ````\n\nOutput\n > Thank you for replying to my blog!\n >\n > > I hate oranges for the following reasons:\n > >\n > > 1. They\'re not apples.\n > > 2. They\'re not bananas.\n >\n > I completely understand.\n\n\n===============\nThematic breaks\n===============\n\nUse the thematic break convention to represent a change of subject.\n\nA thematic break can be represented by 3 or more consecutive blank lines.\n\nMarkup\n ````\n I vowed never to eat apples again.\n\n\n\n By mid-March, a second flock of birds had moved into my dining room.\n ````\n\nOutput\n I vowed never to eat apples again.\n\n\n\n By mid-March, a second flock of birds had moved into my dining room.\n\nA thematic break can *also* be represented by a line consisting of 3 or more of the following characters:\n\n- Hyphens: `-`\n- Number signs: `#`\n- Equal signs: `=`\n- Plus signs: `+`\n- Tildes: `~`\n- Colons: `:`\n- Asterisks: `*`\n- At signs: `@`\n\nYou can use any combination of those characters!\n\nMarkup\n ````\n I vowed never to eat apples again.\n\n #=*=*=*=*=*=*=*=*=*=#\n\n By mid-March, a second flock of birds had moved into my dining room.\n ````\n\nOutput\n I vowed never to eat apples again.\n\n #=*=*=*=*=*=*=*=*=*=#\n\n By mid-March, a second flock of birds had moved into my dining room.\n\n\n==============\nBulleted lists\n==============\n\nYou already know what a bulleted list is!\n\nMarkup\n ````\n - Buy milk\n - Buy bread\n - Buy happiness\n ````\n\nOutput\n - Buy milk\n - Buy bread\n - Buy happiness\n\n\nBullets\n=======\n\nIn a bulleted list, each item starts with a bullet character followed by a space. The following characters can serve as a bullet:\n\n- A hyphen: `-`\n- An asterisk: `*`\n- An actual bullet character: `•`\n\n\nSpacing between list items\n==========================\n\nEach bulleted list item can be followed by a single blank line.\n\nMarkup\n ````\n - Buy milk\n\n - Buy bread\n\n - Buy happiness\n ````\n\nOutput\n - Buy milk\n\n - Buy bread\n\n - Buy happiness\n\nOn the other hand, if a list item is followed by 2 blank lines, it marks the end of the list.\n\nMarkup\n ````\n - Buy milk\n - Buy bread\n\n\n - Fix squeaky cabinet\n - Fix self-esteem\n ````\n\nOutput\n - Buy milk\n - Buy bread\n\n\n - Fix squeaky cabinet\n - Fix self-esteem\n\n\nList items consisting of multiple lines\n=======================================\n\nList items aren\'t limited to a single line! Bulleted lists can contain any outline writing convention, including other bulleted lists.\n\nIf your list item contains more than one line, subsequent lines should be indented 2 spaces (or a tab).\n\nMarkup\n ````\n - Buy milk.\n\n If whole milk is on sale, buy that. Otherwise, buy 2%.\n\n - Buy bread.\n\n Only buy bread from one of the following brands:\n\n * Little Northern Bakehouse\n * Udi\'s\n * Canyon Bakehouse\n\n - Buy happiness.\n\n Don\'t spend more than a few cents on this.\n ````\n\nOutput\n - Buy milk.\n\n If whole milk is on sale, buy that. Otherwise, buy 2%.\n\n - Buy bread.\n\n Only buy bread from one of the following brands:\n\n * Little Northern Bakehouse\n * Udi\'s\n * Canyon Bakehouse\n\n - Buy happiness.\n\n Don\'t spend more than a few cents on this. Not worth it.\n\n\n==============\nNumbered lists\n==============\n\nYou already know what a numbered list is!\n\nMarkup\n ````\n 1. Buy milk\n 2. Buy bread\n 3. Buy happiness\n ````\n\nOutput\n 1. Buy milk\n 2. Buy bread\n 3. Buy happiness\n\nNumbered lists are nearly identical to [topic: bulleted lists]---the only difference is that numbered list items have ordinals, not bullets.\n\nThe ordinal for a numbered list item can be expressed several ways:\n\n- An integer followed by a period: `1.`\n- An integer followed by a closing parenthesis: `1)`\n- A number sign: `#`\n- A number sign followed by a period: `#.`\n- A number sign followed by a closing parenthesis: `#)`\n\nLike each bullet in a bulleted list, each ordinal in a numbered list must be followed by a space.\n\n\nLists starting at a specific number\n===================================\n\nNumbered lists don\'t have to start at `1`.\n\nMarkup\n ````\n 3) March\n #) April\n #) May\n ````\n\nOutput\n 3) March\n #) April\n #) May\n\n\nLists in descending order\n=========================\n\nUp automatically recognizes when a numbered list is in descending order.\n\nIf a numbered list has at least two items with *integer* ordinals (as opposed to number signs), and if the first integer is greater than the second, Up considers the list to be in descending order.\n\nMarkup\n ````\n 3) Buy milk\n 2) Buy bread\n #) Buy happiness\n ````\n\nOutput\n 3) Buy milk\n 2) Buy bread\n #) Buy happiness\n\n\nSingle-item numbered lists\n==========================\n\nLike bulleted lists, numbered lists can consist of a single item.\n\nMarkup\n ````\n 1) Buy milk\n ````\n\nOutput\n 1) Buy milk\n\nThere\'s a small exception to this rule: If your list item\'s ordinal is expressed as an integer followed by a period (e.g. `1.`), you must have more than one list item. This exception helps prevent "accidental" numbered lists.\n\nMarkup\n ````\n 1783. Not a good year for Great Britain.\n ````\n\nOutput\n 1783. Not a good year for Great Britain.\n\n\n=================\nDescription lists\n=================\n\nUse description lists represent a collection of subjects and their descriptions.\n\nYou can use description lists for:\n\n- Terms and definitions\n- Questions and answers\n- Any collection of subjects and descriptions!\n\nMarkup\n ````\n Kirby\'s Dreamland\n A video game about a flying marshmallow.\n\n Super Mario Land\n A video game about a jumping plumber.\n ````\n\nOutput\n Kirby\'s Dreamland\n A video game about a flying marshmallow.\n\n Super Mario Land\n A video game about a jumping plumber.\n\nEvery item in a description list consists of two parts:\n\n1. One or more subjects\n2. A single description of those subjects\n\n\nSubjects\n========\n\nSubjects can contain any inline writing convention.\n\nMarkup\n ````\n `
    `\n An HTML element representing numbered lists.\n\n `
      `\n An HTML element representing bulleted lists.\n ````\n\nOutput\n `
        `\n An HTML element representing numbered lists.\n\n `
          `\n An HTML element representing bulleted lists.\n\nWhen there is more than one subject for a given description, they should be listed consecutively, one subject per line.\n\nMarkup\n ````\n Game Boy Light\n Game Boy Pocket\n Game Boy Color\n Handheld videogame systems released by Nintendo in the 1990s.\n ````\n\nOutput\n Game Boy Light\n Game Boy Pocket\n Game Boy Color\n Handheld videogame systems released by Nintendo in the 1990s.\n\n\nDescriptions\n============\n\nEach description follows the subjects it describes.\n\nDescriptions are indented 2 spaces (or a tab). They can contain any outline writing convention, including other description lists.\n\nMarkup\n ````\n Bulbasaur\n A plant Pokémon with a bulb growing from its back.\n\n Height\n 0.7 m\n Weight\n 6.9 kg\n\n Charmander\n A fire Pokémon with a flame on its tail.\n\n Height\n 0.6 m\n Weight\n 8.5 kg\n\nOutput\n Bulbasaur\n A plant Pokémon with a bulb growing from its back.\n\n Height\n 0.7 m\n Weight\n 6.9 kg\n\n Charmander\n A fire Pokémon with a flame on its tail.\n\n Height\n 0.6 m\n Weight\n 8.5 kg\n\nEach description may be followed by an optional blank line. If a description is followed by two blank lines, it marks the end of the description list.\n\nMarkup\n ````\n Lime\n A green fruit.\n Strawberry\n A red fruit.\n\n\n Bulbasaur\n A green Pokémon.\n Charmander\n A red Pokémon.\n ````\n\nOutput\n Lime\n A green fruit.\n Strawberry\n A red fruit.\n\n\n Bulbasaur\n A green Pokémon.\n Charmander\n A red Pokémon.\n\n\n======\nTables\n======\n\nYou already know what a table is! Use tables to display rows of data organized into columns.\n\nMarkup\n ````\n Table: Moves learned by the Pokémon Bulbasaur\n\n Move; Type; Power; Accuracy\n\n Tackle; Normal; 50; 100%\n Growl; Normal; ; 100%\n Leech Seed; Grass; ; 90%\n Vine Whip; Grass; 45; 100%\n ````\n\nOutput\n Table: Moves learned by the Pokémon Bulbasaur\n\n Move; Type; Power; Accuracy\n\n Tackle; Normal; 50; 100%\n Growl; Normal; ; 100%\n Leech Seed; Grass; ; 90%\n Vine Whip; Grass; 45; 100%\n\nA table consists of:\n\n- An optional caption, representing the table\'s title\n- A header row, describing each column\n- Content rows, representing the actual data\n- An optional header column, describing each row\n\nTable cells are separated by semicolons. To learn more, see [topic: cells].\n\nOur examples use extra spaces to align cells. This makes our markup more readable, but it\'s strictly optional! If you want, you can squish your cells together, as long as any empty cells contain at least one space. To learn more, please see [topic: empty cells].\n\nSquished markup\n ````\n Table: My favorite fruits\n\n Fruit;Color;Taste\n\n Lime;Green;Sour\n Lemon;Yellow;Sour\n Banana;Yellow;Sweet\n ````\n\nOutput\n Table: My favorite fruits\n\n Fruit;Color;Taste\n\n Lime;Green;Sour\n Lemon;Yellow;Sour\n Banana;Yellow;Sweet\n\n\nThe caption\n===========\n\nThe text after `Table:` is treated as the table\'s caption. Captions can contain any inline writing convention.\n\nMarkup\n ````\n Table: My favorite [fruits] (en.wikipedia.org/wiki/Fruit)\n\n Fruit; Color; Taste\n\n Lime; Green; Sour\n Lemon; Yellow; Sour\n Banana; Yellow; Sweet\n ````\n\nOutput\n Table: My favorite [fruits] (en.wikipedia.org/wiki/Fruit)\n\n Fruit; Color; Taste\n\n Lime; Green; Sour\n Lemon; Yellow; Sour\n Banana; Yellow; Sweet\n\nCaptions are strongly encouraged, but they\'re not required. To create a table without a caption, simply put "Table" on its own line.\n\nMarkup\n ````\n Table\n\n Fruit; Color; Taste\n\n Lime; Green; Sour\n Lemon; Yellow; Sour\n Banana; Yellow; Sweet\n ````\n\nOutput\n Table\n\n Fruit; Color; Taste\n\n Lime; Green; Sour\n Lemon; Yellow; Sour\n Banana; Yellow; Sweet\n\n\nCells\n=====\n\nTable cells are separated by semicolons. If you want to include a semicolon in a cell, simply put a backslash before it. To learn more, see [topic: disabling special characters].\n\nMarkup\n ````\n Table: My favorite fruits\n\n Fruit; Reason for liking\n\n Apples; Easy to eat\\; stylish\n Grapes; Each grape is very cheap\n Oranges; The color orange is nice\n ````\n\nOutput\n Table: My favorite fruits\n\n Fruit; Reason for liking\n\n Apples; Easy to eat\\; stylish\n Grapes; Each grape is very cheap\n Oranges; The color orange is nice\n\n-------------------------------\nCells spanning multiple columns\n-------------------------------\n\nIf you want a cell to span two columns, terminate that cell with two semicolons.\n\nMarkup\n ````\n Table: My favorite fruits\n\n Fruit; Color; Taste\n\n Lime; Green; Sour\n Orange;; Sweet and tart\n Banana; Yellow; Sweet\n ````\n\nOutput\n Table: My favorite fruits\n\n Fruit; Color; Taste\n\n Lime; Green; Sour\n Orange;; Sweet and tart\n Banana; Yellow; Sweet\n\nLikewise, if you want a cell to span six columns, terminate that cell with six semicolons.\n\n-----------\nEmpty cells\n-----------\n\nA cell consisting solely of spaces (one or more) is considered empty.\n\nNormally, you have to put at least one space in the cell, because consecutive semicolons indicate that you want the previous cell to span multiple columns.\n\nHowever, to indicate that the *first* cell in a row should be empty, simply start that row with a semicolon. You don\'t need to put any spaces before it.\n\nMarkup\n ````\n Table: Games in the Chrono series\n\n Release Date; Game;\n\n March 11, 1995; Chrono Trigger\n November 18, 1999; Chrono Cross\n ; Chrono Break\n ````\n\nOutput\n Table: Games in the Chrono series\n\n Release Date; Game\n\n March 11, 1995; Chrono Trigger\n November 18, 1999; Chrono Cross\n ; Chrono Break\n\nLikewise, to indicate that the *last* cell in a row should be empty, simply end that row with a semicolon. You don\'t need to add any spaces after it.\n\nMarkup\n ````\n Table: Games in the Chrono series\n\n Game; Release Date\n\n Chrono Trigger; March 11, 1995\n Chrono Cross; November 18, 1999\n Chrono Break;\n ````\n\nOutput\n Table: Games in the Chrono series\n\n Game; Release Date\n\n Chrono Trigger; March 11, 1995\n Chrono Cross; November 18, 1999\n Chrono Break;\n\n\nThe header row\n==============\n\nThe header defines each column in the table.\n\nThe single blank lines before and after the header are not required.\n\nMarkup\n ````\n Table: Moves learned by the Pokémon Bulbasaur\n Move; Type; Power; Accuracy\n Tackle; Normal; 50; 100%\n Growl; Normal; ; 100%\n Leech Seed; Grass; ; 90%\n Vine Whip; Grass; 45; 100%\n ````\n\nOutput\n Table: Moves learned by the Pokémon Bulbasaur\n Move; Type; Power; Accuracy\n Tackle; Normal; 50; 100%\n Growl; Normal; ; 100%\n Leech Seed; Grass; ; 90%\n Vine Whip; Grass; 45; 100%\n\nCells in a table\'s header can contain any inline writing convention.\n\n\nContent rows\n============\n\nThe "content rows" of a table follow its header row. The content rows contain the table\'s actual data.\n\nIf a content row is followed by a blank line, it ends the table.\n\nMarkup\n ````\n Table: Moves learned by the Pokémon Bulbasaur\n\n Move; Type; Power; Accuracy\n\n Tackle; Normal; 50; 100%\n Growl; Normal; ; 100%\n Leech Seed; Grass; ; 90%\n Vine Whip; Grass; 45; 100%\n\n I love Bulbasaur!\n\n ````\n\nOutput\n Table: Moves learned by the Pokémon Bulbasaur\n\n Move; Type; Power; Accuracy\n\n Tackle; Normal; 50; 100%\n Growl; Normal; ; 100%\n Leech Seed; Grass; ; 90%\n Vine Whip; Grass; 45; 100%\n\n I love Bulbasaur!\n\nContent row cells can contain any inline writing convention.\n\n\nIncluding a header column in your table\n=======================================\n\nTo indicate your table has a header column, simply indent its header *row* at least two spaces (or a tab).\n\nWhen you indent a table\'s the header row, Up automatically treats the first cell in each subsequent row as the header column.\n\nMarkup\n ````\n Table: Moves learned by the Pokémon Bulbasaur\n\n Type; Power; Accuracy\n\n Tackle; Normal; 50; 100%\n Growl; Normal; ; 100%\n Leech Seed; Grass; ; 90%\n Vine Whip; Grass; 45; 100%\n ````\n\nOutput\n Table: Moves learned by the Pokémon Bulbasaur\n\n Type; Power; Accuracy\n\n Tackle; Normal; 50; 100%\n Growl; Normal; ; 100%\n Leech Seed; Grass; ; 90%\n Vine Whip; Grass; 45; 100%\n\nWhen your table has a header column, Up automatically inserts an extra blank cell at the beginning of the header row in the top level corner, above the header column.\n\n\n===========\nCode blocks\n===========\n\nUse the code block convention to represent a block of computer code.\n\nWhen you need to represent only a small fragment of computer code, consider using [topic: inline code] instead.\n\nMarkup\n ````````\n ```\n function nthFibonacci(n: number): number {\n return n <= 2\n ? n - 1\n : nthFibonacci(n - 1) + nthFibonacci(n - 2)\n }\n ```\n ````````\n\nOutput\n ```\n function nthFibonacci(n: number): number {\n return n <= 2\n ? n - 1\n : nthFibonacci(n - 1) + nthFibonacci(n - 2)\n }\n ```\n\nCode blocks are surrounded (underlined and "overlined") by matching streaks of 3 or more backticks.\n\nIf there is no matching end streak, the code block extends to the end of the document (or to the end of the current outline writing convention, if the code block is nested within one).\n\nWithin a code block, indentation is preserved, and every single character is treated literally. No other writing conventions are recognized, which means code blocks don\'t support [topic: disabling].\n\n\nIncluding streaks of backticks\n==============================\n\nCode blocks can contain streaks of backticks that aren\'t exactly as long as the enclosing streaks.\n\nMarkup\n `````````\n ``````\n A code block:\n\n ```\n function factorial(n: number): number {\n return n <= 1\n ? 1\n : n * factorial(n - 1)\n }\n ```\n\n See? Not so hard!\n ``````\n `````````\n\nOutput\n ``````\n A code block:\n\n ```\n function factorial(n: number): number {\n return n <= 1\n ? 1\n : n * factorial(n - 1)\n }\n ```\n\n See? Not so hard!\n ``````\n\n\n=====================================\nLinkifying another writing convention\n=====================================\n\nYou can put [topic: images] inside of [topic: links], but the syntax can be a bit messy.\n\nMessy markup\n ````\n [(image: Warlocked box art) (i.imgur.com/879AeYU.jpg)] [en.wikipedia.org/wiki/Warlocked]\n ````\n\nOutput\n [(image: Warlocked box art) (i.imgur.com/879AeYU.jpg)] [en.wikipedia.org/wiki/Warlocked]\n\nThat\'s a lot of brackets! Luckily, there\'s a shortcut.\n\nSimply place the "linkifying" URL after the image\'s own URL, and Up will produce a link for you.\n\nCleaner markup\n ````\n [image: Warlocked box art] [i.imgur.com/879AeYU.jpg] (en.wikipedia.org/wiki/Warlocked)\n ````\n\nOutput\n [image: Warlocked box art] [i.imgur.com/879AeYU.jpg] (en.wikipedia.org/wiki/Warlocked)\n\nWhen linkifying an image, you can mix and match square brackets and parentheses---they\'re totally interchangeable.\n\nThis shortcut also works for the following inline writing conventions:\n\n[topic: Example user input]\n Markup\n ````\n Press {space} (en.wikipedia.org/wiki/Space_bar) to continue.\n ````\n\n Output\n Press {space} (en.wikipedia.org/wiki/Space_bar) to continue.\n\n[topic: Footnotes]\n Markup\n ````\n Pokémon is old [^ Released in 1996!] (en.wikipedia.org/wiki/Pokémon_Red_and_Blue) but it maintains its charm.\n ````\n\n Output\n Pokémon is old [^ Released in 1996!] (en.wikipedia.org/wiki/Pokémon_Red_and_Blue) but it maintains its charm.\n\n[topic: Inline revealables]\n Markup\n ````\n At the end of Pokémon Red, [SPOILER: you battle your rival] (pokemon.wikia.com/wiki/Rival) before the credits roll.\n ````\n\n Output\n At the end of Pokémon Red, [SPOILER: you battle your rival] (pokemon.wikia.com/wiki/Rival) before the credits roll.\n\n\n=================================\nTypographical writing conventions\n=================================\n\nEllipsis\n========\n\nConsecutive periods represent an ellipsis, so Up replaces them with a fancy ellipsis character.\n\nMarkup\n ````\n I don\'t know... I doubt a spider would do this.\n ````\n\nOutput\n I don\'t know... I doubt a spider would do this.\n\nIf you\'re a software developer using the Up library, you can specify a different fancy ellipsis (e.g. `⋯`). To learn more, see [topic: `fancyEllipsis`].\n\n\nEn dash\n=======\n\nTwo consecutive hyphens produce an en dash.\n\nMarkup\n ````\n I agree -- to an extent -- with your plan to eat nothing but cereal.\n ````\n\nOutput\n I agree -- to an extent -- with your plan to eat nothing but cereal.\n\n\nEm dash\n=======\n\nThree consecutive hyphens produce an em dash.\n\nMarkup\n ````\n Use a spoon---a fork won\'t cut it.\n ````\n\nOutput\n Use a spoon---a fork won\'t cut it.\n\n\nPlus-minus sign\n===============\n\nA plus sigh followed by a hyphen produces a plus-minus sign.\n\nMarkup\n ````\n I ate 5 waffles +- 2.\n ````\n\nOutput\n I ate 5 waffles +- 2.\n\n\n==============================\nExcessive delimiter characters\n==============================\n\nFor [topic: emphasis], [topic: stress], [topic: italic], [topic: bold], [topic: highlighting], and [topic: inline quotes], Up ignores any excessive delimiter characters.\n\nMarkup\n ````\n This organic, ====gluten-free==== cupcake is too expensive.\n ````\n\nOutput\n This organic, ====gluten-free==== cupcake is too expensive.\n\nThis includes when delimiter characters aren\'t perfectly balanced on either side.\n\nMarkup\n ````\n My favorite video game is _Chrono Cross__.\n ````\n\nOutput\n My favorite video game is _Chrono Cross__.\n\n\n============================\nDisabling special characters\n============================\n\nTo disable the special meaning of a character, put a backslash before it.\n\nMarkup\n ````\n I love \\*asterisks*!\n ````\n\nOutput\n I love \\*asterisks\\*!\n\nLikewise, to disable the special meaning of a backslash, put another backslash before it.\n\nMarkup\n ````\n My favorite kind of slash is the backslash: \\\\. What is yours?\n ````\n\nOutput\n My favorite kind of slash is the backslash: \\\\. What is yours?\n\n\n===============================\nOverlapping writing conventions\n===============================\n\nIn Up, inline writing conventions can freely overlap.\n\nMarkup\n ````\n John **enjoys ==sleeping** late== whenever he can.\n ````\n\nOutput\n John **enjoys ==sleeping** late== whenever he can.\n\n\nSuperficial overlapping\n=======================\n\nIf conventions overlap superficially---by only their start or end delimiters---Up pretends they weren\'t overlapped at all.\n\nMarkup\n ````\n At the end of Pokémon Red, [SPOILER: you battle your rival *yet again]* before the credits roll.\n ````\n\nOutput\n At the end of Pokémon Red, [SPOILER: you battle your rival *yet again]* before the credits roll.\n\n\n\n####################\nUsing the Up library\n####################\n\nThe Up library can be [found on NPM] (npmjs.com/package/up-lang).\n\n\n============\nInstallation\n============\n\n````\nnpm install up-lang --save\n````\n\n\n==============\nUsage Overview\n==============\n\nTypically, you\'ll want to use one of the various [topic: functions] exported by the library.\n\n````\nconst { parseAndRender } = require(\'up-lang\')\n\nconst html = parseAndRender(markup, optionalSettings)\n````\n\nAlternatively, you can use the exported `Up` class, which can be helpful if you need to parse or render several documents sharing custom settings. Please see [topic: `Up`] to learn more.\n\nIf you plan to modify or analyze a parsed document, you\'ll want to check out the [topic: abstract syntax tree classes].\n\n\n=========\nFunctions\n=========\n\n`parseAndRender` (function)\n===========================\n\nThis function converts Up markup into HTML and returns the result.\n\nArguments\n `markup`: `string`\n The Up markup to convert into HTML.\n `settings` (optional): [topic: `Settings`]\n The custom parsing and/or rendering settings to apply.\n\nReturn type: `string`\n This function returns HTML representing the rendered document.\n\nUsage\n Without custom settings\n ````\n const html = parseAndRender(markup)\n ````\n\n With custom settings\n ````\n const html = parseAndRender(markup, {\n parsing: {\n createSourceMap: true,\n keywords: { audio: "listen" }\n },\n rendering: {\n idPrefix: "article"\n }\n })\n ````\n\n\n`parseAndRenderWithTableOfContents` (function)\n==============================================\n\nThis function converts Up markup into two pieces of HTML, both of which are returned:\n\n1. A table of contents\n2. The document itself\n\nArguments\n `markup`: `string`\n The Up markup to parse and render.\n\n `settings` (optional): [topic: `Settings`]\n The custom parsing and/or rendering settings to apply.\n\nReturn type: [topic: `DocumentAndTableOfContentsHtml`]\n This function returns HTML representing the rendered document and table of contents.\n\nUsage\n Without custom settings\n ````\n const { tableOfContentsHtml, documentHtml } =\n parseAndRenderWithTableOfContents(markup)\n ````\n\n With custom settings\n ````\n const { tableOfContentsHtml, documentHtml } =\n parseAndRenderWithTableOfContents(markup, {\n parsing: {\n createSourceMap: true,\n keywords: { audio: "listen" }\n },\n rendering: {\n idPrefix: "article",\n terms: { reveal: "expand" }\n }\n })\n ````\n\n\n--------------------------------------------\n`DocumentAndTableOfContentsHtml` (interface)\n--------------------------------------------\n\nThis interface represents the HTML for a rendered document and its table of contents.\n\nMembers\n `tableOfContentsHtml`: `string`\n The HTML for the table of contents.\n\n `documentHtml`: `string`\n The HTML for the document itself.\n\nNotes\n The following functions return an object satisfying this interface:\n\n - [topic: `parseAndRenderWithTableOfContents`]\n - [topic: `renderWithTableOfContents`]\n\n\n`parseAndRenderInline` (function)\n=================================\n\nThis function converts inline Up markup into inline HTML and returns the result.\n\nTo learn more about inline documents, see [topic: inline documents].\n\nArguments\n `inlineMarkup`: `string`\n The inline Up markup to convert into inline HTML.\n\n `parsingSettings` (optional): [topic: `Settings`]\n The custom parsing and/or rendering settings to apply.\n\nReturn type: `string`\n This function returns HTML representing the rendered inline document.\n\nUsage\n Without custom settings\n ````\n const html = parseAndRenderInline(markup)\n ````\n\n With custom settings\n ````\n const html = parseAndRenderInline(markup, {\n parsing: {\n baseForUrlsStartingWithSlash: "https://example.com/en-us",\n keywords: { audio: "listen" }\n },\n rendering: {\n idPrefix: "byline",\n terms: {\n footnoteReference: "footnote mention",\n reveal: "show"\n }\n }\n })\n ````\n\n\n`parse` (function)\n==================\n\nThis function parses Up markup and returns the resulting syntax tree.\n\nArguments\n `markup`: `string`\n The Up markup to parse.\n\n `parsingSettings` (optional): [topic: `Settings.Parsing`]\n The custom parsing settings to apply.\n\nReturn type: [topic: `Document`]\n This function returns a syntax tree representing the parsed document.\n\nUsage\n Without custom settings\n ````\n const html = parse(markup)\n ````\n\n With custom settings\n ````\n const document = parse(markup, {\n createSourceMap: true,\n keywords: { audio: "listen" }\n })\n ````\n\n\n`parseInline` (function)\n========================\n\nThis function parses inline Up markup and returns the resulting inline syntax tree.\n\nTo learn more about inline documents, see [topic: inline documents].\n\nArguments\n `inlineMarkup`: `string`\n The inline Up markup to parse.\n\n `parsingSettings` (optional): [topic: `Settings.Parsing`]\n The custom parsing settings to apply.\n\nReturn type: [topic: `InlineDocument`]\n This function returns an inline syntax tree representing the parsed document.\n\nUsage\n Without custom settings\n ````\n const html = parseInline(markup)\n ````\n\n With custom settings\n ````\n const html = parseInline(markup, {\n baseForUrlsStartingWithSlash: "https://example.com/en-us",\n keywords: { audio: "listen" }\n })\n ````\n\n\n`render` (function)\n===================\n\nThis function converts a syntax tree into HTML and returns the result.\n\nArguments\n `document`: [topic: `Document`]\n The syntax tree to convert into HTML.\n\n `renderingSettings` (optional): [topic: `Settings.Rendering`]\n The custom rendering settings to apply.\n\nReturn type: `string`\n This function returns HTML representing the rendered document.\n\nUsage\n Without custom settings\n ````\n const html = render(document)\n ````\n\n With custom settings\n ````\n const html = render(document, {\n idPrefix: "article",\n terms: {\n footnoteReference: "footnote mention",\n reveal: "show"\n }\n })\n ````\n\n\n`renderWithTableOfContents` (function)\n======================================\n\nThis function converts a syntax tree into two pieces of HTML, both of which are returned:\n\n1. A table of contents\n2. The document itself\n\nArguments\n `document`: [topic: `Document`]\n The syntax tree to convert into HTML.\n\n `renderingSettings` (optional): [topic: `Settings.Rendering`]\n The custom rendering settings to apply.\n\nReturn type: [topic: `DocumentAndTableOfContentsHtml`]\n This function returns HTML representing the rendered document and table of contents.\n\nUsage\n Without custom settings\n ````\n const { tableOfContentsHtml, documentHtml } =\n renderWithTableOfContents(document)\n ````\n\n With custom settings\n ````\n const { tableOfContentsHtml, documentHtml } =\n renderWithTableOfContents(document, {\n idPrefix: "article",\n terms: { revveal: "expand" }\n })\n ````\n\n\n`renderInline` (function)\n=========================\n\nThis function converts an inline syntax tree into inline HTML and returns the result.\n\nTo learn more about inline documents, see [topic: inline documents].\n\nArguments\n `inlineDocument`: [topic: `InlineDocument`]\n The inline syntax tree to convert into HTML.\n\n `renderingSettings` (optional): [topic: `Settings.Rendering`]\n The custom rendering settings to apply.\n\nReturn type: `string`\n This function returns HTML representing the rendered inline document.\n\nUsage\n Without custom settings\n ````\n const html = renderInline(inlineDocument)\n ````\n\n With custom settings\n ````\n const html = renderInline(inlineDocument, {\n idPrefix: "byline",\n terms: {\n footnoteReference: "footnote mention",\n reveal: "show"\n }\n })\n ````\n\n\n\n============\n`Up` (class)\n============\n\nAnything you can accomplish using the `Up` class, you can accomplish using the regular [topic: functions] exported by the library.\n\nHowever, the `Up` class can be helpful if you need to parse or render several documents sharing custom settings.\n\nThose shared settings can be provided just once---in the constructor. Then, when calling methods on your object, you only need to provide settings that overwrite (or supplement) the ones you provided to the constructor.\n\n````\nconst { Up } = require(\'up-lang\')\n\nconst up = new Up(settings)\nconst html = up.parseAndRender(markup, changedSettings)\n````\n\n\nConstructor arguments\n=====================\n\n`settings` (optional): [topic: `Settings`]\n The custom parsing and/or rendering settings to apply to all subsequent method calls.\n\n ```\n const up = new Up({\n parsing: {\n fancyEllipsis: "⋯",\n keywords: {\n audio: ["sound", "song"],\n revealable: "hide"\n }\n },\n rendering: {\n idPrefix: \'article\',\n terms: { reveal: "expand" }\n }\n })\n ```\n\n\nMethods\n=======\n\nThis class\'s methods have the exact same names and arguments as the library\'s [topic: functions].\n\n--------------------------------------\nInvoking a method with custom settings\n--------------------------------------\n\nWhen a method is invoked with custom settings, those settings are merged with the settings provided to the constructor. If any individual settings conflict, Up uses the conflicting values provided to the method.\n\nExample\n ````\n const up = new Up({\n parsing: {\n createSourceMap: true,\n fancyEllipsis: "⋯",\n keywords: {\n audio: ["sound", "song"],\n revealable: "hide"\n }\n },\n rendering: {\n terms: { reveal: "expand" }\n }\n })\n\n const html = up.parseAndRender(markup, {\n parsing: {\n createSourceMap: false,\n keywords: {\n audio: "listen"\n }\n },\n rendering: {\n idPrefix: "article"\n }\n })\n ````\n\nResult\n In the above example, the following settings are ultimately applied:\n\n ````\n {\n parsing: {\n createSourceMap: false,\n fancyEllipsis: "⋯",\n keywords: {\n audio: "listen",\n revealable: "hide"\n }\n },\n rendering: {\n idPrefix: "article",\n terms: { reveal: "expand" }\n }\n }\n ````\n\n\n\n=====================\nLibrary configuration\n=====================\n\nThe Up library works out of the box! No configuration is necessary.\n\nHowever, all [topic: functions] do accept optional custom settings. These various settings are described below.\n\n\n`Settings` (interface)\n======================\n\nThe `Settings` interface includes both parsing settings and rendering settings.\n\nUse this interface to provide custom settings to functions that both parse markup *and* render the result to HTML:\n\n- [topic: `parseAndRender`]\n- [topic: `parseAndRenderWithTableOfContents`]\n- [topic: `parseAndRenderInline`]\n\nUsage\n ````\n const html = parseAndRender(markup, {\n parsing: {\n createSourceMap: true,\n keywords: { audio: "listen" }\n },\n rendering: {\n idPrefix: "article"\n }\n })\n ````\n\nMembers (both of which are optional)\n `parsing`: [topic: `Settings.Parsing`]\n The custom parsing settings to apply.\n\n `rendering`: [topic: `Settings.Rendering`]\n The custom rendering settings to apply.\n\n\n`Settings.Parsing` (interface)\n==============================\n\nThe `Settings.Parsing` interface includes all parsing settings.\n\nUse this interface to provide custom settings to functions that parse markup and return the resulting syntax tree:\n\n- [topic: `parse`]\n- [topic: `parseInline`]\n\nAs part of [topic: `Settings`], this interface also provides parsing custom settings to functions that both parse markup *and* render the result to HTML:\n\n- [topic: `parseAndRender`]\n- [topic: `parseAndRenderWithTableOfContents`]\n- [topic: `parseAndRenderInline`]\n\nUsage\n ````\n const document = parse(markup, {\n createSourceMap: true,\n keywords: {\n audio: ["sound", "song"],\n audio: "listen"\n }\n })\n ````\n\nMembers (all of which are optional)\n [topic: `createSourceMap`]: `boolean`\n Enables source mapping.\n\n [topic: `defaultUrlScheme`]: `string`\n The default URL scheme for URLs without one.\n\n [topic: `baseForUrlsStartingWithSlash`]: `string`\n The base for URLs starting with `/`.\n\n [topic: `baseForUrlsStartingWithHashmark`]: `string`\n The base for URLs starting with `#`.\n\n [topic: `fancyEllipsis`]: `string`\n Up replaces consecutive periods with this fancy ellipsis.\n\n `keywords` (all of which are optional)\n\n --------------------\n Customizing keywords\n --------------------\n\n You can provide unlimited custom variations for each keyword. Custom keyword variations do not overwrite the default keywords.\n\n ````\n const document = parse(markup, {\n keywords: {\n audio: ["sound", "song"],\n audio: "listen"\n }\n })\n ````\n\n Like the default keywords, custom keyword variations are case-insensitive.\n\n `audio`: `string` or `string[]`\n Recognized by [topic: audio].\n\n `image`: `string` or `string[]`\n Recognized by [topic: images].\n\n `revealable`: `string` or `string[]`\n Recognized by [topic: inline revealables] and [topic: revealable blocks].\n\n `sectionLink`: `string` or `string[]`\n Recognized by [topic: section links].\n\n `table`: `string` or `string[]`\n Recognized by [topic: tables].\n\n `video`: `string` or `string[]`\n Recognized by [topic: video].\n\n\n---------------------------\n`createSourceMap` (setting)\n---------------------------\n\nWhen `createSourceMap` is enabled, Up keeps track of the original line number for every instance of every outline writing convention.\n\nThis setting works by setting the `sourceLineNumber` field of each [topic: `OutlineSyntaxNode`].\n\nUsage\n ````\n const html = parseAndRender(markup, {\n parsing: {\n createSourceMap: true\n }\n })\n ````\n\nDefault value\n `false`\n\nContext\n This setting belongs to [topic: `Settings.Parsing`].\n\n\n----------------------------\n`defaultUrlScheme` (setting)\n----------------------------\n\nThe `defaultUrlScheme` is prefixed to any link URL or media URL without a URL scheme.\n\nFor URLs *with* a URL scheme, this setting has no effect. Furthermore, this setting is not applied to URLs that start with `/` or `#`. For those URLs, see:\n\n- [topic: `baseForUrlsStartingWithSlash`]\n- [topic: `baseForUrlsStartingWithHashmark`]\n\nUsage\n ````\n const html = parseAndRender(markup, {\n parsing: {\n defaultUrlScheme: "my-app://"\n }\n })\n ````\n\nDefault value\n `"https://"`\n\nContext\n This setting belongs to [topic: `Settings.Parsing`].\n\n\n----------------------------------------\n`baseForUrlsStartingWithSlash` (setting)\n----------------------------------------\n\nThe `baseForUrlsStartingWithSlash` is prefixed to any link URL or media URL starting with `/`.\n\nUsage\n ````\n const html = parseAndRender(markup, {\n parsing: {\n baseForUrlsStartingWithSlash: "https://example.com/blog/"\n }\n })\n ````\n\nDefault value\n `""` (an empty string)\n\nContext\n This setting belongs to [topic: `Settings.Parsing`].\n\n\n-------------------------------------------\n`baseForUrlsStartingWithHashMark` (setting)\n-------------------------------------------\n\nThe `baseForUrlsStartingWithSlash` is prefixed to any link URL or media URL starting with `#`.\n\nUsage\n ````\n const html = parseAndRender(markup, {\n parsing: {\n baseForUrlsStartingWithHashMark: "https://example.com/blog/post/28"\n }\n })\n ````\n\nDefault value\n `""` (an empty string)\n\nContext\n This setting belongs to [topic: `Settings.Parsing`].\n\n\n-------------------------\n`fancyEllipsis` (setting)\n-------------------------\n\nUp automatically replaces consecutive periods with `fancyEllipsis`.\n\nBy default, `fancyEllipsis` is `…`. If you want Up to use a different fancy ellipsis (e.g. `⋯` or even `. . .`), set `fancyEllipsis` accordingly.\n\nUsage\n ````\n const html = parseAndRender(markup, {\n parsing: {\n fancyEllipsis: "⋯"\n }\n })\n ````\n\nDefault value\n `"…"`\n\nContext\n This setting belongs to [topic: `Settings.Parsing`].\n\n\n`Settings.Rendering` (interface)\n================================\n\nThe `Settings.Rendering` interface includes all rendering settings.\n\nUse this interface to provide custom settings to functions that render syntax trees to HTML:\n\n- [topic: `render`]\n- [topic: `renderWithTableOfContents`]\n- [topic: `renderInline`]\n\nAs part of [topic: `Settings`], this interface also provides custom rendering settings to functions that both parse markup *and* render the result to HTML:\n\n- [topic: `parseAndRender`]\n- [topic: `parseAndRenderWithTableOfContents`]\n- [topic: `parseAndRenderInline`]\n\nUsage\n ````\n const html = render(document, {\n idPrefix: "article",\n terms: {\n footnoteReference: "footnote mention",\n reveal: "show"\n }\n })\n ````\n\nMembers (all of which are optional)\n [topic: `idPrefix`]: `string`\n The prefix to apply to HTML IDs.\n\n [topic: `renderDangerousContent`]: `boolean`\n Enables the rendering of dangerous content. Enabling this setting is not recommended!\n\n `terms` (all of which are optional)\n `footnote`: `string`\n Appears in the URLs of links pointing to footnotes in their footnote blocks.\n\n `footnoteReference`: `string`\n Appears in the URLs of links pointing back to footnote references (i.e. back to the superscripts within paragraphs).\n\n `hide`: `string`\n Appears on the button that hides revealable content.\n\n `reveal`: `string`\n Appears on the button that reveals revealable content.\n\n `sectionReferencedByTableOfContents`: `string`\n Appears in the URLs of table of contents entries.\n\n You don\'t need to worry about escaping any characters in your custom terms! Up handles that for you.\n\n\n--------------------\n`idPrefix` (setting)\n--------------------\n\nIf you are rendering multiple documents onto the same page, you need to use this setting to prevent HTML ID collisions between documents.\n\nBy default, `idPrefix` is `up` to prevent ID collisions with any HTML elements *not* rendered by Up. If you don\'t want any ID prefix, you can set `idPrefix` to an empty string.\n\nYou don\'t need to worry about escaping HTML for your `idPrefix`---Up automatically handles that for you. Furthermore, Up automatically converts any spaces in your `idPrefix` to hyphens.\n\nUsage\n ````\n const html = parseAndRender(markup, {\n rendering: {\n idPrefix: "article"\n }\n })\n ````\n\nContext\n This setting belongs to [topic: `Settings.Rendering`].\n\nDefault value\n `"up"`\n\n\n----------------------------------\n`renderDangerousContent` (setting)\n----------------------------------\n\nNormally, Up will not render links or media elements with potentially exploitable URI schemes: `javascript`, `vbscript`, `data`, and `file`.\n\nWhen this setting is enabled, Up will dutifully render all links and media elements.\n\nUsage\n ````\n const html = parseAndRender(markup, {\n rendering: {\n renderDangerousContent: true\n }\n })\n ````\n\nDefault value\n `false`\n\nContext\n This setting belongs to [topic: `Settings.Rendering`].\n\n\n\n================\nInline documents\n================\n\nIn certain contexts, you might want to restrict a document to just a single line:\n\n- A chat message\n- The title of a thread on a message board\n- The byline for a user\'s profile\n\nThat\'s what inline documents are for! To take advantage of inline documents, use one of the following functions:\n\n- [topic: `parseAndRenderInline`]\n- [topic: `parseInline`]\n- [topic: `renderInline`]\n\n\nSyntax differences\n==================\n\nWithin inline documents, Up ignores all outline writing conventions. Furthermore, [topic: footnotes] and [topic: section links] aren\'t supported.\n\nWhen Up encounters a footnote in an inline document, it pretends the author had used parentheses instead of a footnote.\n\nInline markup\n ````\n My dad [^ Professor Oak] is very wise.\n ````\nOutput\n My dad (Professor Oak) is very wise.\n\nWithin inline documents, Up doesn\'t recognize the syntax for section links. Consequently, their markup is instead treated as regular old text enclosed within brackets.\n\nInline markup\n ````\n I enjoyed our conversation [topic: the weather].\n ````\nOutput\n I enjoyed our conversation [\\topic: the weather].\n\n\nRendered HTML\n=============\n\nWhen inline documents are rendered, the resulting HTML is *not* enclosed within any container element (e.g. `

          `).\n\nInline markup\n ````\n I *really* like Starcraft.\n ````\n\nRendered inline HTML\n ````\n I really like Starcraft.\n ````\n\n\n\n============================\nAbstract syntax tree classes\n============================\n\nUnless you\'re fiddling with the abstract syntax tree of a parsed document, you can safely ignore this section.\n\nEvery class used in the abstract syntax tree is exported by the library.\n\n````\nconst { Blockquote } = require("up-lang")\n\nif (syntaxNode instanceof Blockquote) {\n // Do something\n}\n````\n\nIf you\'re using TypeScript, you can take advantage of several interfaces used in the abstract syntax tree, too.\n\n````\nconst { SyntaxNode } = require("up-lang")\n\nfunction handle(node: SyntaxNode): void {\n // Do something\n}\n````\n\nAll classes and interfaces are described below.\n\n\n`Document` (class)\n==================\n\nThis class represents the syntax tree for a parsed document.\n\nExtends\n [topic: `OutlineSyntaxNodeContainer`]\n\nUnique members\n `tableOfContents`: [topic: Document.TableOfContents]\n An object representing the document\'s table of contents.\n\n `create` method (static)\n Purpose\n This method returns a ready-to-render syntax tree from a collection of outline syntax nodes.\n\n Usually, you\'ll want to use this static method instead of the constructor.\n\n Arguments\n `children`: array of [topic: `OutlineSyntaxNode`]\n A collection of outline syntax nodes representing the content of this document.\n\n Return type: [topic: `Document`]\n This method creates and returns a ready-to-render `Document` object.\n\n To prepare the document for rendering, this method:\n\n - Assigns footnotes their reference numbers\n - Extracts footnotes into footnote blocks\n - Produces a table of contents\n - Matches section links with table of contents entries\n\nConstructor arguments\n `children`: array of [topic: `OutlineSyntaxNode`]\n A collection of outline syntax nodes representing the content of this document.\n\n `tableOfContents` (optional): [topic: `Document.TableOfContents`]\n The document\'s table of contents.\n\nRendered HTML\n When rendered to HTML, the document is *not* put into an outer container element.\n\n ````\n

          \n Unlike regular dental floss, you can use floss picks even if you\'re not a trained dental hygienist.\n

          \n

          \n Floss picks are sold in stylish, resealable plastic bags. You have no excuse not to buy some today.\n

          \n ````\n\n\n----------------------------------\n`Document.TableOfContents` (class)\n----------------------------------\n\nThis class represents the table of contents for a document. The table of contents includes every heading except those found within [topic: revealable content].\n\nMembers\n `entries`: array of [topic: `Document.TableOfContents.Entry`]\n A collection of entries representing headings in the document. In fact, the objects in this collection are the same [topic: `Heading`] objects in the document itself.\n\nConstructor arguments\n `entries`: array of [topic: `Document.TableOfContents.Entry`]\n The entries in the table of contents.\n\nRendered HTML\n Each entry in the table of contents renders a heading element corresponding to its `level`. This heading element contains a link to the appropriate section in the document.\n\n To learn more on how headings are rendered, please see [topic: `Heading`].\n\n ````\n

          \n Fun things\n

          \n

          \n Games\n

          \n

          \n Video games\n

          \n

          \n Released in the 2000s\n

          \n
          \n For Nintendo devices\n
          \n
          \n Nintendo 64\n
          \n \n
          \n Game Boy\n
          \n \n
          \n Warlocked\n
          \n ````\n\n\n`Document.TableOfContents.Entry` (interface)\n--------------------------------------------\n\nThis interface represents an entry in the table of contents.\n\nMembers\n `ordinalInTableOfContents`: `number`\n The entry\'s ordinal in the table of contents. The first ordinal is `1`, not `0`.\n\n `level`: `number`\n The heading level of the entry. Like HTML heading levels, a level of 1 is considered the most significant.\n\n `children`: array of [topic: InlineSyntaxNode]\n The inline syntax nodes representing this entry in the table of contents.\n\n `titleMarkup`: string\n Currently, headings are the only writing convention that produce table of contents entries, so the `titleMarkup` field always represents the markup for the "content line" of a heading.\n\n Section links compare their `markupSnippetFromSectionTitle` against this field.\n\n `sourceLineNumber`: `number`\n If [topic: `createSourceMap`] is enabled, this field is set to the line number of the first line of markup that produced the heading represented by this entry. Source line numbers start at `1`, not `0`.\n\n When rendered to HTML, entries with source line numbers are given a `data-up-source-line` attribute set the appropriate line number.\n\n ````\n

          \n Video games\n

          \n ````\n\n `contentWithinTableOfContents` method\n Return type: array of [topic: `InlineSyntaxNode`]\n This method returns the inline syntax nodes that should represent this entry\'s content inside the table of contents itself.\n\n Arguments\n None.\n\n\n`InlineDocument` (class)\n=======================\n\nThis class represents the syntax tree for a parsed inline document.\n\nExtends\n [topic: `InlineSyntaxNodeContainer`]\n\nConstructor arguments\n See the constructor arguments for [topic: `InlineSyntaxNodeContainer`].\n\nRendered HTML\n When rendered to HTML, an inline document is *not* put into an outer container element.\n\n ````\n I love dental floss!\n ````\n\n\n`SyntaxNode` (interface)\n========================\n\nAll syntax node classes must implement this interface.\n\nMembers\n `inlineDescendants` method\n Return type: array of [topic: `InlineSyntaxNode`]\n This method returns all inline descendants (including children, grandchildren, etc.).\n\n Arguments\n None.\n\nNotes\n This interface also has a `render` method, but it isn\'t relevant to developers using the Up library.\n\n\n`InlineSyntaxNode` (interface)\n==============================\n\nAll inline syntax node classes must implement this interface.\n\nExtends\n [topic: `SyntaxNode`]\n\nUnique members\n `searchableText` method\n Return type: `string`\n This method returns the searchable text of the syntax node.\n\n Ultimately, this method helps match [topic: section links] to the the most appropriate table of content entry.\n\n Arguments\n None.\n\n `textAppearingInline` method\n Return type: `string`\n This method returns the text of the syntax node as it should appear inline. Some inline writing conventions don\'t have any text appearing inline, including [topic: footnotes] and [topic: images].\n\n This method is helps determine whether table cells are numeric.\n\n Arguments\n None.\n\n\n`OutlineSyntaxNode` (interface)\n===============================\n\nAll outline syntax node classes must implement this interface.\n\nExtends\n [topic: `SyntaxNode`]\n\nUnique members\n `sourceLineNumber`: `number`\n If [topic: `createSourceMap`] is enabled, this field is set to the first line of markup that produced this syntax node. Source line numbers start at `1`, not `0`.\n\n HTML elements rendered by outline syntax nodes with source line numbers are given a `data-up-source-line` attribute set the appropriate line number.\n\n ````\n

          Hi there!

          \n ````\n\n `descendantsToIncludeInTableOfContents` method\n Return type: array of [topic: `Document.TableOfContents.Entry`]\n This method returns any descendants (at any nesting level) to include in the table of contents.\n\n Arguments\n None.\n\n\n`RichInlineSyntaxNode` (class)\n==============================\n\nThis abstract class represents an inline syntax node that can contain other inline syntax nodes.\n\nExtends\n [topic: `InlineSyntaxNodeContainer`]\n\nImplements\n [topic: `InlineSyntaxNode`]\n\nConstructor arguments\n See the constructor arguments for [topic: `InlineSyntaxNodeContainer`].\n\n\n`RichOutlineSyntaxNode` (class)\n===============================\n\nThis abstract class represents an outline syntax node that can contain other outline syntax nodes.\n\nExtends\n [topic: `OutlineSyntaxNodeContainer`]\n\nImplements\n [topic: `OutlineSyntaxNode`]\n\nConstructor arguments\n `children`: array of [topic: `OutlineSyntaxNode`]\n A collection of outline syntax nodes representing the content of this syntax node.\n\n `options` (optional)\n `sourceLineNumber`: number\n The line number of the first line of markup that created this syntax node.\n\n\n`InlineSyntaxNodeContainer` (class)\n===================================\n\nThis abstract class represents a container of inline syntax nodes.\n\nMembers\n `children`: array of [topic: `InlineSyntaxNode`]\n A collection of inline syntax nodes representing the content of this container.\n\n `inlineDescendants` method\n Return type: array of [topic: `InlineSyntaxNode`]\n This method returns all inline descendants (including `children`, grandchildren, etc.).\n\n Arguments\n None.\n\nConstructor arguments\n `children`: array of [topic: `InlineSyntaxNode`]\n This field is described above.\n\n\n`OutlineSyntaxNodeContainer` (class)\n====================================\n\nThis abstract class represents a container of outline syntax nodes.\n\nMembers\n `children`: array of [topic: `OutlineSyntaxNode`]\n A collection of outline syntax nodes representing the content of this container.\n\n `descendantsToIncludeInTableOfContents` method\n Return type: array of [topic: `Document.TableOfContents.Entry`]\n This method returns any descendants (children, grandchildren, etc.) to include in the table of contents.\n\n Arguments\n None.\n\n `inlineDescendants` method\n Return type: array of [topic: `InlineSyntaxNode`]\n This method returns all inline descendants of `children`.\n\n Arguments\n None.\n\nConstructor arguments\n `children`: array of [topic: `OutlineSyntaxNode`]\n This field is described above.\n\n\n`MediaSyntaxNode` (class)\n=========================\n\nAll media syntax node classes extend this abstract class:\n\n- [topic: `Image`]\n- [topic: `Video`]\n- [topic: `Audio`]\n\nImplements\n [topic: `InlineSyntaxNode`]\n Media conventions can appear inline (i.e. within paragraphs).\n\n [topic: `OutlineSyntaxNode`]\n If a line consists solely of media conventions (or media conventions within links), those media conventions (or their outer links) are placed directly into the outline.\n\nUnique members\n `description`: `string`\n The media\'s description.\n\n `url`: `string`\n Represents the media\'s URL after the following settings are applied:\n\n - [topic: `defaultUrlScheme`]\n - [topic: `baseForUrlsStartingWithSlash`]\n - [topic: `baseForUrlsStartingWithHashmark`]\n\nConstructor arguments\n `description`: string\n The media\'s description.\n\n `url`: string\n The media\'s URL.\n\n `options` (optional)\n `sourceLineNumber`: number\n The line number of the line of markup that created this media syntax node.\n\n\n`ParentheticalSyntaxNode` (class)\n=================================\n\nThis abstract class represents [topic: parenthetical text]. It exists solely to improve the expressiveness of the type system.\n\nIt is extended by both parenthetical syntax node classes:\n\n- [topic: `NormalParenthetical`]\n- [topic: `SquareParenthetical`]\n\nExtends\n [topic: `RichInlineSyntaxNode`]\n\nConstructor arguments\n See the constructor arguments for [topic: `RichInlineSyntaxNode`].\n\n\n`Audio` (class)\n===============\n\nWriting convention\n [topic: Audio]\n\nExtends\n [topic: `MediaSyntaxNode`]\n\nConstructor arguments\n See the constructor arguments for [topic: `MediaSyntaxNode`].\n\nRendered HTML\n ````\n \n ````\n\n\n`Blockquote` (class)\n====================\n\nWriting convention\n [topic: Blockquotes]\n\nExtends\n [topic: `RichOutlineSyntaxNode`]\n\nConstructor arguments\n See the constructor arguments for [topic: `RichOutlineSyntaxNode`].\n\nRendered HTML\n ````\n
          \n

          Hi there!

          \n
          \n ````\n\n\n`Bold` (class)\n==============\n\nWriting convention\n [topic: Audio]\n\nExtends\n [topic: `RichInlineSyntaxNode`]\n\nConstructor arguments\n See the constructor arguments for [topic: `RichInlineSyntaxNode`].\n\nRendered HTML\n ````\n Hi there!\n ````\n\n\n`BulletedList` (class)\n=======================\n\nWriting convention\n [topic: Bulleted lists]\n\nImplements\n [topic: `OutlineSyntaxNode`]\n\nUnique members\n `items`: array of [topic: `BulletedList.Item`]\n The collection of items comprising this bulleted list.\n\nConstructor arguments\n `items`: array of [topic: `BulletedList.Item`]\n This field is described above.\n\n `options` (optional)\n `sourceLineNumber`: number\n The line number of the first line of markup that created this bulleted list.\n\nRendered HTML\n ````\n
            \n
          • \n

            Buy milk

            \n
          • \n
          • \n

            Buy bread

            \n
          • \n
          • \n

            Buy happiness

            \n
          • \n
          \n ````\n\n\n----------------------------\n`BulletedList.Item` (class)\n----------------------------\n\nThis class represents an item in a bulleted list.\n\nExtends\n [topic: `OutlineSyntaxNodeContainer`]\n\nConstructor arguments\n See the constructor arguments for [topic: `OutlineSyntaxNodeContainer`].\n\n\n`CodeBlock` (class)\n===================\n\nWriting convention\n [topic: Code blocks]\n\nImplements\n [topic: `OutlineSyntaxNode`]\n\nUnique members\n `code`: `string`\n The code represented by this syntax node.\n\nConstructor arguments\n `code`: `string`\n This field is described above.\n\n `options` (optional)\n `sourceLineNumber`: number\n The line number of the first line of markup that created this code block.\n\nRendered HTML\n ````\n
          const message = "Hi there!"
          \n ````\n\n\n`DescriptionList` (class)\n=========================\n\nWriting convention\n [topic: Description lists]\n\nImplements\n [topic: `OutlineSyntaxNode`]\n\nUnique members\n `items`: array of [topic: `DescriptionList.Item`]\n The collection of items comprising this description list.\n\nConstructor arguments\n `items`: array of [topic: `DescriptionList.Item`]\n This field is described above.\n\n `options` (optional)\n `sourceLineNumber`: number\n The line number of the first line of markup that created this description list.\n\nRendered HTML\n ````\n
          \n
          Kirby\'s Dreamland
          \n
          \n

          A video game about a flying marshmallow.

          \n
          \n
          Super Mario Land
          \n
          \n

          A video game about a jumping plumber.

          \n
          \n
          \n ````\n\n\n------------------------------\n`DescriptionList.Item` (class)\n------------------------------\n\nThis class represents a collection of subjects and their corresponding description.\n\nUnique members\n `subjects`: array of [topic: `DescriptionList.Item.Subject`]\n The subjects described by `description`.\n\n `description`: [topic: `DescriptionList.Item.Description`]\n The description of `subjects`.\n\nConstructor arguments\n `subjects`: array of [topic: `DescriptionList.Item.Subject`]\n This field is described above.\n\n `description`: [topic: `DescriptionList.Item.Description`]\n This field is described above.\n\n\n`DescriptionList.Item.Subject` (class)\n--------------------------------------\n\nThis class represents the collection of subjects described by a given description within a description list item.\n\nExtends\n [topic: `InlineSyntaxNodeContainer`]\n\nConstructor arguments\n See the constructor arguments for [topic: `InlineSyntaxNodeContainer`].\n\n\n`DescriptionList.Item.Description` (class)\n------------------------------------------\n\nThis class represents the description of a given collection of subjects within a description list item.\n\nExtends\n [topic: `OutlineSyntaxNodeContainer`]\n\nConstructor arguments\n See the constructor arguments for [topic: `OutlineSyntaxNodeContainer`].\n\n\n`Emphasis` (class)\n==================\n\nWriting convention\n [topic: Emphasis]\n\nExtends\n [topic: `RichInlineSyntaxNode`]\n\nConstructor arguments\n See the constructor arguments for [topic: `RichInlineSyntaxNode`].\n\nRendered HTML\n ````\n Hi there!\n ````\n\n\n`ExampleUserInput` (class)\n==========================\n\nWriting convention\n [topic: Example user input]\n\nImplements\n [topic: `InlineSyntaxNode`]\n\nUnique members\n `userInput`: `string`\n The example of user input.\n\nRendered HTML\n ````\n esc\n ````\n\n\n`Footnote` (class)\n==================\n\nWriting convention\n [topic: Footnotes]\n\nExtends\n [topic: `RichInlineSyntaxNode`]\n\nUnique members\n `referenceNumber`: `number`\n The number that appears in superscript for this footnote. Within a given document, this value must be unique.\n\nConstructor arguments\n `children`: array of [topic: `InlineSyntaxNode`]\n A collection of inline syntax nodes representing the content of this footnote.\n\n `options` (optional)\n `referenceNumber`: number\n This field is described above.\n\nRendered HTML\n ````\n \n 1\n \n ````\n\n\n`FootnoteBlock` (class)\n=======================\n\nFootnotes are written inline, but they aren\'t meant to appear inline in the final document. That would defeat the purpose of footnotes! Instead, footnotes are extracted and placed in footnote blocks. This class represents one of those footnote blocks.\n\nImplements\n [topic: `OutlineSyntaxNode`]\n\nUnique members\n `footnotes`: array of [topic: Footnote]\n The collection of footnotes comprising this footnote block.\n\nConstructor arguments\n `footnotes`: array of [topic: Footnote]\n This field is described above.\n\nRendered HTML\n ````\n
          \n
          \n 1\n
          \n
          No relation to Warcraft!
          \n
          \n 2\n
          \n
          The pathfinding algorithm had issues.
          \n
          \n ````\n\n\n`Heading` (class)\n=================\n\nWriting convention\n [topic: Headings]\n\nExtends\n [topic: `InlineSyntaxNodeContainer`]\n\nImplements\n [topic: `Document.TableOfContents.Entry`]\n Headings are special! No other syntax node implements this interface.\n\n [topic: `OutlineSyntaxNode`]\n But headings also serve as regular old outline syntax nodes.\n\nUnique members\n `level`: `number`\n A heading\'s level represents its significance in the document. Like HTML heading levels, a level of 1 is considered the most significant.\n\nConstructor arguments\n `children`: array of [topic: `InlineSyntaxNode`]\n A collection of inline syntax nodes representing the content of this heading.\n\n `options`\n `level`: `number`\n This field is described above.\n\n `titleMarkup`: string\n Represents the markup for the "content line" of this heading.\n\n Section links compare their `markupSnippetFromSectionTitle` against this field.\n\n `ordinalInTableOfContents` (optional): `number`\n Represents this heading\'s ordinal in the table of contents. The first ordinal is `1`, not `0`.\n\n `sourceLineNumber` (optional): number\n The line number of the first line of markup that created this heading.\n\nRendered HTML\n Levels 1--6\n Headings with levels 1 through 6 render the appropriate heading element.\n\n ````\n

          \n I am a level 1 heading!\n

          \n\n
          \n I am a level 6 heading!\n
          \n ````\n Levels 7 and higher\n Headings with levels 7 and higher render `
          ` elements with an `aria-level` attribute equal to their level.\n\n ````\n
          \n I am a level 7 heading!\n
          \n\n
          \n I am a level 10 heading!\n
          \n ````\n\n\n`Highlight` (class)\n===================\n\nWriting convention\n [topic: Highlighting]\n\nExtends\n [topic: `RichInlineSyntaxNode`]\n\nConstructor arguments\n See the constructor arguments for [topic: `RichInlineSyntaxNode`].\n\nRendered HTML\n ````\n Hi there!\n ````\n\n\n`Image` (class)\n===============\n\nWriting convention\n [topic: Images]\n\nExtends\n [topic: `MediaSyntaxNode`]\n\nConstructor arguments\n See the constructor arguments for [topic: `MediaSyntaxNode`].\n\nRendered HTML\n ````\n Super Mario Land box art\n ````\n\n\n`InlineCode` (class)\n====================\n\nWriting convention\n [topic: Inline code]\n\nImplements\n [topic: `InlineSyntaxNode`]\n\nUnique members\n `code`: `string`\n The inline code represented by this syntax node.\n\nConstructor arguments\n `code`: `string`\n This field is described above.\n\nRendered HTML\n ````\n interface\n ````\n\n\n`InlineQuote` (class)\n=====================\n\nWriting convention\n [topic: Inline quotes]\n\nExtends\n [topic: `RichInlineSyntaxNode`]\n\nConstructor arguments\n See the constructor arguments for [topic: `RichInlineSyntaxNode`].\n\nRendered HTML\n ````\n I know!\n ````\n\n\n`InlineRevealable` (class)\n==========================\n\nWriting convention\n [topic: Inline revealables]\n\nExtends\n [topic: `RichInlineSyntaxNode`]\n\nConstructor arguments\n See the constructor arguments for [topic: `RichInlineSyntaxNode`].\n\nRendered HTML\n ````\n \n \n \n \n \n Ash fights Gary\n \n ````\n\n\n`Italic` (class)\n================\n\nWriting convention\n [topic: Italics]\n\nExtends\n [topic: `RichInlineSyntaxNode`]\n\nConstructor arguments\n See the constructor arguments for [topic: `RichInlineSyntaxNode`].\n\nRendered HTML\n ````\n I know!\n ````\n\n\n`LineBlock` (class)\n===================\n\nWriting convention\n [topic: Line blocks]\n\nImplements\n [topic: `OutlineSyntaxNode`]\n\nUnique members\n `lines`: array of [topic: `LineBlock.Line`]\n The collection of lines comprising this line block.\n\nConstructor arguments\n `lines`: array of [topic: `LineBlock.Line`]\n This field is described above.\n\n `options` (optional)\n `sourceLineNumber`: number\n The line number of the first line of markup that created this syntax node.\n\nRendered HTML\n ````\n
          \n
          Roses are red
          \n
          Violets are blue
          \n
          \n ````\n\n------------------------\n`LineBlock.Line` (class)\n------------------------\n\nThis class represents a line in a line block.\n\nExtends\n [topic: `InlineSyntaxNodeContainer`]\n\nConstructor arguments\n See the constructor arguments for [topic: `InlineSyntaxNodeContainer`].\n\n\n`Link` (class)\n==============\n\nWriting convention\n [topic: Italics]\n\nExtends\n [topic: `RichInlineSyntaxNode`]\n\nImplements\n [topic: `OutlineSyntaxNode`]\n If a line consists solely of media conventions (or media conventions within links), those media conventions (or their outer links) are placed directly into the outline.\n\nUnique members\n `url`: `string`\n This links\'s URL after the following settings are applied:\n\n - [topic: `defaultUrlScheme`]\n - [topic: `baseForUrlsStartingWithSlash`]\n - [topic: `baseForUrlsStartingWithHashmark`]\n\nConstructor arguments\n `children`: array of [topic: `InlineSyntaxNode`]\n A collection of inline syntax nodes representing the content of this link.\n\n `url`: `string`\n This field is described above.\n\n `options`\n `sourceLineNumber` (optional): number\n The line number of the line of markup that created this link.\n\nRendered HTML\n ````\n Hi there!\n ````\n\n\n`NormalParenthetical` (class)\n=============================\n\nWriting convention\n [topic: Parenthetical text] produced by parentheses\n\nExtends\n [topic: `ParentheticalSyntaxNode`]\n\nConstructor arguments\n See the constructor arguments for [topic: `ParentheticalSyntaxNode`].\n\nRendered HTML\n ````\n (Hi there!)\n ````\n\n\n`NumberedList` (class)\n======================\n\nWriting convention\n [topic: Numbered lists]\n\nImplements\n [topic: `OutlineSyntaxNode`]\n\nUnique members\n `items`: array of [topic: `NumberedList.Item`]\n The collection of items comprising this numbered list.\n\n `start` method\n Return type: `number`\n This method returns the starting ordinal of this list, if one was explicitly defined. Otherwise, this method returns `undefined`.\n\n Arguments\n None.\n\n `order` method\n Return type: [topic: `NumberedList.Order`]\n This method returns the order of this numered list.\n\n Arguments\n None.\n\nConstructor arguments\n `items`: array of [topic: `NumberedList.Item`]\n This field is described above.\n\n `options` (optional)\n `sourceLineNumber`: number\n The line number of the first line of markup that created this numbered list.\n\nRendered HTML\n ````\n
            \n
          1. \n

            Buy milk

            \n
          2. \n
          3. \n

            Buy bread

            \n
          4. \n
          5. \n

            Buy happiness

            \n
          6. \n
          \n ````\n\n\n---------------------------\n`NumberedList.Item` (class)\n---------------------------\n\nThis class represents an item in a numbered list.\n\nExtends\n [topic: `OutlineSyntaxNodeContainer`]\n\nConstructor arguments\n `children`: array of [topic: `OutlineSyntaxNode`]\n A collection of outline syntax nodes representing the content of this list item.\n\n `options` (optional)\n `ordinal`: number\n This field is described above.\n\n\n---------------------------\n`NumberedList.Order` (enum)\n---------------------------\n\nThis enum represents the order of a numbered list. It has two members:\n\n- `Ascending`, whose value is `1`\n- `Descending`, whose value is `2`\n\n\n`Paragraph` (class)\n===================\n\nWriting convention\n [topic: Paragraphs]\n\nExtends\n [topic: `InlineSyntaxNodeContainer`]\n\nImplements\n [topic: `OutlineSyntaxNode`]\n\nConstructor arguments\n `children`: array of [topic: `InlineSyntaxNode`]\n A collection of inline syntax nodes representing the content of this paragraph.\n\n `options` (optional)\n `sourceLineNumber`: number\n The line number of the line of markup that created this paragraph.\n\nRendered HTML\n ````\n

          Hi there!

          \n ````\n\n\n`RevealableBlock` (class)\n=========================\n\nWriting convention\n [topic: Revealable blocks]\n\nExtends\n [topic: `RichOutlineSyntaxNode`]\n\nConstructor arguments\n See the constructor arguments for [topic: `RichOutlineSyntaxNode`].\n\nRendered HTML\n ````\n
          \n \n \n \n \n
          \n

          Ash fights Gary.

          \n
          \n
          \n ````\n\n\n`SectionLink` (class)\n=====================\n\nWriting convention\n [topic: Section links]\n\nImplements\n [topic: `InlineSyntaxNode`]\n\nUnique members\n `markupSnippetFromSectionTitle`: `string`\n This field is compared against the `titleMarkup` field of every table of contents entry to find the most appropriate match.\n\nConstructor arguments\n `markupSnippetFromSectionTitle`: `string`\n This field is described above.\n\n `entry`: [topic: `Document.TableOfContents.Entry`]\n The table of contents entry (i.e. heading) this section link points to.\n\nRendered HTML\n When matched with a heading\n Up renders a link to that heading. The rendered link contains the heading\'s content.\n\n ````\n Using the Up library\n ````\n\n When *not* matched with a heading\n Up renders the value of `markupSnippetFromSectionTitle` in italics.\n\n ````\n Up library\n ````\n\n\n`SquareParenthetical` (class)\n=============================\n\nWriting convention\n [topic: Parenthetical text] produced by square brackets\n\nExtends\n [topic: `ParentheticalSyntaxNode`]\n\nConstructor arguments\n See the constructor arguments for [topic: `ParentheticalSyntaxNode`].\n\nRendered HTML\n ````\n [Hi there!]\n ````\n\n\n`Stress` (class)\n================\n\nWriting convention\n [topic: Stress]\n\nExtends\n [topic: `RichInlineSyntaxNode`]\n\nConstructor arguments\n See the constructor arguments for [topic: `RichInlineSyntaxNode`].\n\nRendered HTML\n ````\n Hi there!\n ````\n\n\n`Table` (class)\n===============\n\nWriting convention\n [topic: Tables]\n\nImplements\n [topic: `OutlineSyntaxNode`]\n\nUnique members\n `header`: [topic: `Table.Header`]\n The header row.\n\n `rows`: array of [topic: `Table.Row`]\n The content rows.\n\n `caption`: [topic: `Table.Caption`]\n The optional caption.\n\nConstructor arguments\n `header`: [topic: `Table.Header`]\n This field is described above.\n\n `rows`: array of [topic: `Table.Row`]\n This field is described above.\n\n `caption`: [topic: `Table.Caption`]\n This field is described above.\n\n `options` (optional)\n `sourceLineNumber`: number\n The line number of the first line of markup that created this table.\n\nRendered HTML\n Without header column\n ````\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
          Moves learned by the Pokémon Bulbasaur
          LevelMoveTypePowerAccuracy
          1TackleNormal50100%
          3GrowlNormal100%
          \n ````\n\n With header column\n ````\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
          Moves learned by the Pokémon Bulbasaur
          LevelTypePowerAccuracy
          Tackle1Normal50100%
          Growl3Normal100%
          \n ````\n\n\n-----------------------\n`Table.Caption` (class)\n-----------------------\n\nThis class represents the caption of a table.\n\nExtends\n [topic: `InlineSyntaxNodeContainer`]\n\nConstructor arguments\n See the constructor arguments for [topic: `InlineSyntaxNodeContainer`].\n\n\n--------------------\n`Table.Cell` (class)\n--------------------\n\nThis abstract class represents a table cell.\n\nExtends\n [topic: `InlineSyntaxNodeContainer`]\n\nUnique members\n `isNumeric` method\n Return type: `boolean`\n This method returns a `boolean` indicating whether the content of this cell is numeric.\n\n Arguments\n None.\n\nConstructor arguments\n See the constructor arguments for [topic: `InlineSyntaxNodeContainer`].\n\n\n----------------------\n`Table.Header` (class)\n----------------------\n\nThis class represents the header row of a table.\n\nUnique members\n `cells`: array of [topic: `Table.Header.Cell`]\n The cells in this header row.\n\nConstructor arguments\n `cells`: array of [topic: `Table.Header.Cell`]\n This field is described above.\n\n\n`Table.Header.Cell` (class)\n---------------------------\n\nThis class represents a table header cell.\n\nExtends\n [topic: `Table.Cell`]\n\nConstructor arguments\n See the constructor arguments for [topic: `InlineSyntaxNodeContainer`].\n\n\n-------------------\n`Table.Row` (class)\n-------------------\n\nThis class represents a content row in a table.\n\nUnique members\n `cells`: array of [topic: `Table.Row.Cell`]\n The content cells in this row.\n\n `headerColumnCell`: [topic: `Table.Header.Cell`]\n The single header column cell for this row, if there is one.\n\n Tables without header columns never have header column cells.\n\n `allCellsStartingWithHeaderColumnCell` method\n Return type: array of [topic: `Table.Cell`]\n This method returns every cell in this row.\n\n If the table has a header column, the row\'s `headerColumnCell` is the first item in the returned collection.\n\n Arguments\n None.\n\nConstructor arguments\n `cells`: array of [topic: `Table.Row.Cell`]\n This field is described above.\n\n `headerColumnCell`: [topic: `Table.Header.Cell`]\n This field is described above.\n\n\n`Table.Row.Cell` (class)\n------------------------\n\nThis class represents a regular (non-header) table cell.\n\nExtends\n [topic: `Table.Cell`]\n\nConstructor arguments\n See the constructor arguments for [topic: `InlineSyntaxNodeContainer`].\n\n\n`Text` (class)\n==============\n\nThis class represents regular text content.\n\nImplements\n [topic: `InlineSyntaxNode`]\n\nUnique members\n `text`: `string`\n The text represented by this syntax node.\n\nConstructor arguments\n `text`: `string`\n This field is described above.\n\nRendered HTML\n ````\n Yes, 1 < 2\n ````\n\n\n`ThematicBreak` (class)\n=======================\n\nWriting convention\n [topic: Thematic breaks]\n\nExtends\n [topic: `OutlineSyntaxNode`]\n\nConstructor arguments\n `options` (optional)\n `sourceLineNumber`: number\n The line number of the line of markup that created this thematic break.\n\nRendered HTML\n ````\n
          \n ````\n\n\n`Video` (class)\n===============\n\nWriting convention\n [topic: Video]\n\nExtends\n [topic: `MediaSyntaxNode`]\n\nConstructor arguments\n See the constructor arguments for [topic: `MediaSyntaxNode`].\n\nRendered HTML\n ````\n \n ````'},function(e,n,t){"use strict";t.r(n);t(68);var r=document.getElementById.bind(document),o=t(12),i=t.n(o),a=t(35);function s(e,n){var t;return function(){for(var r=arguments.length,o=new Array(r),i=0;i=o){var i={line:r.dataset.upSourceLine-1,ch:0},a=e.charCoords(i,"local").top;return void e.scrollTo(null,a)}}}}function y(e,n){var t=1+e.lineAtHeight(0,"window");if(1!==t)for(var r=0;r=t)return void o.scrollIntoView()}else n.scrollTop=0}function b(e){e.tab.addEventListener("click",function(){return k(e)})}function k(e){var n=e.tab,t=e.otherTab;T(n,"true"),T(t,"false"),w(n).style.display="block",w(t).style.display="none"}function T(e,n){e.setAttribute("aria-selected",n)}function w(e){return r(e.getAttribute("aria-controls"))}document.addEventListener("DOMContentLoaded",function(){var e,n,t,o,i=r("editor-container"),a=r("documentation-container");-1!==["iPhone","iPad","iPod"].indexOf(navigator.platform)?(i.style.display="none",a.style.marginLeft=0):g({editorContainerElement:i,documentationContainerElement:a,documentationScrollerElement:document.body,documentationElement:r("documentation"),tableOfContentsElement:r("table-of-contents")}),e=r("show-documentation"),n=r("show-table-of-contents"),b({tab:e,otherTab:n}),b({tab:n,otherTab:e}),t=w(n),o=function(t){var r=t.target.tagName;"LABEL"!==r&&"INPUT"!==r&&k({tab:e,otherTab:n})},t.addEventListener("click",function(e){var n=e.target;do{if("A"===n.tagName)return void o(e)}while(n=n.parentNode)}),a.addEventListener("keydown",function(e){var n=e.target;n.hasAttribute("tabindex")&&-1!==[13,32].indexOf(e.keyCode)&&(e.preventDefault(),n.click())})})}]); \ No newline at end of file +!function(e){var n={};function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)t.d(r,o,function(n){return e[n]}.bind(null,o));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s=99)}([function(e,n,t){"use strict";function r(e){return"(?:"+e+")"}function o(e,n){return r(n)+"{"+e+",}"}function i(){for(var e=[],n=0;n=this.lines.length},e.prototype.remaining=function(){return this.lines.slice(this._countLinesConsumed)},e.prototype.advance=function(e){this._countLinesConsumed+=e},e.prototype.consumeLineIfMatches=function(e,n){if(this.done())return null;var t=this.nextRemainingLine(),r=e.exec(t);if(r){var o={line:t,captures:r.slice(1)};if(!n||n.andIf(o))return this.advance(1),o}return null},e.prototype.consumeLine=function(){if(this.done())throw new Error("No remaining lines");var e=this.nextRemainingLine();return this.advance(1),e},e.prototype.nextRemainingLine=function(){return this.lines[this._countLinesConsumed]},e}();n.LineConsumer=r},function(e,n,t){"use strict";var r,o=this&&this.__extends||(r=function(e,n){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t])})(e,n)},function(e,n){function t(){this.constructor=e}r(e,n),e.prototype=null===n?Object.create(n):(t.prototype=n.prototype,new t)});Object.defineProperty(n,"__esModule",{value:!0}),n.RichInlineSyntaxNode=void 0;var i=t(37),a=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return o(n,e),n.prototype.textAppearingInline=function(){return i.getTextAppearingInline(this.children)},n}(t(6).InlineSyntaxNodeContainer);n.RichInlineSyntaxNode=a},function(e,n,t){"use strict";var r=this&&this.__spreadArrays||function(){for(var e=0,n=0,t=arguments.length;n=15&&(d=!1,l=!0);var w=y&&(c||d&&(null==T||T<12.11)),C=t||a&&s>=9;function x(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var S,L=function(e,n){var t=e.className,r=x(n).exec(t);if(r){var o=t.slice(r.index+r[0].length);e.className=t.slice(0,r.index)+(o?r[1]+o:"")}};function O(e){for(var n=e.childNodes.length;n>0;--n)e.removeChild(e.firstChild);return e}function I(e,n){return O(e).appendChild(n)}function A(e,n,t,r){var o=document.createElement(e);if(t&&(o.className=t),r&&(o.style.cssText=r),"string"==typeof n)o.appendChild(document.createTextNode(n));else if(n)for(var i=0;i=n)return a+(n-i);a+=s-i,a+=t-a%t,i=s+1}}m?P=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:a&&(P=function(e){try{e.select()}catch(e){}});var D=function(){this.id=null};function F(e,n){for(var t=0;t=n)return r+Math.min(a,n-o);if(o+=i-r,r=i+1,(o+=t-o%t)>=n)return r}}var V=[""];function Y(e){for(;V.length<=e;)V.push(X(V)+" ");return V[e]}function X(e){return e[e.length-1]}function Q(e,n){for(var t=[],r=0;r"€"&&(e.toUpperCase()!=e.toLowerCase()||Z.test(e))}function ne(e,n){return n?!!(n.source.indexOf("\\w")>-1&&ee(e))||n.test(e):ee(e)}function te(e){for(var n in e)if(e.hasOwnProperty(n)&&e[n])return!1;return!0}var re=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function oe(e){return e.charCodeAt(0)>=768&&re.test(e)}function ie(e,n,t){for(;(t<0?n>0:nt?-1:1;;){if(n==t)return n;var o=(n+t)/2,i=r<0?Math.ceil(o):Math.floor(o);if(i==n)return e(i)?n:t;e(i)?t=i:n=i+r}}var se=null;function le(e,n,t){var r;se=null;for(var o=0;on)return o;i.to==n&&(i.from!=i.to&&"before"==t?r=o:se=o),i.from==n&&(i.from!=i.to&&"before"!=t?r=o:se=o)}return null!=r?r:se}var ce=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",n="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111",t=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,r=/[stwN]/,o=/[LRr]/,i=/[Lb1n]/,a=/[1n]/;function s(e,n,t){this.level=e,this.from=n,this.to=t}return function(l,c){var u="ltr"==c?"L":"R";if(0==l.length||"ltr"==c&&!t.test(l))return!1;for(var d,p=l.length,h=[],f=0;f-1&&(r[n]=o.slice(0,i).concat(o.slice(i+1)))}}}function me(e,n){var t=he(e,n);if(t.length)for(var r=Array.prototype.slice.call(arguments,2),o=0;o0}function be(e){e.prototype.on=function(e,n){pe(this,e,n)},e.prototype.off=function(e,n){fe(this,e,n)}}function ke(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Te(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function we(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function Ce(e){ke(e),Te(e)}function xe(e){return e.target||e.srcElement}function Se(e){var n=e.which;return null==n&&(1&e.button?n=1:2&e.button?n=3:4&e.button&&(n=2)),y&&e.ctrlKey&&1==n&&(n=3),n}var Le,Oe,Ie=function(){if(a&&s<9)return!1;var e=A("div");return"draggable"in e||"dragDrop"in e}();function Ae(e){if(null==Le){var n=A("span","​");I(e,A("span",[n,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(Le=n.offsetWidth<=1&&n.offsetHeight>2&&!(a&&s<8))}var t=Le?A("span","​"):A("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return t.setAttribute("cm-text",""),t}function Me(e){if(null!=Oe)return Oe;var n=I(e,document.createTextNode("AخA")),t=S(n,0,1).getBoundingClientRect(),r=S(n,1,2).getBoundingClientRect();return O(e),!(!t||t.left==t.right)&&(Oe=r.right-t.right<3)}var Ne,Ee=3!="\n\nb".split(/\n/).length?function(e){for(var n=0,t=[],r=e.length;n<=r;){var o=e.indexOf("\n",n);-1==o&&(o=e.length);var i=e.slice(n,"\r"==e.charAt(o-1)?o-1:o),a=i.indexOf("\r");-1!=a?(t.push(i.slice(0,a)),n+=a+1):(t.push(i),n=o+1)}return t}:function(e){return e.split(/\r\n?|\n/)},_e=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(e){return!1}}:function(e){var n;try{n=e.ownerDocument.selection.createRange()}catch(e){}return!(!n||n.parentElement()!=e)&&0!=n.compareEndPoints("StartToEnd",n)},Re="oncopy"in(Ne=A("div"))||(Ne.setAttribute("oncopy","return;"),"function"==typeof Ne.oncopy),Pe=null,Be={},He={};function We(e,n){arguments.length>2&&(n.dependencies=Array.prototype.slice.call(arguments,2)),Be[e]=n}function De(e){if("string"==typeof e&&He.hasOwnProperty(e))e=He[e];else if(e&&"string"==typeof e.name&&He.hasOwnProperty(e.name)){var n=He[e.name];"string"==typeof n&&(n={name:n}),(e=J(n,e)).name=n.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return De("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return De("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Fe(e,n){n=De(n);var t=Be[n.name];if(!t)return Fe(e,"text/plain");var r=t(e,n);if(Ue.hasOwnProperty(n.name)){var o=Ue[n.name];for(var i in o)o.hasOwnProperty(i)&&(r.hasOwnProperty(i)&&(r["_"+i]=r[i]),r[i]=o[i])}if(r.name=n.name,n.helperType&&(r.helperType=n.helperType),n.modeProps)for(var a in n.modeProps)r[a]=n.modeProps[a];return r}var Ue={};function je(e,n){H(n,Ue.hasOwnProperty(e)?Ue[e]:Ue[e]={})}function ze(e,n){if(!0===n)return n;if(e.copyState)return e.copyState(n);var t={};for(var r in n){var o=n[r];o instanceof Array&&(o=o.concat([])),t[r]=o}return t}function Ge(e,n){for(var t;e.innerMode&&(t=e.innerMode(n))&&t.mode!=e;)n=t.state,e=t.mode;return t||{mode:e,state:n}}function qe(e,n,t){return!e.startState||e.startState(n,t)}var Ke=function(e,n,t){this.pos=this.start=0,this.string=e,this.tabSize=n||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=t};function Ve(e,n){if((n-=e.first)<0||n>=e.size)throw new Error("There is no line "+(n+e.first)+" in the document.");for(var t=e;!t.lines;)for(var r=0;;++r){var o=t.children[r],i=o.chunkSize();if(n=e.first&&nt?nn(t,Ve(e,t).text.length):function(e,n){var t=e.ch;return null==t||t>n?nn(e.line,n):t<0?nn(e.line,0):e}(n,Ve(e,n.line).text.length)}function un(e,n){for(var t=[],r=0;r=this.string.length},Ke.prototype.sol=function(){return this.pos==this.lineStart},Ke.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Ke.prototype.next=function(){if(this.posn},Ke.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Ke.prototype.skipToEnd=function(){this.pos=this.string.length},Ke.prototype.skipTo=function(e){var n=this.string.indexOf(e,this.pos);if(n>-1)return this.pos=n,!0},Ke.prototype.backUp=function(e){this.pos-=e},Ke.prototype.column=function(){return this.lastColumnPos0?null:(r&&!1!==n&&(this.pos+=r[0].length),r)}var o=function(e){return t?e.toLowerCase():e};if(o(this.string.substr(this.pos,e.length))==o(e))return!1!==n&&(this.pos+=e.length),!0},Ke.prototype.current=function(){return this.string.slice(this.start,this.pos)},Ke.prototype.hideFirstChars=function(e,n){this.lineStart+=e;try{return n()}finally{this.lineStart-=e}},Ke.prototype.lookAhead=function(e){var n=this.lineOracle;return n&&n.lookAhead(e)},Ke.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var dn=function(e,n){this.state=e,this.lookAhead=n},pn=function(e,n,t,r){this.state=n,this.doc=e,this.line=t,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};function hn(e,n,t,r){var o=[e.state.modeGen],i={};wn(e,n.text,e.doc.mode,t,function(e,n){return o.push(e,n)},i,r);for(var a=t.state,s=function(r){t.baseTokens=o;var s=e.state.overlays[r],l=1,c=0;t.state=!0,wn(e,n.text,s.mode,t,function(e,n){for(var t=l;ce&&o.splice(l,1,e,o[l+1],r),l+=2,c=Math.min(e,r)}if(n)if(s.opaque)o.splice(t,l-t,e,"overlay "+n),l=t+2;else for(;te.options.maxHighlightLength&&ze(e.doc.mode,r.state),i=hn(e,n,r);o&&(r.state=o),n.stateAfter=r.save(!o),n.styles=i.styles,i.classes?n.styleClasses=i.classes:n.styleClasses&&(n.styleClasses=null),t===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return n.styles}function mn(e,n,t){var r=e.doc,o=e.display;if(!r.mode.startState)return new pn(r,!0,n);var i=function(e,n,t){for(var r,o,i=e.doc,a=t?-1:n-(e.doc.mode.innerMode?1e3:100),s=n;s>a;--s){if(s<=i.first)return i.first;var l=Ve(i,s-1),c=l.stateAfter;if(c&&(!t||s+(c instanceof dn?c.lookAhead:0)<=i.modeFrontier))return s;var u=W(l.text,null,e.options.tabSize);(null==o||r>u)&&(o=s-1,r=u)}return o}(e,n,t),a=i>r.first&&Ve(r,i-1).stateAfter,s=a?pn.fromSaved(r,a,i):new pn(r,qe(r.mode),i);return r.iter(i,n,function(t){gn(e,t.text,s);var r=s.line;t.stateAfter=r==n-1||r%5==0||r>=o.viewFrom&&rn.start)return i}throw new Error("Mode "+e.name+" failed to advance stream.")}pn.prototype.lookAhead=function(e){var n=this.doc.getLine(this.line+e);return null!=n&&e>this.maxLookAhead&&(this.maxLookAhead=e),n},pn.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var n=this.baseTokens[this.baseTokenPos+1];return{type:n&&n.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},pn.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},pn.fromSaved=function(e,n,t){return n instanceof dn?new pn(e,ze(e.mode,n.state),t,n.lookAhead):new pn(e,ze(e.mode,n),t)},pn.prototype.save=function(e){var n=!1!==e?ze(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new dn(n,this.maxLookAhead):n};var bn=function(e,n,t){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=n||null,this.state=t};function kn(e,n,t,r){var o,i,a=e.doc,s=a.mode,l=Ve(a,(n=cn(a,n)).line),c=mn(e,n.line,t),u=new Ke(l.text,e.options.tabSize,c);for(r&&(i=[]);(r||u.pose.options.maxHighlightLength?(s=!1,a&&gn(e,n,r,d.pos),d.pos=n.length,l=null):l=Tn(yn(t,d,r.state,p),i),p){var h=p[0].name;h&&(l="m-"+(l?h+" "+l:h))}if(!s||u!=l){for(;c=n:i.to>n);(r||(r=[])).push(new Sn(a,i.from,s?null:i.to))}}return r}(t,o,a),l=function(e,n,t){var r;if(e)for(var o=0;o=n:i.to>n)||i.from==n&&"bookmark"==a.type&&(!t||i.marker.insertLeft)){var s=null==i.from||(a.inclusiveLeft?i.from<=n:i.from0&&s)for(var b=0;bn)&&(!t||Rn(t,i.marker)<0)&&(t=i.marker)}return t}function Dn(e,n,t,r,o){var i=Ve(e,n),a=xn&&i.markedSpans;if(a)for(var s=0;s=0&&d<=0||u<=0&&d>=0)&&(u<=0&&(l.marker.inclusiveRight&&o.inclusiveLeft?tn(c.to,t)>=0:tn(c.to,t)>0)||u>=0&&(l.marker.inclusiveRight&&o.inclusiveLeft?tn(c.from,r)<=0:tn(c.from,r)<0)))return!0}}}function Fn(e){for(var n;n=Bn(e);)e=n.find(-1,!0).line;return e}function Un(e,n){var t=Ve(e,n),r=Fn(t);return t==r?n:$e(r)}function jn(e,n){if(n>e.lastLine())return n;var t,r=Ve(e,n);if(!zn(e,r))return n;for(;t=Hn(r);)r=t.find(1,!0).line;return $e(r)+1}function zn(e,n){var t=xn&&n.markedSpans;if(t)for(var r=void 0,o=0;on.maxLineLength&&(n.maxLineLength=t,n.maxLine=e)})}var Yn=function(e,n,t){this.text=e,Nn(this,n),this.height=t?t(this):1};function Xn(e){e.parent=null,Mn(e)}Yn.prototype.lineNo=function(){return $e(this)},be(Yn);var Qn={},$n={};function Jn(e,n){if(!e||/^\s*$/.test(e))return null;var t=n.addModeClass?$n:Qn;return t[e]||(t[e]=e.replace(/\S+/g,"cm-$&"))}function Zn(e,n){var t=M("span",null,null,l?"padding-right: .1px":null),r={pre:M("pre",[t],"CodeMirror-line"),content:t,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};n.measure={};for(var o=0;o<=(n.rest?n.rest.length:0);o++){var i=o?n.rest[o-1]:n.line,a=void 0;r.pos=0,r.addToken=nt,Me(e.display.measure)&&(a=ue(i,e.doc.direction))&&(r.addToken=tt(r.addToken,a)),r.map=[],ot(i,r,fn(e,i,n!=e.display.externalMeasured&&$e(i))),i.styleClasses&&(i.styleClasses.bgClass&&(r.bgClass=R(i.styleClasses.bgClass,r.bgClass||"")),i.styleClasses.textClass&&(r.textClass=R(i.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(Ae(e.display.measure))),0==o?(n.measure.map=r.map,n.measure.cache={}):((n.measure.maps||(n.measure.maps=[])).push(r.map),(n.measure.caches||(n.measure.caches=[])).push({}))}if(l){var s=r.content.lastChild;(/\bcm-tab\b/.test(s.className)||s.querySelector&&s.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return me(e,"renderLine",e,n.line,r.pre),r.pre.className&&(r.textClass=R(r.pre.className,r.textClass||"")),r}function et(e){var n=A("span","•","cm-invalidchar");return n.title="\\u"+e.charCodeAt(0).toString(16),n.setAttribute("aria-label",n.title),n}function nt(e,n,t,r,o,i,l){if(n){var c,u=e.splitSpaces?function(e,n){if(e.length>1&&!/ /.test(e))return e;for(var t=n,r="",o=0;oc&&d.from<=c);p++);if(d.to>=u)return e(t,r,o,i,a,s,l);e(t,r.slice(0,d.to-c),o,i,null,s,l),i=null,r=r.slice(d.to-c),c=d.to}}}function rt(e,n,t,r){var o=!r&&t.widgetNode;o&&e.map.push(e.pos,e.pos+n,o),!r&&e.cm.display.input.needsContentAttribute&&(o||(o=e.content.appendChild(document.createElement("span"))),o.setAttribute("cm-marker",t.id)),o&&(e.cm.display.input.setUneditable(o),e.content.appendChild(o)),e.pos+=n,e.trailingSpace=!1}function ot(e,n,t){var r=e.markedSpans,o=e.text,i=0;if(r)for(var a,s,l,c,u,d,p,h=o.length,f=0,m=1,g="",v=0;;){if(v==f){l=c=u=s="",p=null,d=null,v=1/0;for(var y=[],b=void 0,k=0;kf||w.collapsed&&T.to==f&&T.from==f)){if(null!=T.to&&T.to!=f&&v>T.to&&(v=T.to,c=""),w.className&&(l+=" "+w.className),w.css&&(s=(s?s+";":"")+w.css),w.startStyle&&T.from==f&&(u+=" "+w.startStyle),w.endStyle&&T.to==v&&(b||(b=[])).push(w.endStyle,T.to),w.title&&((p||(p={})).title=w.title),w.attributes)for(var C in w.attributes)(p||(p={}))[C]=w.attributes[C];w.collapsed&&(!d||Rn(d.marker,w)<0)&&(d=T)}else T.from>f&&v>T.from&&(v=T.from)}if(b)for(var x=0;x=h)break;for(var L=Math.min(h,v);;){if(g){var O=f+g.length;if(!d){var I=O>L?g.slice(0,L-f):g;n.addToken(n,I,a?a+l:l,u,f+I.length==v?c:"",s,p)}if(O>=L){g=g.slice(L-f),f=L;break}f=O,u=""}g=o.slice(i,i=t[m++]),a=Jn(t[m++],n.cm.options)}}else for(var A=1;At)return{map:e.measure.maps[o],cache:e.measure.caches[o],before:!0}}function Nt(e,n,t,r){return Rt(e,_t(e,n),t,r)}function Et(e,n){if(n>=e.display.viewFrom&&n=t.lineN&&n2&&i.push((l.bottom+c.top)/2-t.top)}}i.push(t.bottom-t.top)}}(e,n.view,n.rect),n.hasHeights=!0),(i=function(e,n,t,r){var o,i=Ht(n.map,t,r),l=i.node,c=i.start,u=i.end,d=i.collapse;if(3==l.nodeType){for(var p=0;p<4;p++){for(;c&&oe(n.line.text.charAt(i.coverStart+c));)--c;for(;i.coverStart+u1}(e))return n;var t=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:n.left*t,right:n.right*t,top:n.top*r,bottom:n.bottom*r}}(e.display.measure,o))}else{var h;c>0&&(d=r="right"),o=e.options.lineWrapping&&(h=l.getClientRects()).length>1?h["right"==r?h.length-1:0]:l.getBoundingClientRect()}if(a&&s<9&&!c&&(!o||!o.left&&!o.right)){var f=l.parentNode.getClientRects()[0];o=f?{left:f.left,right:f.left+ir(e.display),top:f.top,bottom:f.bottom}:Bt}for(var m=o.top-n.rect.top,g=o.bottom-n.rect.top,v=(m+g)/2,y=n.view.measure.heights,b=0;bn)&&(o=(i=l-s)-1,n>=l&&(a="right")),null!=o){if(r=e[c+2],s==l&&t==(r.insertLeft?"left":"right")&&(a=t),"left"==t&&0==o)for(;c&&e[c-2]==e[c-3]&&e[c-1].insertLeft;)r=e[2+(c-=3)],a="left";if("right"==t&&o==l-s)for(;c=0&&(t=e[o]).left==t.right;o--);return t}function Dt(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var n=0;n=r.text.length?(l=r.text.length,c="before"):l<=0&&(l=0,c="after"),!s)return a("before"==c?l-1:l,"before"==c);function u(e,n,t){return a(t?e-1:e,1==s[n].level!=t)}var d=le(s,l,c),p=se,h=u(l,d,"before"==c);return null!=p&&(h.other=u(l,p,"before"!=c)),h}function Xt(e,n){var t=0;n=cn(e.doc,n),e.options.lineWrapping||(t=ir(e.display)*n.ch);var r=Ve(e.doc,n.line),o=qn(r)+xt(e.display);return{left:t,right:t,top:o,bottom:o+r.height}}function Qt(e,n,t,r,o){var i=nn(e,n,t);return i.xRel=o,r&&(i.outside=r),i}function $t(e,n,t){var r=e.doc;if((t+=e.display.viewOffset)<0)return Qt(r.first,0,null,-1,-1);var o=Je(r,t),i=r.first+r.size-1;if(o>i)return Qt(r.first+r.size-1,Ve(r,i).text.length,null,1,1);n<0&&(n=0);for(var a=Ve(r,o);;){var s=nr(e,a,o,n,t),l=Wn(a,s.ch+(s.xRel>0||s.outside>0?1:0));if(!l)return s;var c=l.find(1);if(c.line==o)return c;a=Ve(r,o=c.line)}}function Jt(e,n,t,r){r-=Gt(n);var o=n.text.length,i=ae(function(n){return Rt(e,t,n-1).bottom<=r},o,0);return{begin:i,end:o=ae(function(n){return Rt(e,t,n).top>r},i,o)}}function Zt(e,n,t,r){return t||(t=_t(e,n)),Jt(e,n,t,qt(e,n,Rt(e,t,r),"line").top)}function er(e,n,t,r){return!(e.bottom<=t)&&(e.top>t||(r?e.left:e.right)>n)}function nr(e,n,t,r,o){o-=qn(n);var i=_t(e,n),a=Gt(n),s=0,l=n.text.length,c=!0,u=ue(n,e.doc.direction);if(u){var d=(e.options.lineWrapping?rr:tr)(e,n,t,i,u,r,o);s=(c=1!=d.level)?d.from:d.to-1,l=c?d.to:d.from-1}var p,h,f=null,m=null,g=ae(function(n){var t=Rt(e,i,n);return t.top+=a,t.bottom+=a,!!er(t,r,o,!1)&&(t.top<=o&&t.left<=r&&(f=n,m=t),!0)},s,l),v=!1;if(m){var y=r-m.left=k.bottom?1:0}return Qt(t,g=ie(n.text,g,1),h,v,r-p)}function tr(e,n,t,r,o,i,a){var s=ae(function(s){var l=o[s],c=1!=l.level;return er(Yt(e,nn(t,c?l.to:l.from,c?"before":"after"),"line",n,r),i,a,!0)},0,o.length-1),l=o[s];if(s>0){var c=1!=l.level,u=Yt(e,nn(t,c?l.from:l.to,c?"after":"before"),"line",n,r);er(u,i,a,!0)&&u.top>a&&(l=o[s-1])}return l}function rr(e,n,t,r,o,i,a){var s=Jt(e,n,r,a),l=s.begin,c=s.end;/\s/.test(n.text.charAt(c-1))&&c--;for(var u=null,d=null,p=0;p=c||h.to<=l)){var f=Rt(e,r,1!=h.level?Math.min(c,h.to)-1:Math.max(l,h.from)).right,m=fm)&&(u=h,d=m)}}return u||(u=o[o.length-1]),u.fromc&&(u={from:u.from,to:c,level:u.level}),u}function or(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==Pt){Pt=A("pre",null,"CodeMirror-line-like");for(var n=0;n<49;++n)Pt.appendChild(document.createTextNode("x")),Pt.appendChild(A("br"));Pt.appendChild(document.createTextNode("x"))}I(e.measure,Pt);var t=Pt.offsetHeight/50;return t>3&&(e.cachedTextHeight=t),O(e.measure),t||1}function ir(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var n=A("span","xxxxxxxxxx"),t=A("pre",[n],"CodeMirror-line-like");I(e.measure,t);var r=n.getBoundingClientRect(),o=(r.right-r.left)/10;return o>2&&(e.cachedCharWidth=o),o||10}function ar(e){for(var n=e.display,t={},r={},o=n.gutters.clientLeft,i=n.gutters.firstChild,a=0;i;i=i.nextSibling,++a){var s=e.display.gutterSpecs[a].className;t[s]=i.offsetLeft+i.clientLeft+o,r[s]=i.clientWidth}return{fixedPos:sr(n),gutterTotalWidth:n.gutters.offsetWidth,gutterLeft:t,gutterWidth:r,wrapperWidth:n.wrapper.clientWidth}}function sr(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function lr(e){var n=or(e.display),t=e.options.lineWrapping,r=t&&Math.max(5,e.display.scroller.clientWidth/ir(e.display)-3);return function(o){if(zn(e.doc,o))return 0;var i=0;if(o.widgets)for(var a=0;a=e.display.viewTo)return null;if((n-=e.display.viewFrom)<0)return null;for(var t=e.display.view,r=0;rn)&&(o.updateLineNumbers=n),e.curOp.viewChanged=!0,n>=o.viewTo)xn&&Un(e.doc,n)o.viewFrom?fr(e):(o.viewFrom+=r,o.viewTo+=r);else if(n<=o.viewFrom&&t>=o.viewTo)fr(e);else if(n<=o.viewFrom){var i=mr(e,t,t+r,1);i?(o.view=o.view.slice(i.index),o.viewFrom=i.lineN,o.viewTo+=r):fr(e)}else if(t>=o.viewTo){var a=mr(e,n,n,-1);a?(o.view=o.view.slice(0,a.index),o.viewTo=a.lineN):fr(e)}else{var s=mr(e,n,n,-1),l=mr(e,t,t+r,1);s&&l?(o.view=o.view.slice(0,s.index).concat(at(e,s.lineN,l.lineN)).concat(o.view.slice(l.index)),o.viewTo+=r):fr(e)}var c=o.externalMeasured;c&&(t=o.lineN&&n=r.viewTo)){var i=r.view[dr(e,n)];if(null!=i.node){var a=i.changes||(i.changes=[]);-1==F(a,t)&&a.push(t)}}}function fr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function mr(e,n,t,r){var o,i=dr(e,n),a=e.display.view;if(!xn||t==e.doc.first+e.doc.size)return{index:i,lineN:t};for(var s=e.display.viewFrom,l=0;l0){if(i==a.length-1)return null;o=s+a[i].size-n,i++}else o=s-n;n+=o,t+=o}for(;Un(e.doc,t)!=t;){if(i==(r<0?0:a.length-1))return null;t+=r*a[i-(r<0?1:0)].size,i+=r}return{index:i,lineN:t}}function gr(e){for(var n=e.display.view,t=0,r=0;r=e.display.viewTo||s.to().linen||n==t&&a.to==n)&&(r(Math.max(a.from,n),Math.min(a.to,t),1==a.level?"rtl":"ltr",i),o=!0)}o||r(n,t,"ltr")}(m,t||0,null==r?p:r,function(e,n,o,d){var g="ltr"==o,v=h(e,g?"left":"right"),y=h(n-1,g?"right":"left"),b=null==t&&0==e,k=null==r&&n==p,T=0==d,w=!m||d==m.length-1;if(y.top-v.top<=3){var C=(c?k:b)&&w,x=(c?b:k)&&T?s:(g?v:y).left,S=C?l:(g?y:v).right;u(x,v.top,S-x,v.bottom)}else{var L,O,I,A;g?(L=c&&b&&T?s:v.left,O=c?l:f(e,o,"before"),I=c?s:f(n,o,"after"),A=c&&k&&w?l:y.right):(L=c?f(e,o,"before"):s,O=!c&&b&&T?l:v.right,I=!c&&k&&w?s:y.left,A=c?f(n,o,"after"):l),u(L,v.top,O-L,v.bottom),v.bottom0?n.blinker=setInterval(function(){return n.cursorDiv.style.visibility=(t=!t)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(n.cursorDiv.style.visibility="hidden")}}function Cr(e){e.state.focused||(e.display.input.focus(),Sr(e))}function xr(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,Lr(e))},100)}function Sr(e,n){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(me(e,"focus",e,n),e.state.focused=!0,_(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),l&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),wr(e))}function Lr(e,n){e.state.delayingBlurEvent||(e.state.focused&&(me(e,"blur",e,n),e.state.focused=!1,L(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function Or(e){for(var n=e.display,t=n.lineDiv.offsetTop,r=0;r.005||p<-.005)&&(Qe(o.line,l),Ir(o.line),o.rest))for(var h=0;he.display.sizerWidth){var f=Math.ceil(c/ir(e.display));f>e.display.maxLineLength&&(e.display.maxLineLength=f,e.display.maxLine=o.line,e.display.maxLineChanged=!0)}}}}function Ir(e){if(e.widgets)for(var n=0;n=a&&(i=Je(n,qn(Ve(n,l))-e.wrapper.clientHeight),a=l)}return{from:i,to:Math.max(a,i+1)}}function Mr(e,n){var t=e.display,r=or(e.display);n.top<0&&(n.top=0);var o=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:t.scroller.scrollTop,i=At(e),a={};n.bottom-n.top>i&&(n.bottom=n.top+i);var s=e.doc.height+St(t),l=n.tops-r;if(n.topo+i){var u=Math.min(n.top,(c?s:n.bottom)-i);u!=o&&(a.scrollTop=u)}var d=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:t.scroller.scrollLeft,p=It(e)-(e.options.fixedGutter?t.gutters.offsetWidth:0),h=n.right-n.left>p;return h&&(n.right=n.left+p),n.left<10?a.scrollLeft=0:n.leftp+d-3&&(a.scrollLeft=n.right+(h?0:10)-p),a}function Nr(e,n){null!=n&&(Rr(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+n)}function Er(e){Rr(e);var n=e.getCursor();e.curOp.scrollToPos={from:n,to:n,margin:e.options.cursorScrollMargin}}function _r(e,n,t){null==n&&null==t||Rr(e),null!=n&&(e.curOp.scrollLeft=n),null!=t&&(e.curOp.scrollTop=t)}function Rr(e){var n=e.curOp.scrollToPos;n&&(e.curOp.scrollToPos=null,Pr(e,Xt(e,n.from),Xt(e,n.to),n.margin))}function Pr(e,n,t,r){var o=Mr(e,{left:Math.min(n.left,t.left),top:Math.min(n.top,t.top)-r,right:Math.max(n.right,t.right),bottom:Math.max(n.bottom,t.bottom)+r});_r(e,o.scrollLeft,o.scrollTop)}function Br(e,n){Math.abs(e.doc.scrollTop-n)<2||(t||lo(e,{top:n}),Hr(e,n,!0),t&&lo(e),ro(e,100))}function Hr(e,n,t){n=Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,n),(e.display.scroller.scrollTop!=n||t)&&(e.doc.scrollTop=n,e.display.scrollbars.setScrollTop(n),e.display.scroller.scrollTop!=n&&(e.display.scroller.scrollTop=n))}function Wr(e,n,t,r){n=Math.min(n,e.display.scroller.scrollWidth-e.display.scroller.clientWidth),(t?n==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-n)<2)&&!r||(e.doc.scrollLeft=n,po(e),e.display.scroller.scrollLeft!=n&&(e.display.scroller.scrollLeft=n),e.display.scrollbars.setScrollLeft(n))}function Dr(e){var n=e.display,t=n.gutters.offsetWidth,r=Math.round(e.doc.height+St(e.display));return{clientHeight:n.scroller.clientHeight,viewHeight:n.wrapper.clientHeight,scrollWidth:n.scroller.scrollWidth,clientWidth:n.scroller.clientWidth,viewWidth:n.wrapper.clientWidth,barLeft:e.options.fixedGutter?t:0,docHeight:r,scrollHeight:r+Ot(e)+n.barHeight,nativeBarWidth:n.nativeBarWidth,gutterWidth:t}}var Fr=function(e,n,t){this.cm=t;var r=this.vert=A("div",[A("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),o=this.horiz=A("div",[A("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=o.tabIndex=-1,e(r),e(o),pe(r,"scroll",function(){r.clientHeight&&n(r.scrollTop,"vertical")}),pe(o,"scroll",function(){o.clientWidth&&n(o.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,a&&s<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Fr.prototype.update=function(e){var n=e.scrollWidth>e.clientWidth+1,t=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(t){this.vert.style.display="block",this.vert.style.bottom=n?r+"px":"0";var o=e.viewHeight-(n?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+o)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(n){this.horiz.style.display="block",this.horiz.style.right=t?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var i=e.viewWidth-e.barLeft-(t?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+i)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==r&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:t?r:0,bottom:n?r:0}},Fr.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Fr.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Fr.prototype.zeroWidthHack=function(){var e=y&&!h?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new D,this.disableVert=new D},Fr.prototype.enableZeroWidthBar=function(e,n,t){e.style.pointerEvents="auto",n.set(1e3,function r(){var o=e.getBoundingClientRect();("vert"==t?document.elementFromPoint(o.right-1,(o.top+o.bottom)/2):document.elementFromPoint((o.right+o.left)/2,o.bottom-1))!=e?e.style.pointerEvents="none":n.set(1e3,r)})},Fr.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Ur=function(){};function jr(e,n){n||(n=Dr(e));var t=e.display.barWidth,r=e.display.barHeight;zr(e,n);for(var o=0;o<4&&t!=e.display.barWidth||r!=e.display.barHeight;o++)t!=e.display.barWidth&&e.options.lineWrapping&&Or(e),zr(e,Dr(e)),t=e.display.barWidth,r=e.display.barHeight}function zr(e,n){var t=e.display,r=t.scrollbars.update(n);t.sizer.style.paddingRight=(t.barWidth=r.right)+"px",t.sizer.style.paddingBottom=(t.barHeight=r.bottom)+"px",t.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(t.scrollbarFiller.style.display="block",t.scrollbarFiller.style.height=r.bottom+"px",t.scrollbarFiller.style.width=r.right+"px"):t.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(t.gutterFiller.style.display="block",t.gutterFiller.style.height=r.bottom+"px",t.gutterFiller.style.width=n.gutterWidth+"px"):t.gutterFiller.style.display=""}Ur.prototype.update=function(){return{bottom:0,right:0}},Ur.prototype.setScrollLeft=function(){},Ur.prototype.setScrollTop=function(){},Ur.prototype.clear=function(){};var Gr={native:Fr,null:Ur};function qr(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&L(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Gr[e.options.scrollbarStyle](function(n){e.display.wrapper.insertBefore(n,e.display.scrollbarFiller),pe(n,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),n.setAttribute("cm-not-content","true")},function(n,t){"horizontal"==t?Wr(e,n):Br(e,n)},e),e.display.scrollbars.addClass&&_(e.display.wrapper,e.display.scrollbars.addClass)}var Kr=0;function Vr(e){var n;e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Kr},n=e.curOp,st?st.ops.push(n):n.ownsGroup=st={ops:[n],delayedCallbacks:[]}}function Yr(e){var n=e.curOp;n&&function(e,n){var t=e.ownsGroup;if(t)try{!function(e){var n=e.delayedCallbacks,t=0;do{for(;t=t.viewTo)||t.maxLineChanged&&n.options.lineWrapping,e.update=e.mustUpdate&&new io(n,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Qr(e){var n=e.cm,t=n.display;e.updatedDisplay&&Or(n),e.barMeasure=Dr(n),t.maxLineChanged&&!n.options.lineWrapping&&(e.adjustWidthTo=Nt(n,t.maxLine,t.maxLine.text.length).left+3,n.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(t.scroller.clientWidth,t.sizer.offsetLeft+e.adjustWidthTo+Ot(n)+n.display.barWidth),e.maxScrollLeft=Math.max(0,t.sizer.offsetLeft+e.adjustWidthTo-It(n))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=t.input.prepareSelection())}function $r(e){var n=e.cm;null!=e.adjustWidthTo&&(n.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft(window.innerHeight||document.documentElement.clientHeight)&&(o=!1),null!=o&&!f){var i=A("div","​",null,"position: absolute;\n top: "+(n.top-t.viewOffset-xt(e.display))+"px;\n height: "+(n.bottom-n.top+Ot(e)+t.barHeight)+"px;\n left: "+n.left+"px; width: "+Math.max(2,n.right-n.left)+"px;");e.display.lineSpace.appendChild(i),i.scrollIntoView(o),e.display.lineSpace.removeChild(i)}}}(n,function(e,n,t,r){var o;null==r&&(r=0),e.options.lineWrapping||n!=t||(t="before"==(n=n.ch?nn(n.line,"before"==n.sticky?n.ch-1:n.ch,"after"):n).sticky?nn(n.line,n.ch+1,"before"):n);for(var i=0;i<5;i++){var a=!1,s=Yt(e,n),l=t&&t!=n?Yt(e,t):s,c=Mr(e,o={left:Math.min(s.left,l.left),top:Math.min(s.top,l.top)-r,right:Math.max(s.left,l.left),bottom:Math.max(s.bottom,l.bottom)+r}),u=e.doc.scrollTop,d=e.doc.scrollLeft;if(null!=c.scrollTop&&(Br(e,c.scrollTop),Math.abs(e.doc.scrollTop-u)>1&&(a=!0)),null!=c.scrollLeft&&(Wr(e,c.scrollLeft),Math.abs(e.doc.scrollLeft-d)>1&&(a=!0)),!a)break}return o}(n,cn(r,e.scrollToPos.from),cn(r,e.scrollToPos.to),e.scrollToPos.margin));var o=e.maybeHiddenMarkers,i=e.maybeUnhiddenMarkers;if(o)for(var a=0;a=e.display.viewTo)){var t=+new Date+e.options.workTime,r=mn(e,n.highlightFrontier),o=[];n.iter(r.line,Math.min(n.first+n.size,e.display.viewTo+500),function(i){if(r.line>=e.display.viewFrom){var a=i.styles,s=i.text.length>e.options.maxHighlightLength?ze(n.mode,r.state):null,l=hn(e,i,r,!0);s&&(r.state=s),i.styles=l.styles;var c=i.styleClasses,u=l.classes;u?i.styleClasses=u:c&&(i.styleClasses=null);for(var d=!a||a.length!=i.styles.length||c!=u&&(!c||!u||c.bgClass!=u.bgClass||c.textClass!=u.textClass),p=0;!d&&pt)return ro(e,e.options.workDelay),!0}),n.highlightFrontier=r.line,n.modeFrontier=Math.max(n.modeFrontier,r.line),o.length&&Zr(e,function(){for(var n=0;n=t.viewFrom&&n.visible.to<=t.viewTo&&(null==t.updateLineNumbers||t.updateLineNumbers>=t.viewTo)&&t.renderedView==t.view&&0==gr(e))return!1;ho(e)&&(fr(e),n.dims=ar(e));var o=r.first+r.size,i=Math.max(n.visible.from-e.options.viewportMargin,r.first),a=Math.min(o,n.visible.to+e.options.viewportMargin);t.viewFroma&&t.viewTo-a<20&&(a=Math.min(o,t.viewTo)),xn&&(i=Un(e.doc,i),a=jn(e.doc,a));var s=i!=t.viewFrom||a!=t.viewTo||t.lastWrapHeight!=n.wrapperHeight||t.lastWrapWidth!=n.wrapperWidth;!function(e,n,t){var r=e.display;0==r.view.length||n>=r.viewTo||t<=r.viewFrom?(r.view=at(e,n,t),r.viewFrom=n):(r.viewFrom>n?r.view=at(e,n,r.viewFrom).concat(r.view):r.viewFromt&&(r.view=r.view.slice(0,dr(e,t)))),r.viewTo=t}(e,i,a),t.viewOffset=qn(Ve(e.doc,t.viewFrom)),e.display.mover.style.top=t.viewOffset+"px";var c=gr(e);if(!s&&0==c&&!n.force&&t.renderedView==t.view&&(null==t.updateLineNumbers||t.updateLineNumbers>=t.viewTo))return!1;var u=function(e){if(e.hasFocus())return null;var n=E();if(!n||!N(e.display.lineDiv,n))return null;var t={activeElt:n};if(window.getSelection){var r=window.getSelection();r.anchorNode&&r.extend&&N(e.display.lineDiv,r.anchorNode)&&(t.anchorNode=r.anchorNode,t.anchorOffset=r.anchorOffset,t.focusNode=r.focusNode,t.focusOffset=r.focusOffset)}return t}(e);return c>4&&(t.lineDiv.style.display="none"),function(e,n,t){var r=e.display,o=e.options.lineNumbers,i=r.lineDiv,a=i.firstChild;function s(n){var t=n.nextSibling;return l&&y&&e.display.currentWheelTarget==n?n.style.display="none":n.parentNode.removeChild(n),t}for(var c=r.view,u=r.viewFrom,d=0;d-1&&(h=!1),dt(e,p,u,t)),h&&(O(p.lineNumber),p.lineNumber.appendChild(document.createTextNode(en(e.options,u)))),a=p.node.nextSibling}else{var f=yt(e,p,u,t);i.insertBefore(f,a)}u+=p.size}for(;a;)a=s(a)}(e,t.updateLineNumbers,n.dims),c>4&&(t.lineDiv.style.display=""),t.renderedView=t.view,function(e){if(e&&e.activeElt&&e.activeElt!=E()&&(e.activeElt.focus(),e.anchorNode&&N(document.body,e.anchorNode)&&N(document.body,e.focusNode))){var n=window.getSelection(),t=document.createRange();t.setEnd(e.anchorNode,e.anchorOffset),t.collapse(!1),n.removeAllRanges(),n.addRange(t),n.extend(e.focusNode,e.focusOffset)}}(u),O(t.cursorDiv),O(t.selectionDiv),t.gutters.style.height=t.sizer.style.minHeight=0,s&&(t.lastWrapHeight=n.wrapperHeight,t.lastWrapWidth=n.wrapperWidth,ro(e,400)),t.updateLineNumbers=null,!0}function so(e,n){for(var t=n.viewport,r=!0;(r&&e.options.lineWrapping&&n.oldDisplayWidth!=It(e)||(t&&null!=t.top&&(t={top:Math.min(e.doc.height+St(e.display)-At(e),t.top)}),n.visible=Ar(e.display,e.doc,t),!(n.visible.from>=e.display.viewFrom&&n.visible.to<=e.display.viewTo)))&&ao(e,n);r=!1){Or(e);var o=Dr(e);vr(e),jr(e,o),uo(e,o),n.force=!1}n.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(n.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function lo(e,n){var t=new io(e,n);if(ao(e,t)){Or(e),so(e,t);var r=Dr(e);vr(e),jr(e,r),uo(e,r),t.finish()}}function co(e){var n=e.gutters.offsetWidth;e.sizer.style.marginLeft=n+"px"}function uo(e,n){e.display.sizer.style.minHeight=n.docHeight+"px",e.display.heightForcer.style.top=n.docHeight+"px",e.display.gutters.style.height=n.docHeight+e.display.barHeight+Ot(e)+"px"}function po(e){var n=e.display,t=n.view;if(n.alignWidgets||n.gutters.firstChild&&e.options.fixedGutter){for(var r=sr(n)-n.scroller.scrollLeft+e.doc.scrollLeft,o=n.gutters.offsetWidth,i=r+"px",a=0;as.clientWidth,u=s.scrollHeight>s.clientHeight;if(o&&c||i&&u){if(i&&y&&l)e:for(var p=n.target,h=a.view;p!=s;p=p.parentNode)for(var f=0;f=0&&tn(e,r.to())<=0)return t}return-1};var xo=function(e,n){this.anchor=e,this.head=n};function So(e,n,t){var r=e&&e.options.selectionsMayTouch,o=n[t];n.sort(function(e,n){return tn(e.from(),n.from())}),t=F(n,o);for(var i=1;i0:l>=0){var c=sn(s.from(),a.from()),u=an(s.to(),a.to()),d=s.empty()?a.from()==a.head:s.from()==s.head;i<=t&&--t,n.splice(--i,2,new xo(d?u:c,d?c:u))}}return new Co(n,t)}function Lo(e,n){return new Co([new xo(e,n||e)],0)}function Oo(e){return e.text?nn(e.from.line+e.text.length-1,X(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function Io(e,n){if(tn(e,n.from)<0)return e;if(tn(e,n.to)<=0)return Oo(n);var t=e.line+n.text.length-(n.to.line-n.from.line)-1,r=e.ch;return e.line==n.to.line&&(r+=Oo(n).ch-n.to.ch),nn(t,r)}function Ao(e,n){for(var t=[],r=0;r1&&e.remove(s.line+1,f-1),e.insert(s.line+1,v)}ct(e,"change",e,n)}function Po(e,n,t){!function e(r,o,i){if(r.linked)for(var a=0;as-(e.cm?e.cm.options.historyEventDelay:500)||"*"==n.origin.charAt(0)))&&(i=function(e,n){return n?(Fo(e.done),X(e.done)):e.done.length&&!X(e.done).ranges?X(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),X(e.done)):void 0}(o,o.lastOp==r)))a=X(i.changes),0==tn(n.from,n.to)&&0==tn(n.from,a.to)?a.to=Oo(n):i.changes.push(Do(e,n));else{var l=X(o.done);for(l&&l.ranges||zo(e.sel,o.done),i={changes:[Do(e,n)],generation:o.generation},o.done.push(i);o.done.length>o.undoDepth;)o.done.shift(),o.done[0].ranges||o.done.shift()}o.done.push(t),o.generation=++o.maxGeneration,o.lastModTime=o.lastSelTime=s,o.lastOp=o.lastSelOp=r,o.lastOrigin=o.lastSelOrigin=n.origin,a||me(e,"historyAdded")}function jo(e,n,t,r){var o=e.history,i=r&&r.origin;t==o.lastSelOp||i&&o.lastSelOrigin==i&&(o.lastModTime==o.lastSelTime&&o.lastOrigin==i||function(e,n,t,r){var o=n.charAt(0);return"*"==o||"+"==o&&t.ranges.length==r.ranges.length&&t.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}(e,i,X(o.done),n))?o.done[o.done.length-1]=n:zo(n,o.done),o.lastSelTime=+new Date,o.lastSelOrigin=i,o.lastSelOp=t,r&&!1!==r.clearRedo&&Fo(o.undone)}function zo(e,n){var t=X(n);t&&t.ranges&&t.equals(e)||n.push(e)}function Go(e,n,t,r){var o=n["spans_"+e.id],i=0;e.iter(Math.max(e.first,t),Math.min(e.first+e.size,r),function(t){t.markedSpans&&((o||(o=n["spans_"+e.id]={}))[i]=t.markedSpans),++i})}function qo(e){if(!e)return null;for(var n,t=0;t-1&&(X(s)[d]=c[d],delete c[d])}}}return r}function Yo(e,n,t,r){if(r){var o=e.anchor;if(t){var i=tn(n,o)<0;i!=tn(t,o)<0?(o=n,n=t):i!=tn(n,t)<0&&(n=t)}return new xo(o,n)}return new xo(t||n,n)}function Xo(e,n,t,r,o){null==o&&(o=e.cm&&(e.cm.display.shift||e.extend)),ei(e,new Co([Yo(e.sel.primary(),n,t,o)],0),r)}function Qo(e,n,t){for(var r=[],o=e.cm&&(e.cm.display.shift||e.extend),i=0;i=n.ch:s.to>n.ch))){if(o&&(me(l,"beforeCursorEnter"),l.explicitlyCleared)){if(i.markedSpans){--a;continue}break}if(!l.atomic)continue;if(t){var d=l.find(r<0?1:-1),p=void 0;if((r<0?u:c)&&(d=si(e,d,-r,d&&d.line==n.line?i:null)),d&&d.line==n.line&&(p=tn(d,t))&&(r<0?p<0:p>0))return ii(e,d,n,r,o)}var h=l.find(r<0?-1:1);return(r<0?c:u)&&(h=si(e,h,r,h.line==n.line?i:null)),h?ii(e,h,n,r,o):null}}return n}function ai(e,n,t,r,o){var i=r||1,a=ii(e,n,t,i,o)||!o&&ii(e,n,t,i,!0)||ii(e,n,t,-i,o)||!o&&ii(e,n,t,-i,!0);return a||(e.cantEdit=!0,nn(e.first,0))}function si(e,n,t,r){return t<0&&0==n.ch?n.line>e.first?cn(e,nn(n.line-1)):null:t>0&&n.ch==(r||Ve(e,n.line)).text.length?n.line0)){var u=[l,1],d=tn(c.from,s.from),p=tn(c.to,s.to);(d<0||!a.inclusiveLeft&&!d)&&u.push({from:c.from,to:s.from}),(p>0||!a.inclusiveRight&&!p)&&u.push({from:s.to,to:c.to}),o.splice.apply(o,u),l+=u.length-3}}return o}(e,n.from,n.to);if(r)for(var o=r.length-1;o>=0;--o)di(e,{from:r[o].from,to:r[o].to,text:o?[""]:n.text,origin:n.origin});else di(e,n)}}function di(e,n){if(1!=n.text.length||""!=n.text[0]||0!=tn(n.from,n.to)){var t=Ao(e,n);Uo(e,n,t,e.cm?e.cm.curOp.id:NaN),fi(e,n,t,In(e,n));var r=[];Po(e,function(e,t){t||-1!=F(r,e.history)||(yi(e.history,n),r.push(e.history)),fi(e,n,null,In(e,n))})}}function pi(e,n,t){var r=e.cm&&e.cm.state.suppressEdits;if(!r||t){for(var o,i=e.history,a=e.sel,s="undo"==n?i.done:i.undone,l="undo"==n?i.undone:i.done,c=0;c=0;--h){var f=p(h);if(f)return f.v}}}}function hi(e,n){if(0!=n&&(e.first+=n,e.sel=new Co(Q(e.sel.ranges,function(e){return new xo(nn(e.anchor.line+n,e.anchor.ch),nn(e.head.line+n,e.head.ch))}),e.sel.primIndex),e.cm)){pr(e.cm,e.first,e.first-n,n);for(var t=e.cm.display,r=t.viewFrom;re.lastLine())){if(n.from.linei&&(n={from:n.from,to:nn(i,Ve(e,i).text.length),text:[n.text[0]],origin:n.origin}),n.removed=Ye(e,n.from,n.to),t||(t=Ao(e,n)),e.cm?function(e,n,t){var r=e.doc,o=e.display,i=n.from,a=n.to,s=!1,l=i.line;e.options.lineWrapping||(l=$e(Fn(Ve(r,i.line))),r.iter(l,a.line+1,function(e){if(e==o.maxLine)return s=!0,!0})),r.sel.contains(n.from,n.to)>-1&&ve(e),Ro(r,n,t,lr(e)),e.options.lineWrapping||(r.iter(l,i.line+n.text.length,function(e){var n=Kn(e);n>o.maxLineLength&&(o.maxLine=e,o.maxLineLength=n,o.maxLineChanged=!0,s=!1)}),s&&(e.curOp.updateMaxLine=!0)),function(e,n){if(e.modeFrontier=Math.min(e.modeFrontier,n),!(e.highlightFrontiert;r--){var o=Ve(e,r).stateAfter;if(o&&(!(o instanceof dn)||r+o.lookAhead1||!(this.children[0]instanceof ki))){var s=[];this.collapse(s),this.children=[new ki(s)],this.children[0].parent=this}},collapse:function(e){for(var n=0;n50){for(var a=o.lines.length%25+25,s=a;s10);e.parent.maybeSpill()}},iterN:function(e,n,t){for(var r=0;r0||0==a&&!1!==i.clearWhenEmpty)return i;if(i.replacedWith&&(i.collapsed=!0,i.widgetNode=M("span",[i.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||i.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(i.widgetNode.insertLeft=!0)),i.collapsed){if(Dn(e,n.line,n,t,i)||n.line!=t.line&&Dn(e,t.line,n,t,i))throw new Error("Inserting collapsed marker partially overlapping an existing one");xn=!0}i.addToHistory&&Uo(e,{from:n,to:t,origin:"markText"},e.sel,NaN);var s,l=n.line,c=e.cm;if(e.iter(l,t.line+1,function(e){c&&i.collapsed&&!c.options.lineWrapping&&Fn(e)==c.display.maxLine&&(s=!0),i.collapsed&&l!=n.line&&Qe(e,0),function(e,n){e.markedSpans=e.markedSpans?e.markedSpans.concat([n]):[n],n.marker.attachLine(e)}(e,new Sn(i,l==n.line?n.ch:null,l==t.line?t.ch:null)),++l}),i.collapsed&&e.iter(n.line,t.line+1,function(n){zn(e,n)&&Qe(n,0)}),i.clearOnEnter&&pe(i,"beforeCursorEnter",function(){return i.clear()}),i.readOnly&&(Cn=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),i.collapsed&&(i.id=++xi,i.atomic=!0),c){if(s&&(c.curOp.updateMaxLine=!0),i.collapsed)pr(c,n.line,t.line+1);else if(i.className||i.startStyle||i.endStyle||i.css||i.attributes||i.title)for(var u=n.line;u<=t.line;u++)hr(c,u,"text");i.atomic&&ri(c.doc),ct(c,"markerAdded",c,i)}return i}Si.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,n=e&&!e.curOp;if(n&&Vr(e),ye(this,"clear")){var t=this.find();t&&ct(this,"clear",t.from,t.to)}for(var r=null,o=null,i=0;ie.display.maxLineLength&&(e.display.maxLine=c,e.display.maxLineLength=u,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&pr(e,r,o+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&ri(e.doc)),e&&ct(e,"markerCleared",e,this,r,o),n&&Yr(e),this.parent&&this.parent.clear()}},Si.prototype.find=function(e,n){var t,r;null==e&&"bookmark"==this.type&&(e=1);for(var o=0;o=0;l--)ui(this,r[l]);s?Zo(this,s):this.cm&&Er(this.cm)}),undo:to(function(){pi(this,"undo")}),redo:to(function(){pi(this,"redo")}),undoSelection:to(function(){pi(this,"undo",!0)}),redoSelection:to(function(){pi(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,n=0,t=0,r=0;r=e.ch)&&n.push(o.marker.parent||o.marker)}return n},findMarks:function(e,n,t){e=cn(this,e),n=cn(this,n);var r=[],o=e.line;return this.iter(e.line,n.line+1,function(i){var a=i.markedSpans;if(a)for(var s=0;s=l.to||null==l.from&&o!=e.line||null!=l.from&&o==n.line&&l.from>=n.ch||t&&!t(l.marker)||r.push(l.marker.parent||l.marker)}++o}),r},getAllMarks:function(){var e=[];return this.iter(function(n){var t=n.markedSpans;if(t)for(var r=0;re)return n=e,!0;e-=i,++t}),cn(this,nn(t,n))},indexFromPos:function(e){var n=(e=cn(this,e)).ch;if(e.linen&&(n=e.from),null!=e.to&&e.to-1)return n.state.draggingText(e),void setTimeout(function(){return n.display.input.focus()},20);try{var u=e.dataTransfer.getData("Text");if(u){var d;if(n.state.draggingText&&!n.state.draggingText.copy&&(d=n.listSelections()),ni(n.doc,Lo(t,t)),d)for(var p=0;p=0;n--)mi(e.doc,"",r[n].from,r[n].to,"+delete");Er(e)})}function Ji(e,n,t){var r=ie(e.text,n+t,t);return r<0||r>e.text.length?null:r}function Zi(e,n,t){var r=Ji(e,n.ch,t);return null==r?null:new nn(n.line,r,t<0?"after":"before")}function ea(e,n,t,r,o){if(e){var i=ue(t,n.doc.direction);if(i){var a,s=o<0?X(i):i[0],l=o<0==(1==s.level)?"after":"before";if(s.level>0||"rtl"==n.doc.direction){var c=_t(n,t);a=o<0?t.text.length-1:0;var u=Rt(n,c,a).top;a=ae(function(e){return Rt(n,c,e).top==u},o<0==(1==s.level)?s.from:s.to-1,a),"before"==l&&(a=Ji(t,a,1))}else a=o<0?s.to:s.from;return new nn(r,a,l)}}return new nn(r,o<0?t.text.length:0,o<0?"before":"after")}zi.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},zi.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},zi.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},zi.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},zi.default=y?zi.macDefault:zi.pcDefault;var na={selectAll:li,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),z)},killLine:function(e){return $i(e,function(n){if(n.empty()){var t=Ve(e.doc,n.head.line).text.length;return n.head.ch==t&&n.head.line0)o=new nn(o.line,o.ch+1),e.replaceRange(i.charAt(o.ch-1)+i.charAt(o.ch-2),nn(o.line,o.ch-2),o,"+transpose");else if(o.line>e.doc.first){var a=Ve(e.doc,o.line-1).text;a&&(o=new nn(o.line,1),e.replaceRange(i.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),nn(o.line-1,a.length-1),o,"+transpose"))}t.push(new xo(o,o))}e.setSelections(t)})},newlineAndIndent:function(e){return Zr(e,function(){for(var n=e.listSelections(),t=n.length-1;t>=0;t--)e.replaceRange(e.doc.lineSeparator(),n[t].anchor,n[t].head,"+input");n=e.listSelections();for(var r=0;r-1&&(tn((o=c.ranges[o]).from(),n)<0||n.xRel>0)&&(tn(o.to(),n)>0||n.xRel<0)?function(e,n,t,r){var o=e.display,i=!1,c=eo(e,function(n){l&&(o.scroller.draggable=!1),e.state.draggingText=!1,fe(o.wrapper.ownerDocument,"mouseup",c),fe(o.wrapper.ownerDocument,"mousemove",u),fe(o.scroller,"dragstart",d),fe(o.scroller,"drop",c),i||(ke(n),r.addNew||Xo(e.doc,t,null,null,r.extend),l||a&&9==s?setTimeout(function(){o.wrapper.ownerDocument.body.focus(),o.input.focus()},20):o.input.focus())}),u=function(e){i=i||Math.abs(n.clientX-e.clientX)+Math.abs(n.clientY-e.clientY)>=10},d=function(){return i=!0};l&&(o.scroller.draggable=!0),e.state.draggingText=c,c.copy=!r.moveOnDrag,o.scroller.dragDrop&&o.scroller.dragDrop(),pe(o.wrapper.ownerDocument,"mouseup",c),pe(o.wrapper.ownerDocument,"mousemove",u),pe(o.scroller,"dragstart",d),pe(o.scroller,"drop",c),xr(e),setTimeout(function(){return o.input.focus()},20)}(e,r,n,i):function(e,n,t,r){var o=e.display,i=e.doc;ke(n);var a,s,l=i.sel,c=l.ranges;if(r.addNew&&!r.extend?(s=i.sel.contains(t),a=s>-1?c[s]:new xo(t,t)):(a=i.sel.primary(),s=i.sel.primIndex),"rectangle"==r.unit)r.addNew||(a=new xo(t,t)),t=ur(e,n,!0,!0),s=-1;else{var u=va(e,t,r.unit);a=r.extend?Yo(a,u.anchor,u.head,r.extend):u}r.addNew?-1==s?(s=c.length,ei(i,So(e,c.concat([a]),s),{scroll:!1,origin:"*mouse"})):c.length>1&&c[s].empty()&&"char"==r.unit&&!r.extend?(ei(i,So(e,c.slice(0,s).concat(c.slice(s+1)),0),{scroll:!1,origin:"*mouse"}),l=i.sel):$o(i,s,a,G):(s=0,ei(i,new Co([a],0),G),l=i.sel);var d=t;function p(n){if(0!=tn(d,n))if(d=n,"rectangle"==r.unit){for(var o=[],c=e.options.tabSize,u=W(Ve(i,t.line).text,t.ch,c),p=W(Ve(i,n.line).text,n.ch,c),h=Math.min(u,p),f=Math.max(u,p),m=Math.min(t.line,n.line),g=Math.min(e.lastLine(),Math.max(t.line,n.line));m<=g;m++){var v=Ve(i,m).text,y=K(v,h,c);h==f?o.push(new xo(nn(m,y),nn(m,y))):v.length>y&&o.push(new xo(nn(m,y),nn(m,K(v,f,c))))}o.length||o.push(new xo(t,t)),ei(i,So(e,l.ranges.slice(0,s).concat(o),s),{origin:"*mouse",scroll:!1}),e.scrollIntoView(n)}else{var b,k=a,T=va(e,n,r.unit),w=k.anchor;tn(T.anchor,w)>0?(b=T.head,w=sn(k.from(),T.anchor)):(b=T.anchor,w=an(k.to(),T.head));var C=l.ranges.slice(0);C[s]=function(e,n){var t=n.anchor,r=n.head,o=Ve(e.doc,t.line);if(0==tn(t,r)&&t.sticky==r.sticky)return n;var i=ue(o);if(!i)return n;var a=le(i,t.ch,t.sticky),s=i[a];if(s.from!=t.ch&&s.to!=t.ch)return n;var l,c=a+(s.from==t.ch==(1!=s.level)?0:1);if(0==c||c==i.length)return n;if(r.line!=t.line)l=(r.line-t.line)*("ltr"==e.doc.direction?1:-1)>0;else{var u=le(i,r.ch,r.sticky),d=u-a||(r.ch-t.ch)*(1==s.level?-1:1);l=u==c-1||u==c?d<0:d>0}var p=i[c+(l?-1:0)],h=l==(1==p.level),f=h?p.from:p.to,m=h?"after":"before";return t.ch==f&&t.sticky==m?n:new xo(new nn(t.line,f,m),r)}(e,new xo(cn(i,w),b)),ei(i,So(e,C,s),G)}}var h=o.wrapper.getBoundingClientRect(),f=0;function m(n){e.state.selectingText=!1,f=1/0,n&&(ke(n),o.input.focus()),fe(o.wrapper.ownerDocument,"mousemove",g),fe(o.wrapper.ownerDocument,"mouseup",v),i.history.lastSelOrigin=null}var g=eo(e,function(n){0!==n.buttons&&Se(n)?function n(t){var a=++f,s=ur(e,t,!0,"rectangle"==r.unit);if(s)if(0!=tn(s,d)){e.curOp.focus=E(),p(s);var l=Ar(o,i);(s.line>=l.to||s.lineh.bottom?20:0;c&&setTimeout(eo(e,function(){f==a&&(o.scroller.scrollTop+=c,n(t))}),50)}}(n):m(n)}),v=eo(e,m);e.state.selectingText=v,pe(o.wrapper.ownerDocument,"mousemove",g),pe(o.wrapper.ownerDocument,"mouseup",v)}(e,r,n,i)}(n,r,i,e):xe(e)==t.scroller&&ke(e):2==o?(r&&Xo(n.doc,r),setTimeout(function(){return t.input.focus()},20)):3==o&&(C?n.display.input.onContextMenu(e):xr(n)))}}function va(e,n,t){if("char"==t)return new xo(n,n);if("word"==t)return e.findWordAt(n);if("line"==t)return new xo(nn(n.line,0),cn(e.doc,nn(n.line+1,0)));var r=t(e,n);return new xo(r.from,r.to)}function ya(e,n,t,r){var o,i;if(n.touches)o=n.touches[0].clientX,i=n.touches[0].clientY;else try{o=n.clientX,i=n.clientY}catch(n){return!1}if(o>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&ke(n);var a=e.display,s=a.lineDiv.getBoundingClientRect();if(i>s.bottom||!ye(e,t))return we(n);i-=s.top-a.viewOffset;for(var l=0;l=o)return me(e,t,e,Je(e.doc,i),e.display.gutterSpecs[l].className,n),we(n)}}function ba(e,n){return ya(e,n,"gutterClick",!0)}function ka(e,n){Ct(e.display,n)||function(e,n){return!!ye(e,"gutterContextMenu")&&ya(e,n,"gutterContextMenu",!1)}(e,n)||ge(e,n,"contextmenu")||C||e.display.input.onContextMenu(n)}function Ta(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Ut(e)}ma.prototype.compare=function(e,n,t){return this.time+400>e&&0==tn(n,this.pos)&&t==this.button};var wa={toString:function(){return"CodeMirror.Init"}},Ca={},xa={};function Sa(e,n,t){if(!n!=!(t&&t!=wa)){var r=e.display.dragFunctions,o=n?pe:fe;o(e.display.scroller,"dragstart",r.start),o(e.display.scroller,"dragenter",r.enter),o(e.display.scroller,"dragover",r.over),o(e.display.scroller,"dragleave",r.leave),o(e.display.scroller,"drop",r.drop)}}function La(e){e.options.lineWrapping?(_(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(L(e.display.wrapper,"CodeMirror-wrap"),Vn(e)),cr(e),pr(e),Ut(e),setTimeout(function(){return jr(e)},100)}function Oa(e,n){var t=this;if(!(this instanceof Oa))return new Oa(e,n);this.options=n=n?H(n):{},H(Ca,n,!1);var r=n.value;"string"==typeof r?r=new Ni(r,n.mode,null,n.lineSeparator,n.direction):n.mode&&(r.modeOption=n.mode),this.doc=r;var o=new Oa.inputStyles[n.inputStyle](this),i=this.display=new vo(e,r,o,n);for(var c in i.wrapper.CodeMirror=this,Ta(this),n.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),qr(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new D,keySeq:null,specialChars:null},n.autofocus&&!v&&i.input.focus(),a&&s<11&&setTimeout(function(){return t.display.input.reset(!0)},20),function(e){var n=e.display;pe(n.scroller,"mousedown",eo(e,ga)),pe(n.scroller,"dblclick",a&&s<11?eo(e,function(n){if(!ge(e,n)){var t=ur(e,n);if(t&&!ba(e,n)&&!Ct(e.display,n)){ke(n);var r=e.findWordAt(t);Xo(e.doc,r.anchor,r.head)}}}):function(n){return ge(e,n)||ke(n)}),pe(n.scroller,"contextmenu",function(n){return ka(e,n)});var t,r={end:0};function o(){n.activeTouch&&(t=setTimeout(function(){return n.activeTouch=null},1e3),(r=n.activeTouch).end=+new Date)}function i(e,n){if(null==n.left)return!0;var t=n.left-e.left,r=n.top-e.top;return t*t+r*r>400}pe(n.scroller,"touchstart",function(o){if(!ge(e,o)&&!function(e){if(1!=e.touches.length)return!1;var n=e.touches[0];return n.radiusX<=1&&n.radiusY<=1}(o)&&!ba(e,o)){n.input.ensurePolled(),clearTimeout(t);var i=+new Date;n.activeTouch={start:i,moved:!1,prev:i-r.end<=300?r:null},1==o.touches.length&&(n.activeTouch.left=o.touches[0].pageX,n.activeTouch.top=o.touches[0].pageY)}}),pe(n.scroller,"touchmove",function(){n.activeTouch&&(n.activeTouch.moved=!0)}),pe(n.scroller,"touchend",function(t){var r=n.activeTouch;if(r&&!Ct(n,t)&&null!=r.left&&!r.moved&&new Date-r.start<300){var a,s=e.coordsChar(n.activeTouch,"page");a=!r.prev||i(r,r.prev)?new xo(s,s):!r.prev.prev||i(r,r.prev.prev)?e.findWordAt(s):new xo(nn(s.line,0),cn(e.doc,nn(s.line+1,0))),e.setSelection(a.anchor,a.head),e.focus(),ke(t)}o()}),pe(n.scroller,"touchcancel",o),pe(n.scroller,"scroll",function(){n.scroller.clientHeight&&(Br(e,n.scroller.scrollTop),Wr(e,n.scroller.scrollLeft,!0),me(e,"scroll",e))}),pe(n.scroller,"mousewheel",function(n){return wo(e,n)}),pe(n.scroller,"DOMMouseScroll",function(n){return wo(e,n)}),pe(n.wrapper,"scroll",function(){return n.wrapper.scrollTop=n.wrapper.scrollLeft=0}),n.dragFunctions={enter:function(n){ge(e,n)||Ce(n)},over:function(n){ge(e,n)||(function(e,n){var t=ur(e,n);if(t){var r=document.createDocumentFragment();br(e,t,r),e.display.dragCursor||(e.display.dragCursor=A("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),I(e.display.dragCursor,r)}}(e,n),Ce(n))},start:function(n){return function(e,n){if(a&&(!e.state.draggingText||+new Date-Ei<100))Ce(n);else if(!ge(e,n)&&!Ct(e.display,n)&&(n.dataTransfer.setData("Text",e.getSelection()),n.dataTransfer.effectAllowed="copyMove",n.dataTransfer.setDragImage&&!p)){var t=A("img",null,null,"position: fixed; left: 0; top: 0;");t.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",d&&(t.width=t.height=1,e.display.wrapper.appendChild(t),t._top=t.offsetTop),n.dataTransfer.setDragImage(t,0,0),d&&t.parentNode.removeChild(t)}}(e,n)},drop:eo(e,_i),leave:function(n){ge(e,n)||Ri(e)}};var l=n.input.getField();pe(l,"keyup",function(n){return da.call(e,n)}),pe(l,"keydown",eo(e,ua)),pe(l,"keypress",eo(e,pa)),pe(l,"focus",function(n){return Sr(e,n)}),pe(l,"blur",function(n){return Lr(e,n)})}(this),Hi(),Vr(this),this.curOp.forceUpdate=!0,Bo(this,r),n.autofocus&&!v||this.hasFocus()?setTimeout(B(Sr,this),20):Lr(this),xa)xa.hasOwnProperty(c)&&xa[c](t,n[c],wa);ho(this),n.finishInit&&n.finishInit(this);for(var u=0;u150)){if(!r)return;t="prev"}}else c=0,t="not";"prev"==t?c=n>i.first?W(Ve(i,n-1).text,null,a):0:"add"==t?c=l+e.options.indentUnit:"subtract"==t?c=l-e.options.indentUnit:"number"==typeof t&&(c=l+t),c=Math.max(0,c);var d="",p=0;if(e.options.indentWithTabs)for(var h=Math.floor(c/a);h;--h)p+=a,d+="\t";if(pa,l=Ee(n),c=null;if(s&&r.ranges.length>1)if(Ma&&Ma.text.join("\n")==n){if(r.ranges.length%Ma.text.length==0){c=[];for(var u=0;u=0;p--){var h=r.ranges[p],f=h.from(),m=h.to();h.empty()&&(t&&t>0?f=nn(f.line,f.ch-t):e.state.overwrite&&!s?m=nn(m.line,Math.min(Ve(i,m.line).text.length,m.ch+X(l).length)):s&&Ma&&Ma.lineWise&&Ma.text.join("\n")==n&&(f=m=nn(f.line,0)));var g={from:f,to:m,text:c?c[p%c.length]:l,origin:o||(s?"paste":e.state.cutIncoming>a?"cut":"+input")};ui(e.doc,g),ct(e,"inputRead",e,g)}n&&!s&&Ra(e,n),Er(e),e.curOp.updateInput<2&&(e.curOp.updateInput=d),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function _a(e,n){var t=e.clipboardData&&e.clipboardData.getData("Text");if(t)return e.preventDefault(),n.isReadOnly()||n.options.disableInput||Zr(n,function(){return Ea(n,t,0,null,"paste")}),!0}function Ra(e,n){if(e.options.electricChars&&e.options.smartIndent)for(var t=e.doc.sel,r=t.ranges.length-1;r>=0;r--){var o=t.ranges[r];if(!(o.head.ch>100||r&&t.ranges[r-1].head.line==o.head.line)){var i=e.getModeAt(o.head),a=!1;if(i.electricChars){for(var s=0;s-1){a=Aa(e,o.head.line,"smart");break}}else i.electricInput&&i.electricInput.test(Ve(e.doc,o.head.line).text.slice(0,o.head.ch))&&(a=Aa(e,o.head.line,"smart"));a&&ct(e,"electricInput",e,o.head.line)}}}function Pa(e){for(var n=[],t=[],r=0;r=n.text.length?(t.ch=n.text.length,t.sticky="before"):t.ch<=0&&(t.ch=0,t.sticky="after");var i=le(o,t.ch,t.sticky),a=o[i];if("ltr"==e.doc.direction&&a.level%2==0&&(r>0?a.to>t.ch:a.from=a.from&&p>=u.begin)){var h=d?"before":"after";return new nn(t.line,p,h)}}var f=function(e,n,r){for(var i=function(e,n){return n?new nn(t.line,l(e,1),"before"):new nn(t.line,e,"after")};e>=0&&e0==(1!=a.level),c=s?r.begin:l(r.end,-1);if(a.from<=c&&c0?u.end:l(u.begin,-1);return null==g||r>0&&g==n.text.length||!(m=f(r>0?0:o.length-1,r,c(g)))?null:m}(e.cm,s,n,t):Zi(s,n,t))){if(r||(a=n.line+t)=e.first+e.size||(n=new nn(a,n.ch,n.sticky),!(s=Ve(e,a))))return!1;n=ea(o,e.cm,s,n.line,t)}else n=i;return!0}if("char"==r)l();else if("column"==r)l(!0);else if("word"==r||"group"==r)for(var c=null,u="group"==r,d=e.cm&&e.cm.getHelper(n,"wordChars"),p=!0;!(t<0)||l(!p);p=!1){var h=s.text.charAt(n.ch)||"\n",f=ne(h,d)?"w":u&&"\n"==h?"n":!u||/\s/.test(h)?null:"p";if(!u||p||f||(f="s"),c&&c!=f){t<0&&(t=1,l(),n.sticky="after");break}if(f&&(c=f),t>0&&!l(!p))break}var m=ai(e,n,i,a,!0);return rn(i,m)&&(m.hitSide=!0),m}function Da(e,n,t,r){var o,i,a=e.doc,s=n.left;if("page"==r){var l=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),c=Math.max(l-.5*or(e.display),3);o=(t>0?n.bottom:n.top)+t*c}else"line"==r&&(o=t>0?n.bottom+3:n.top-3);for(;(i=$t(e,s,o)).outside;){if(t<0?o<=0:o>=a.height){i.hitSide=!0;break}o+=5*t}return i}var Fa=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new D,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function Ua(e,n){var t=Et(e,n.line);if(!t||t.hidden)return null;var r=Ve(e.doc,n.line),o=Mt(t,r,n.line),i=ue(r,e.doc.direction),a="left";i&&(a=le(i,n.ch)%2?"right":"left");var s=Ht(o.map,n.ch,a);return s.offset="right"==s.collapse?s.end:s.start,s}function ja(e,n){return n&&(e.bad=!0),e}function za(e,n,t){var r;if(n==e.display.lineDiv){if(!(r=e.display.lineDiv.childNodes[t]))return ja(e.clipPos(nn(e.display.viewTo-1)),!0);n=null,t=0}else for(r=n;;r=r.parentNode){if(!r||r==e.display.lineDiv)return null;if(r.parentNode&&r.parentNode==e.display.lineDiv)break}for(var o=0;o=n.display.viewTo||i.line=n.display.viewFrom&&Ua(n,o)||{node:l[0].measure.map[2],offset:0},u=i.liner.firstLine()&&(a=nn(a.line-1,Ve(r.doc,a.line-1).length)),s.ch==Ve(r.doc,s.line).text.length&&s.lineo.viewTo-1)return!1;a.line==o.viewFrom||0==(e=dr(r,a.line))?(n=$e(o.view[0].line),t=o.view[0].node):(n=$e(o.view[e].line),t=o.view[e-1].node.nextSibling);var l,c,u=dr(r,s.line);if(u==o.view.length-1?(l=o.viewTo-1,c=o.lineDiv.lastChild):(l=$e(o.view[u+1].line)-1,c=o.view[u+1].node.previousSibling),!t)return!1;for(var d=r.doc.splitLines(function(e,n,t,r,o){var i="",a=!1,s=e.doc.lineSeparator(),l=!1;function c(){a&&(i+=s,l&&(i+=s),a=l=!1)}function u(e){e&&(c(),i+=e)}function d(n){if(1==n.nodeType){var t=n.getAttribute("cm-text");if(t)return void u(t);var i,p=n.getAttribute("cm-marker");if(p){var h=e.findMarks(nn(r,0),nn(o+1,0),(g=+p,function(e){return e.id==g}));return void(h.length&&(i=h[0].find(0))&&u(Ye(e.doc,i.from,i.to).join(s)))}if("false"==n.getAttribute("contenteditable"))return;var f=/^(pre|div|p|li|table|br)$/i.test(n.nodeName);if(!/^br$/i.test(n.nodeName)&&0==n.textContent.length)return;f&&c();for(var m=0;m1&&p.length>1;)if(X(d)==X(p))d.pop(),p.pop(),l--;else{if(d[0]!=p[0])break;d.shift(),p.shift(),n++}for(var h=0,f=0,m=d[0],g=p[0],v=Math.min(m.length,g.length);ha.ch&&y.charCodeAt(y.length-f-1)==b.charCodeAt(b.length-f-1);)h--,f++;d[d.length-1]=y.slice(0,y.length-f).replace(/^\u200b+/,""),d[0]=d[0].slice(h).replace(/\u200b+$/,"");var T=nn(n,h),w=nn(l,p.length?X(p).length-f:0);return d.length>1||d[0]||tn(T,w)?(mi(r.doc,d,T,w,"+input"),!0):void 0},Fa.prototype.ensurePolled=function(){this.forceCompositionEnd()},Fa.prototype.reset=function(){this.forceCompositionEnd()},Fa.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Fa.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}e.updateFromDOM()},80))},Fa.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||Zr(this.cm,function(){return pr(e.cm)})},Fa.prototype.setUneditable=function(e){e.contentEditable="false"},Fa.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||eo(this.cm,Ea)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},Fa.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},Fa.prototype.onContextMenu=function(){},Fa.prototype.resetPosition=function(){},Fa.prototype.needsContentAttribute=!0;var qa=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new D,this.hasSelection=!1,this.composing=null};qa.prototype.init=function(e){var n=this,t=this,r=this.cm;this.createField(e);var o=this.textarea;function i(e){if(!ge(r,e)){if(r.somethingSelected())Na({lineWise:!1,text:r.getSelections()});else{if(!r.options.lineWiseCopyCut)return;var n=Pa(r);Na({lineWise:!0,text:n.text}),"cut"==e.type?r.setSelections(n.ranges,null,z):(t.prevInput="",o.value=n.text.join("\n"),P(o))}"cut"==e.type&&(r.state.cutIncoming=+new Date)}}e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),m&&(o.style.width="0px"),pe(o,"input",function(){a&&s>=9&&n.hasSelection&&(n.hasSelection=null),t.poll()}),pe(o,"paste",function(e){ge(r,e)||_a(e,r)||(r.state.pasteIncoming=+new Date,t.fastPoll())}),pe(o,"cut",i),pe(o,"copy",i),pe(e.scroller,"paste",function(n){if(!Ct(e,n)&&!ge(r,n)){if(!o.dispatchEvent)return r.state.pasteIncoming=+new Date,void t.focus();var i=new Event("paste");i.clipboardData=n.clipboardData,o.dispatchEvent(i)}}),pe(e.lineSpace,"selectstart",function(n){Ct(e,n)||ke(n)}),pe(o,"compositionstart",function(){var e=r.getCursor("from");t.composing&&t.composing.range.clear(),t.composing={start:e,range:r.markText(e,r.getCursor("to"),{className:"CodeMirror-composing"})}}),pe(o,"compositionend",function(){t.composing&&(t.poll(),t.composing.range.clear(),t.composing=null)})},qa.prototype.createField=function(e){this.wrapper=Ha(),this.textarea=this.wrapper.firstChild},qa.prototype.prepareSelection=function(){var e=this.cm,n=e.display,t=e.doc,r=yr(e);if(e.options.moveInputWithCursor){var o=Yt(e,t.sel.primary().head,"div"),i=n.wrapper.getBoundingClientRect(),a=n.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(n.wrapper.clientHeight-10,o.top+a.top-i.top)),r.teLeft=Math.max(0,Math.min(n.wrapper.clientWidth-10,o.left+a.left-i.left))}return r},qa.prototype.showSelection=function(e){var n=this.cm.display;I(n.cursorDiv,e.cursors),I(n.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},qa.prototype.reset=function(e){if(!this.contextMenuPending&&!this.composing){var n=this.cm;if(n.somethingSelected()){this.prevInput="";var t=n.getSelection();this.textarea.value=t,n.state.focused&&P(this.textarea),a&&s>=9&&(this.hasSelection=t)}else e||(this.prevInput=this.textarea.value="",a&&s>=9&&(this.hasSelection=null))}},qa.prototype.getField=function(){return this.textarea},qa.prototype.supportsTouch=function(){return!1},qa.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!v||E()!=this.textarea))try{this.textarea.focus()}catch(e){}},qa.prototype.blur=function(){this.textarea.blur()},qa.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},qa.prototype.receivedFocus=function(){this.slowPoll()},qa.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},qa.prototype.fastPoll=function(){var e=!1,n=this;n.pollingFast=!0,n.polling.set(20,function t(){n.poll()||e?(n.pollingFast=!1,n.slowPoll()):(e=!0,n.polling.set(60,t))})},qa.prototype.poll=function(){var e=this,n=this.cm,t=this.textarea,r=this.prevInput;if(this.contextMenuPending||!n.state.focused||_e(t)&&!r&&!this.composing||n.isReadOnly()||n.options.disableInput||n.state.keySeq)return!1;var o=t.value;if(o==r&&!n.somethingSelected())return!1;if(a&&s>=9&&this.hasSelection===o||y&&/[\uf700-\uf7ff]/.test(o))return n.display.input.reset(),!1;if(n.doc.sel==n.display.selForContextMenu){var i=o.charCodeAt(0);if(8203!=i||r||(r="​"),8666==i)return this.reset(),this.cm.execCommand("undo")}for(var l=0,c=Math.min(r.length,o.length);l1e3||o.indexOf("\n")>-1?t.value=e.prevInput="":e.prevInput=o,e.composing&&(e.composing.range.clear(),e.composing.range=n.markText(e.composing.start,n.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},qa.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},qa.prototype.onKeyPress=function(){a&&s>=9&&(this.hasSelection=null),this.fastPoll()},qa.prototype.onContextMenu=function(e){var n=this,t=n.cm,r=t.display,o=n.textarea;n.contextMenuPending&&n.contextMenuPending();var i=ur(t,e),c=r.scroller.scrollTop;if(i&&!d){t.options.resetSelectionOnContextMenu&&-1==t.doc.sel.contains(i)&&eo(t,ei)(t.doc,Lo(i),z);var u,p=o.style.cssText,h=n.wrapper.style.cssText,f=n.wrapper.offsetParent.getBoundingClientRect();if(n.wrapper.style.cssText="position: static",o.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-f.top-5)+"px; left: "+(e.clientX-f.left-5)+"px;\n z-index: 1000; background: "+(a?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",l&&(u=window.scrollY),r.input.focus(),l&&window.scrollTo(null,u),r.input.reset(),t.somethingSelected()||(o.value=n.prevInput=" "),n.contextMenuPending=v,r.selForContextMenu=t.doc.sel,clearTimeout(r.detectingSelectAll),a&&s>=9&&g(),C){Ce(e);var m=function(){fe(window,"mouseup",m),setTimeout(v,20)};pe(window,"mouseup",m)}else setTimeout(v,50)}function g(){if(null!=o.selectionStart){var e=t.somethingSelected(),i="​"+(e?o.value:"");o.value="⇚",o.value=i,n.prevInput=e?"":"​",o.selectionStart=1,o.selectionEnd=i.length,r.selForContextMenu=t.doc.sel}}function v(){if(n.contextMenuPending==v&&(n.contextMenuPending=!1,n.wrapper.style.cssText=h,o.style.cssText=p,a&&s<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=c),null!=o.selectionStart)){(!a||a&&s<9)&&g();var e=0,i=function(){r.selForContextMenu==t.doc.sel&&0==o.selectionStart&&o.selectionEnd>0&&"​"==n.prevInput?eo(t,li)(t):e++<10?r.detectingSelectAll=setTimeout(i,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(i,200)}}},qa.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e},qa.prototype.setUneditable=function(){},qa.prototype.needsContentAttribute=!1,function(e){var n=e.optionHandlers;function t(t,r,o,i){e.defaults[t]=r,o&&(n[t]=i?function(e,n,t){t!=wa&&o(e,n,t)}:o)}e.defineOption=t,e.Init=wa,t("value","",function(e,n){return e.setValue(n)},!0),t("mode",null,function(e,n){e.doc.modeOption=n,No(e)},!0),t("indentUnit",2,No,!0),t("indentWithTabs",!1),t("smartIndent",!0),t("tabSize",4,function(e){Eo(e),Ut(e),pr(e)},!0),t("lineSeparator",null,function(e,n){if(e.doc.lineSep=n,n){var t=[],r=e.doc.first;e.doc.iter(function(e){for(var o=0;;){var i=e.text.indexOf(n,o);if(-1==i)break;o=i+n.length,t.push(nn(r,i))}r++});for(var o=t.length-1;o>=0;o--)mi(e.doc,n,t[o],nn(t[o].line,t[o].ch+n.length))}}),t("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(e,n,t){e.state.specialChars=new RegExp(n.source+(n.test("\t")?"":"|\t"),"g"),t!=wa&&e.refresh()}),t("specialCharPlaceholder",et,function(e){return e.refresh()},!0),t("electricChars",!0),t("inputStyle",v?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),t("spellcheck",!1,function(e,n){return e.getInputField().spellcheck=n},!0),t("autocorrect",!1,function(e,n){return e.getInputField().autocorrect=n},!0),t("autocapitalize",!1,function(e,n){return e.getInputField().autocapitalize=n},!0),t("rtlMoveVisually",!k),t("wholeLineUpdateBefore",!0),t("theme","default",function(e){Ta(e),go(e)},!0),t("keyMap","default",function(e,n,t){var r=Qi(n),o=t!=wa&&Qi(t);o&&o.detach&&o.detach(e,r),r.attach&&r.attach(e,o||null)}),t("extraKeys",null),t("configureMouse",null),t("lineWrapping",!1,La,!0),t("gutters",[],function(e,n){e.display.gutterSpecs=fo(n,e.options.lineNumbers),go(e)},!0),t("fixedGutter",!0,function(e,n){e.display.gutters.style.left=n?sr(e.display)+"px":"0",e.refresh()},!0),t("coverGutterNextToScrollbar",!1,function(e){return jr(e)},!0),t("scrollbarStyle","native",function(e){qr(e),jr(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)},!0),t("lineNumbers",!1,function(e,n){e.display.gutterSpecs=fo(e.options.gutters,n),go(e)},!0),t("firstLineNumber",1,go,!0),t("lineNumberFormatter",function(e){return e},go,!0),t("showCursorWhenSelecting",!1,vr,!0),t("resetSelectionOnContextMenu",!0),t("lineWiseCopyCut",!0),t("pasteLinesPerSelection",!0),t("selectionsMayTouch",!1),t("readOnly",!1,function(e,n){"nocursor"==n&&(Lr(e),e.display.input.blur()),e.display.input.readOnlyChanged(n)}),t("disableInput",!1,function(e,n){n||e.display.input.reset()},!0),t("dragDrop",!0,Sa),t("allowDropFileTypes",null),t("cursorBlinkRate",530),t("cursorScrollMargin",0),t("cursorHeight",1,vr,!0),t("singleCursorHeightPerLine",!0,vr,!0),t("workTime",100),t("workDelay",100),t("flattenSpans",!0,Eo,!0),t("addModeClass",!1,Eo,!0),t("pollInterval",100),t("undoDepth",200,function(e,n){return e.doc.history.undoDepth=n}),t("historyEventDelay",1250),t("viewportMargin",10,function(e){return e.refresh()},!0),t("maxHighlightLength",1e4,Eo,!0),t("moveInputWithCursor",!0,function(e,n){n||e.display.input.resetPosition()}),t("tabindex",null,function(e,n){return e.display.input.getField().tabIndex=n||""}),t("autofocus",null),t("direction","ltr",function(e,n){return e.doc.setDirection(n)},!0),t("phrases",null)}(Oa),function(e){var n=e.optionHandlers,t=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,t){var r=this.options,o=r[e];r[e]==t&&"mode"!=e||(r[e]=t,n.hasOwnProperty(e)&&eo(this,n[e])(this,t,o),me(this,"optionChange",this,e))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,n){this.state.keyMaps[n?"push":"unshift"](Qi(e))},removeKeyMap:function(e){for(var n=this.state.keyMaps,t=0;tt&&(Aa(this,o.head.line,e,!0),t=o.head.line,r==this.doc.sel.primIndex&&Er(this));else{var i=o.from(),a=o.to(),s=Math.max(t,i.line);t=Math.min(this.lastLine(),a.line-(a.ch?0:1))+1;for(var l=s;l0&&$o(this.doc,r,new xo(i,c[r].to()),z)}}}),getTokenAt:function(e,n){return kn(this,e,n)},getLineTokens:function(e,n){return kn(this,nn(e),n,!0)},getTokenTypeAt:function(e){e=cn(this.doc,e);var n,t=fn(this,Ve(this.doc,e.line)),r=0,o=(t.length-1)/2,i=e.ch;if(0==i)n=t[2];else for(;;){var a=r+o>>1;if((a?t[2*a-1]:0)>=i)o=a;else{if(!(t[2*a+1]i&&(e=i,o=!0),r=Ve(this.doc,e)}else r=e;return qt(this,r,{top:0,left:0},n||"page",t||o).top+(o?this.doc.height-qn(r):0)},defaultTextHeight:function(){return or(this.display)},defaultCharWidth:function(){return ir(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,n,t,r,o){var i,a,s,l=this.display,c=(e=Yt(this,cn(this.doc,e))).bottom,u=e.left;if(n.style.position="absolute",n.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(n),l.sizer.appendChild(n),"over"==r)c=e.top;else if("above"==r||"near"==r){var d=Math.max(l.wrapper.clientHeight,this.doc.height),p=Math.max(l.sizer.clientWidth,l.lineSpace.clientWidth);("above"==r||e.bottom+n.offsetHeight>d)&&e.top>n.offsetHeight?c=e.top-n.offsetHeight:e.bottom+n.offsetHeight<=d&&(c=e.bottom),u+n.offsetWidth>p&&(u=p-n.offsetWidth)}n.style.top=c+"px",n.style.left=n.style.right="","right"==o?(u=l.sizer.clientWidth-n.offsetWidth,n.style.right="0px"):("left"==o?u=0:"middle"==o&&(u=(l.sizer.clientWidth-n.offsetWidth)/2),n.style.left=u+"px"),t&&(i=this,a={left:u,top:c,right:u+n.offsetWidth,bottom:c+n.offsetHeight},null!=(s=Mr(i,a)).scrollTop&&Br(i,s.scrollTop),null!=s.scrollLeft&&Wr(i,s.scrollLeft))},triggerOnKeyDown:no(ua),triggerOnKeyPress:no(pa),triggerOnKeyUp:da,triggerOnMouseDown:no(ga),execCommand:function(e){if(na.hasOwnProperty(e))return na[e].call(null,this)},triggerElectric:no(function(e){Ra(this,e)}),findPosH:function(e,n,t,r){var o=1;n<0&&(o=-1,n=-n);for(var i=cn(this.doc,e),a=0;a0&&a(n.charAt(t-1));)--t;for(;r.5)&&cr(this),me(this,"refresh",this)}),swapDoc:no(function(e){var n=this.doc;return n.cm=null,this.state.selectingText&&this.state.selectingText(),Bo(this,e),Ut(this),this.display.input.reset(),_r(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,ct(this,"swapDoc",this,n),n}),phrase:function(e){var n=this.options.phrases;return n&&Object.prototype.hasOwnProperty.call(n,e)?n[e]:e},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},be(e),e.registerHelper=function(n,r,o){t.hasOwnProperty(n)||(t[n]=e[n]={_global:[]}),t[n][r]=o},e.registerGlobalHelper=function(n,r,o,i){e.registerHelper(n,r,i),t[n]._global.push({pred:o,val:i})}}(Oa);var Ka="iter insert remove copy getEditor constructor".split(" ");for(var Va in Ni.prototype)Ni.prototype.hasOwnProperty(Va)&&F(Ka,Va)<0&&(Oa.prototype[Va]=function(e){return function(){return e.apply(this.doc,arguments)}}(Ni.prototype[Va]));return be(Ni),Oa.inputStyles={textarea:qa,contenteditable:Fa},Oa.defineMode=function(e){Oa.defaults.mode||"null"==e||(Oa.defaults.mode=e),We.apply(this,arguments)},Oa.defineMIME=function(e,n){He[e]=n},Oa.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Oa.defineMIME("text/plain","null"),Oa.defineExtension=function(e,n){Oa.prototype[e]=n},Oa.defineDocExtension=function(e,n){Ni.prototype[e]=n},Oa.fromTextArea=function(e,n){if((n=n?H(n):{}).value=e.value,!n.tabindex&&e.tabIndex&&(n.tabindex=e.tabIndex),!n.placeholder&&e.placeholder&&(n.placeholder=e.placeholder),null==n.autofocus){var t=E();n.autofocus=t==e||null!=e.getAttribute("autofocus")&&t==document.body}function r(){e.value=s.getValue()}var o;if(e.form&&(pe(e.form,"submit",r),!n.leaveSubmitMethodAlone)){var i=e.form;o=i.submit;try{var a=i.submit=function(){r(),i.submit=o,i.submit(),i.submit=a}}catch(e){}}n.finishInit=function(n){n.save=r,n.getTextArea=function(){return e},n.toTextArea=function(){n.toTextArea=isNaN,r(),e.parentNode.removeChild(n.getWrapperElement()),e.style.display="",e.form&&(fe(e.form,"submit",r),"function"==typeof e.form.submit&&(e.form.submit=o))}},e.style.display="none";var s=Oa(function(n){return e.parentNode.insertBefore(n,e.nextSibling)},n);return s},function(e){e.off=fe,e.on=pe,e.wheelEventPixels=To,e.Doc=Ni,e.splitLines=Ee,e.countColumn=W,e.findColumn=K,e.isWordChar=ee,e.Pass=j,e.signal=me,e.Line=Yn,e.changeEnd=Oo,e.scrollbarModel=Gr,e.Pos=nn,e.cmpPos=tn,e.modes=Be,e.mimeModes=He,e.resolveMode=De,e.getMode=Fe,e.modeExtensions=Ue,e.extendMode=je,e.copyState=ze,e.startState=qe,e.innerMode=Ge,e.commands=na,e.keyMap=zi,e.keyName=Xi,e.isModifierKey=Vi,e.lookupKey=Ki,e.normalizeKeyMap=qi,e.StringStream=Ke,e.SharedTextMarker=Oi,e.TextMarker=Si,e.LineWidget=wi,e.e_preventDefault=ke,e.e_stopPropagation=Te,e.e_stop=Ce,e.addClass=_,e.contains=N,e.rmClass=L,e.keyNames=Di}(Oa),Oa.version="5.48.4",Oa}()},function(e,n,t){"use strict";var r=this&&this.__spreadArrays||function(){for(var e=0,n=0,t=arguments.length;n=2,c=l?i:t.length;return{lines:t.slice(0,i).map(function(e){return e.replace(r.INDENTED_PATTERN,"")}),countLinesConsumed:c,hasMultipleTrailingBlankLines:l}}},function(e,n,t){"use strict";var r,o=this&&this.__extends||(r=function(e,n){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t])})(e,n)},function(e,n){function t(){this.constructor=e}r(e,n),e.prototype=null===n?Object.create(n):(t.prototype=n.prototype,new t)});Object.defineProperty(n,"__esModule",{value:!0}),n.Document=void 0;var i=t(1),a=t(19),s=t(74),l=t(7),c=t(27),u=function(e){function n(t,r){void 0===r&&(r=new n.TableOfContents);var o=e.call(this,t)||this;return o.tableOfContents=r,o}return o(n,e),n.create=function(e){var t=n.TableOfContents.createThenAssociateSectionLinksWithEntries(e),r=new n(e,t);return s.insertFootnoteBlocksAndAssignFootnoteReferenceNumbers(r),r},n}(l.OutlineSyntaxNodeContainer);n.Document=u,function(e){var n=function(){function e(e){void 0===e&&(e=[]),this.entries=e}return e.createThenAssociateSectionLinksWithEntries=function(n){for(var t=e.getEntries(n),r=0;rt?"desc":"asc"},e.prototype.descendantsToIncludeInTableOfContents=function(){return i.concat(this.items.map(function(e){return e.descendantsToIncludeInTableOfContents()}))},e.prototype.inlineDescendants=function(){return i.concat(this.items.map(function(e){return e.inlineDescendants()}))},e.prototype.render=function(e){return e.numberedList(this)},e}();n.NumberedList=s,function(e){var n=function(e){function n(n,t){var r=e.call(this,n)||this;return r.children=n,r.NUMBERED_LIST_ITEM=void 0,r.ordinal=null==t?void 0:t.ordinal,r}return o(n,e),n}(a.OutlineSyntaxNodeContainer);e.Item=n}(s=n.NumberedList||(n.NumberedList={})),n.NumberedList=s},function(e,n,t){"use strict";var r,o=this&&this.__extends||(r=function(e,n){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t])})(e,n)},function(e,n){function t(){this.constructor=e}r(e,n),e.prototype=null===n?Object.create(n):(t.prototype=n.prototype,new t)});Object.defineProperty(n,"__esModule",{value:!0}),n.RevealableBlock=void 0;var i=function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n.REVEALABLE_BLOCK=void 0,n}return o(n,e),n.prototype.render=function(e){return e.revealableBlock(this)},n.prototype.descendantsToIncludeInTableOfContents=function(){return[]},n}(t(26).RichOutlineSyntaxNode);n.RevealableBlock=i},function(e,n,t){"use strict";var r,o=this&&this.__extends||(r=function(e,n){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t])})(e,n)},function(e,n){function t(){this.constructor=e}r(e,n),e.prototype=null===n?Object.create(n):(t.prototype=n.prototype,new t)});Object.defineProperty(n,"__esModule",{value:!0}),n.RichOutlineSyntaxNode=void 0;var i=function(e){function n(n,t){var r=e.call(this,n)||this;return r.sourceLineNumber=null==t?void 0:t.sourceLineNumber,r}return o(n,e),n}(t(7).OutlineSyntaxNodeContainer);n.RichOutlineSyntaxNode=i},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.SectionLink=void 0;var r=t(39),o=t(13),i=t(37),a=function(){function e(e,n){this.markupSnippetFromSectionTitle=e,this.entry=n}return e.prototype.referenceMostAppropriateTableOfContentsEntry=function(e){if(this.markupSnippetFromSectionTitle)for(var n=0,t=e.entries;n=this.entireText.length},e.prototype.consume=function(e){var n=e.exec(this._remaining);if(!n)return null;var t=n[0],r=n.slice(1),o=this.entireText[this._index+t.length];return this.advance(t.length),{match:t,charAfterMatch:o,captures:r}},e}();n.TextConsumer=r},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Token=void 0;var r=function(){function e(e,n){this.role=e,this.value=n}return e.prototype.enclosesContentBetweenItselfAnd=function(e){this.correspondingEnclosingToken=e,e.correspondingEnclosingToken=this},e}();n.Token=r},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.tryToParseBlockquote=void 0;var r=t(0),o=t(5),i=t(59),a=t(8),s=t(3);n.tryToParseBlockquote=function(e){for(var n=new s.LineConsumer(e.markupLines),t=[];;){var r=n.consumeLineIfMatches(l);if(!r)break;t.push(r.line.replace(l,""))}if(!t.length)return null;var o=a.getOutlineSyntaxNodes({markupLines:t,sourceLineNumber:e.sourceLineNumber,headingLeveler:e.headingLeveler,settings:e.settings});return{parsedNodes:[new i.Blockquote(o)],countLinesConsumed:n.countLinesConsumed()}};var l=r.patternStartingWith(o.ANY_OPTIONAL_WHITESPACE+">"+r.optional(" "))},function(e,n,t){"use strict";var r,o=this&&this.__extends||(r=function(e,n){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t])})(e,n)},function(e,n){function t(){this.constructor=e}r(e,n),e.prototype=null===n?Object.create(n):(t.prototype=n.prototype,new t)});Object.defineProperty(n,"__esModule",{value:!0}),n.Blockquote=void 0;var i=function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n.BLOCKQUOTE=void 0,n}return o(n,e),n.prototype.render=function(e){return e.blockquote(this)},n}(t(26).RichOutlineSyntaxNode);n.Blockquote=i},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.tryToParseBulletedList=void 0;var r=t(0),o=t(5),i=t(20),a=t(17),s=t(8),l=t(3);n.tryToParseBulletedList=function(e){for(var n=new l.LineConsumer(e.markupLines),t=[];!n.done();){var r=[],o=e.sourceLineNumber+n.countLinesConsumed(),u=n.consumeLineIfMatches(c);if(!u)break;r.push(u.line.replace(c,""));var d=a.getIndentedBlock(n.remaining()),p=!1;if(d&&(r.push.apply(r,d.lines),n.advance(d.countLinesConsumed),p=d.hasMultipleTrailingBlankLines),t.push(new i.BulletedList.Item(s.getOutlineSyntaxNodes({markupLines:r,sourceLineNumber:o,headingLeveler:e.headingLeveler,settings:e.settings}))),p)break}return t.length?{parsedNodes:[new i.BulletedList(t)],countLinesConsumed:n.countLinesConsumed()}:null};var c=r.patternStartingWith(r.optional(" ")+r.anyCharFrom("*","-","•")+o.INLINE_WHITESPACE_CHAR)},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.tryToParseCodeBlock=void 0;var r=t(0),o=t(62),i=t(3);n.tryToParseCodeBlock=function(e){var n=new i.LineConsumer(e.markupLines),t=n.consumeLineIfMatches(a);if(!t)return null;for(var r=t.line.trim(),l=[];!n.done();){var c=n.consumeLineIfMatches(a);if(c){var u=c.line.trim();if(u.length===r.length)break;l.push(u)}else l.push(n.consumeLine())}return{parsedNodes:[new o.CodeBlock(l.join(s))],countLinesConsumed:n.countLinesConsumed()}};var a=r.streakOf("`"),s="\n"},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.CodeBlock=void 0;var r=function(){function e(e,n){this.code=e,this.sourceLineNumber=null==n?void 0:n.sourceLineNumber}return e.prototype.descendantsToIncludeInTableOfContents=function(){return[]},e.prototype.inlineDescendants=function(){return[]},e.prototype.render=function(e){return e.codeBlock(this)},e}();n.CodeBlock=r},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.INTEGER=n.tryToParseNumberedList=void 0;var r=t(0),o=t(5),i=t(2),a=t(24),s=t(17),l=t(8),c=t(3);n.tryToParseNumberedList=function(e){for(var n,t=new c.LineConsumer(e.markupLines),r=[];!t.done();){var o=t.countLinesConsumed(),d=t.consumeLineIfMatches(p,{andIf:function(e){return!i.DIVIDER_STREAK_PATTERN.test(e.line)}});if(!d)break;var m=d.captures[0],g=new u({bullet:m,firstLineOfMarkup:d.line.replace(p,""),sourceLineNumber:e.sourceLineNumber+o}),v=s.getIndentedBlock(t.remaining()),y=!1;if(v&&((n=g.markupLines).push.apply(n,v.lines),t.advance(v.countLinesConsumed),y=v.hasMultipleTrailingBlankLines),r.push(g),y)break}if(!function(e){var n=e.length;return n>0&&(n>1||!h.test(e[0].bullet))}(r))return null;var b=r.map(function(n){var t=l.getOutlineSyntaxNodes({markupLines:n.markupLines,sourceLineNumber:n.sourceLineNumber,headingLeveler:e.headingLeveler,settings:e.settings}),r=function(e){var n=f.exec(e.bullet);return n?parseInt(n[0],10):void 0}(n);return new a.NumberedList.Item(t,{ordinal:r})});return{parsedNodes:[new a.NumberedList(b)],countLinesConsumed:t.countLinesConsumed()}};var u=function(e){this.bullet=e.bullet,this.markupLines=[e.firstLineOfMarkup],this.sourceLineNumber=e.sourceLineNumber};n.INTEGER=r.optional(r.escapeForRegex("-"))+r.oneOrMore(o.DIGIT);var d=r.either("#",r.capture(r.either(n.INTEGER,"#")+r.anyCharFrom(".",")"))),p=r.patternStartingWith(r.optional(" ")+d+o.INLINE_WHITESPACE_CHAR),h=r.patternStartingWith(n.INTEGER+"\\."),f=new RegExp(n.INTEGER)},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.tryToParseThematicBreakStreak=void 0;var r=t(2),o=t(34),i=t(3);n.tryToParseThematicBreakStreak=function(e){var n=new i.LineConsumer(e.markupLines);return n.consumeLineIfMatches(r.DIVIDER_STREAK_PATTERN)?{parsedNodes:e.mostRecentSibling instanceof o.ThematicBreak?[]:[new o.ThematicBreak],countLinesConsumed:n.countLinesConsumed()}:null}},function(e,n,t){"use strict";var r,o=this&&this.__extends||(r=function(e,n){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t])})(e,n)},function(e,n){function t(){this.constructor=e}r(e,n),e.prototype=null===n?Object.create(n):(t.prototype=n.prototype,new t)});Object.defineProperty(n,"__esModule",{value:!0}),n.InlineDocument=void 0;var i=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return o(n,e),n.prototype.INLINE_DOCUMENT=function(){},n}(t(6).InlineSyntaxNodeContainer);n.InlineDocument=i},function(e,n,t){"use strict";function r(e,n){return e.replace(n,function(e){return o[e]})}Object.defineProperty(n,"__esModule",{value:!0}),n.escapeHtmlAttrValue=n.escapeHtmlContent=void 0,n.escapeHtmlContent=function(e){return r(e,/[&<]/g)},n.escapeHtmlAttrValue=function(e){return r(String(e),/[&"]/g)};var o={"&":"&","<":"<",'"':"""}},function(e,n){e.exports={parsing:{createSourceMap:!0},rendering:{idPrefix:""}}},function(e,n,t){var r=t(69);"string"==typeof r&&(r=[[e.i,r,""]]);var o={insert:"head",singleton:!1};t(71)(r,o);r.locals&&(e.exports=r.locals)},function(e,n,t){(e.exports=t(70)(!1)).push([e.i,'/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace, monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}#tab-container{align-items:center;display:flex;height:44px}#documentation-container{margin-left:510px;padding:0 15px}#documentation-container #table-of-contents{display:none}#documentation-container #documentation,#documentation-container #table-of-contents{margin:0 auto;max-width:580px;overflow-x:hidden}@media only screen and (min-width: 981px){#editor-container{border-right:1px solid #aaa;position:fixed;left:0;top:0;width:510px}#editor-container .CodeMirror{height:100vh}}@media only screen and (max-width: 980px){#editor-container{display:none}#documentation-container{margin-left:0}}.CodeMirror{font-size:14px;line-height:1.3;font-family:Menlo,Consolas,monospace !important}.CodeMirror .CodeMirror-scroll{-webkit-overflow-scrolling:touch}#tab-container{display:flex;justify-content:center}#tab-container span[role="tab"]{box-shadow:0 1px 3px rgba(0,0,0,0.12),0 1px 2px rgba(0,0,0,0.24);background-color:#c00;border-radius:3px;color:white;cursor:pointer;display:inline-block;font-size:75%;margin:10px 0;padding:7px 12px 5px 12px;text-transform:uppercase;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#tab-container span[role="tab"]:hover{background:#b00}#tab-container span[role="tab"]:active{background:#a00}#tab-container span[role="tab"][aria-selected="true"]{display:none}#documentation-container{font:1em/1.6 -apple-system,BlinkMacSystemFont,sans-serif}#documentation-container #table-of-contents{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#documentation-container #table-of-contents h1,#documentation-container #table-of-contents h2,#documentation-container #table-of-contents h3,#documentation-container #table-of-contents h4,#documentation-container #table-of-contents h5,#documentation-container #table-of-contents h6,#documentation-container #table-of-contents [role="heading"]{font-weight:normal;font-size:100%;margin:0;padding:0}#documentation-container #table-of-contents kbd{border-color:#aaa;box-shadow:0 .25em 0 rgba(13,13,13,0.2),.125em .25em 0 rgba(13,13,13,0.2),-.125em .25em 0 rgba(13,13,13,0.2);color:#444}#documentation-container #table-of-contents code{text-decoration:none}#documentation-container #table-of-contents small{display:none}#documentation-container #table-of-contents h1,#documentation-container #table-of-contents h2{font-weight:bold}#documentation-container #table-of-contents h1 small,#documentation-container #table-of-contents h2 small{display:inline}#documentation-container #table-of-contents a{box-sizing:border-box;color:black;display:inline-block;padding:3px 0 0 270px;text-decoration:none;width:100%}@media only screen and (max-width: 420px){#documentation-container #table-of-contents a{padding-left:180px}}#documentation-container #table-of-contents a:hover{text-decoration:underline}#documentation-container #table-of-contents h1 a{padding-left:0}@media only screen and (max-width: 420px){#documentation-container #table-of-contents h1 a{padding-left:0}}#documentation-container #table-of-contents h2 a{padding-left:0px}@media only screen and (max-width: 420px){#documentation-container #table-of-contents h2 a{padding-left:0px}}#documentation-container #table-of-contents h3 a{padding-left:30px}@media only screen and (max-width: 420px){#documentation-container #table-of-contents h3 a{padding-left:20px}}#documentation-container #table-of-contents h4 a{padding-left:60px}@media only screen and (max-width: 420px){#documentation-container #table-of-contents h4 a{padding-left:40px}}#documentation-container #table-of-contents h5 a{padding-left:90px}@media only screen and (max-width: 420px){#documentation-container #table-of-contents h5 a{padding-left:60px}}#documentation-container #table-of-contents h6 a{padding-left:120px}@media only screen and (max-width: 420px){#documentation-container #table-of-contents h6 a{padding-left:80px}}#documentation-container #table-of-contents [aria-level="7"] a{padding-left:150px}@media only screen and (max-width: 420px){#documentation-container #table-of-contents [aria-level="7"] a{padding-left:100px}}#documentation-container #table-of-contents [aria-level="8"] a{padding-left:180px}@media only screen and (max-width: 420px){#documentation-container #table-of-contents [aria-level="8"] a{padding-left:120px}}#documentation-container #table-of-contents [aria-level="9"] a{padding-left:210px}@media only screen and (max-width: 420px){#documentation-container #table-of-contents [aria-level="9"] a{padding-left:140px}}#documentation-container #table-of-contents [aria-level="10"] a{padding-left:240px}@media only screen and (max-width: 420px){#documentation-container #table-of-contents [aria-level="10"] a{padding-left:160px}}#documentation-container #table-of-contents h1 a{padding-top:25px;padding-bottom:6px}#documentation-container #table-of-contents h2 a{padding-top:10px}#documentation-container blockquote{border-left:20px solid #ddd;background-color:#fcfcfc;margin:15px 0;padding:5px 20px}#documentation-container blockquote blockquote{border-color:#d3d3d3;background-color:#f2f2f2}#documentation-container blockquote blockquote blockquote{border-color:#c9c9c9;background-color:#e8e8e8}#documentation-container blockquote blockquote blockquote blockquote{border-color:#bebebe;background-color:#ddd}#documentation-container pre,#documentation-container code{background:#234;color:white;font-family:Menlo,Consolas,monospace;font-size:87.5%}#documentation-container .up-inline-code{box-shadow:0 1px 3px rgba(0,0,0,0.12),0 1px 2px rgba(0,0,0,0.24);border-radius:.125em;font-weight:normal;margin:0 .0625em;padding:0 .2em;white-space:pre}#documentation-container a code{text-decoration:underline}#documentation-container a:hover code{text-decoration:none}#documentation-container pre{box-shadow:0 3px 6px rgba(0,0,0,0.16),0 3px 6px rgba(0,0,0,0.23);border-radius:.1875em;line-height:1.5;margin:20px 0;overflow-x:auto;padding:7px 9px}@media only screen and (max-width: 420px){#documentation-container pre{font-size:85%;line-height:1.4}}#documentation-container pre>code{box-shadow:none;border-radius:0;padding:0}#documentation-container dl{margin-bottom:25px}#documentation-container dl dl{margin-bottom:0}#documentation-container dl dt{color:#000;font-family:-apple-system,BlinkMacSystemFont,sans-serif;font-weight:bold}#documentation-container dl dd{margin-left:20px}#documentation-container dl+dl{margin-top:45px}#documentation-container i i,#documentation-container i em,#documentation-container em i,#documentation-container em em,#documentation-container caption i,#documentation-container caption em{display:inline-block;transform:skewX(-20deg)}#documentation-container kbd{border-color:#aaa;box-shadow:0 .25em 0 rgba(13,13,13,0.2),.125em .25em 0 rgba(13,13,13,0.2),-.125em .25em 0 rgba(13,13,13,0.2);color:#444;border-radius:.25em;border-style:solid;border-width:.125em;display:inline-block;font-family:-apple-system,BlinkMacSystemFont,sans-serif;font-size:70%;line-height:1.4;margin:0 .1em;padding:.1em .6em;text-shadow:0 .1em 0 white;white-space:nowrap}#documentation-container a kbd{border-color:#579;box-shadow:0 .25em 0 rgba(85,119,153,0.3),.125em .25em 0 rgba(85,119,153,0.3),-.125em .25em 0 rgba(85,119,153,0.3);color:#579}#documentation-container .up-footnote-reference a{font-size:110%;margin-left:.125em;text-decoration:none}#documentation-container .up-footnote-reference a:before{content:\'[\'}#documentation-container .up-footnote-reference a:after{content:\']\'}#documentation-container .up-footnotes{font-size:85%}#documentation-container .up-footnotes dt{font-weight:normal}#documentation-container .up-footnotes dt a:before{content:\'↑\'}#documentation-container img{max-width:100%}#documentation-container h1,#documentation-container h2,#documentation-container h3,#documentation-container h4,#documentation-container h5,#documentation-container h6,#documentation-container [role="heading"]{color:#000;font-family:-apple-system,BlinkMacSystemFont,sans-serif;line-height:1.5;overflow-x:auto;padding-top:10px}#documentation-container h1{font-size:180%;padding-bottom:15px;text-align:center}#documentation-container h2{font-size:140%}#documentation-container h3{font-size:120%}#documentation-container h4{font-size:110%}#documentation-container h5{font-size:100%}#documentation-container h6{font-size:90%}#documentation-container [role="heading"]{font-size:60%;margin:1.5em 0}#documentation-container [aria-level="7"]{font-size:85%}#documentation-container [aria-level="8"]{font-size:80%}#documentation-container [aria-level="9"]{font-size:75%}#documentation-container [aria-level="10"]{font-size:70%}#documentation-container mark{background-color:yellow;padding:.0625em}#documentation-container mark mark{background-color:gold}#documentation-container mark mark mark{background-color:orange}#documentation-container q{margin:0 .0625em;quotes:\'“\' \'”\' "‘" "’"}#documentation-container q:before,#documentation-container q:after{font-family:serif}#documentation-container q:before{content:open-quote}#documentation-container q:after{content:close-quote}#documentation-container .up-lines{text-align:center}#documentation-container .up-lines+.up-lines{margin-top:20px}#documentation-container .up-lines>div{margin-bottom:5px}#documentation-container a{color:#579}#documentation-container a:hover{text-decoration:none}#documentation-container ul+ul{margin-top:40px}#documentation-container ol+ol{margin-top:40px}#documentation-container small{font-size:100%;opacity:.5}#documentation-container .up-square-brackets{font-style:italic}@-webkit-keyframes reveal{0%{opacity:1}30%{opacity:.5}100%{opacity:1}}@keyframes reveal{0%{opacity:1}30%{opacity:.5}100%{opacity:1}}#documentation-container .up-revealable>label{box-shadow:0 1px 3px rgba(0,0,0,0.12),0 1px 2px rgba(0,0,0,0.24);background-color:#c00;border-radius:3px;color:white;cursor:pointer;display:inline-block;font-size:75%;margin:10px 0;padding:7px 12px 5px 12px;text-transform:uppercase;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#documentation-container .up-revealable>label:hover{background:#b00}#documentation-container .up-revealable>label:active{background:#a00}#documentation-container .up-revealable>input[type="radio"]{display:none}#documentation-container .up-revealable>input[type="radio"] ~ span,#documentation-container .up-revealable>input[type="radio"] ~ div{display:none}#documentation-container .up-revealable>input[type="radio"].up-hide:checked+label{display:none}#documentation-container .up-revealable>input[type="radio"].up-reveal:checked+label{display:none}#documentation-container .up-revealable>input[type="radio"].up-reveal:checked ~ span,#documentation-container .up-revealable>input[type="radio"].up-reveal:checked ~ div{-webkit-animation:1s reveal;animation:1s reveal}#documentation-container .up-revealable>input[type="radio"].up-reveal:checked ~ span{display:inline}#documentation-container .up-revealable>input[type="radio"].up-reveal:checked ~ div{display:block}#documentation-container .up-revealable>div{margin-left:20px}#documentation-container span.up-revealable>label{box-shadow:0 1px 3px rgba(0,0,0,0.12),0 1px 2px rgba(0,0,0,0.24);background-color:#c00;border-radius:3px;color:white;cursor:pointer;display:inline-block;font-size:75%;margin:10px 0;padding:7px 12px 5px 12px;text-transform:uppercase;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:inline;font-size:65%;margin:0 5px;padding:4px 12px 3px 12px}#documentation-container span.up-revealable>label:hover{background:#b00}#documentation-container span.up-revealable>label:active{background:#a00}#documentation-container div.up-revealable>label{box-shadow:0 1px 3px rgba(0,0,0,0.12),0 1px 2px rgba(0,0,0,0.24);background-color:#c00;border-radius:3px;color:white;cursor:pointer;display:inline-block;font-size:75%;margin:10px 0;padding:7px 12px 5px 12px;text-transform:uppercase;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#documentation-container div.up-revealable>label:hover{background:#b00}#documentation-container div.up-revealable>label:active{background:#a00}#documentation-container table{border-collapse:collapse;margin:20px 0}@media only screen and (max-width: 420px){#documentation-container table{font-size:80%}}#documentation-container table caption{font-style:italic}#documentation-container table tbody tr:hover td{background:#ddd}#documentation-container table tbody tr:nth-child(even) td{background-color:#eee}#documentation-container table tbody tr:nth-child(even):hover td{background-color:#ccc}#documentation-container table tbody tr:nth-child(even):hover td{border-color:#999}#documentation-container table td,#documentation-container table th{padding:10px;border:1px solid #bbb}#documentation-container table td.up-numeric,#documentation-container table th.up-numeric{text-align:right}#documentation-container table td[colspan],#documentation-container table th[colspan]{text-align:center}#documentation-container table th{border:0;color:#000;font-family:-apple-system,BlinkMacSystemFont,sans-serif}#documentation-container table th[scope="row"]{text-align:right}#documentation-container hr{border:0;padding-bottom:30px;text-align:center}#documentation-container hr:after{color:#ccc;content:\'☆ ☆ ☆\';font-size:10px}@media speech, braille{#documentation-container hr:after{content:none}}#documentation-container video{max-width:100%}@-webkit-keyframes clean{from{opacity:0.5;transition:0.5s}to{opacity:1}}@keyframes clean{from{opacity:0.5;transition:0.5s}to{opacity:1}}.dirty{opacity:0.5;transition:0.5s}.clean{-webkit-animation:0.2s clean;animation:0.2s clean}.CodeMirror{font-family:monospace;height:300px;color:black}.CodeMirror-lines{padding:4px 0}.CodeMirror pre{padding:0 4px}.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{background-color:white}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:black}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid black;border-right:none;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{width:auto;border:0 !important;background:#7e7}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-animate-fat-cursor{width:auto;border:0;-webkit-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite;background-color:#7e7}@-webkit-keyframes blink{0%{}50%{background-color:transparent}100%{}}@keyframes blink{0%{}50%{background-color:transparent}100%{}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-rulers{position:absolute;left:0;right:0;top:-50px;bottom:-20px;overflow:hidden}.CodeMirror-ruler{border-left:1px solid #ccc;top:0;bottom:0;position:absolute}.cm-s-default .cm-header{color:blue}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:bold}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta{color:#555}.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-s-default .cm-error{color:#f00}.cm-invalidchar{color:#f00}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0f0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#f22}.CodeMirror-matchingtag{background:rgba(255,150,0,0.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden;background:white}.CodeMirror-scroll{overflow:scroll !important;margin-bottom:-30px;margin-right:-30px;padding-bottom:30px;height:100%;outline:none;position:relative}.CodeMirror-sizer{position:relative;border-right:30px solid transparent}.CodeMirror-vscrollbar,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{position:absolute;z-index:6;display:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;min-height:100%;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-30px;*zoom:1;*display:inline}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:none !important;border:none !important}.CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-gutter-wrapper{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre{border-radius:0;border-width:0;background:transparent;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent;font-variant-ligatures:none}.CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;overflow:auto}.CodeMirror-code{outline:none}.CodeMirror-scroll,.CodeMirror-sizer,.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber{box-sizing:content-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-cursor{position:absolute;pointer-events:none}.CodeMirror-measure pre{position:static}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}div.CodeMirror-dragcursors{visibility:visible}.CodeMirror-focused div.CodeMirror-cursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background:#ffa;background:rgba(255,255,0,0.4)}.CodeMirror span{*vertical-align:text-bottom}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:\'\'}span.CodeMirror-selectedtext{background:none}\n',""])},function(e,n,t){"use strict";e.exports=function(e){var n=[];return n.toString=function(){return this.map(function(n){var t=function(e,n){var t=e[1]||"",r=e[3];if(!r)return t;if(n&&"function"==typeof btoa){var o=(a=r,s=btoa(unescape(encodeURIComponent(JSON.stringify(a)))),l="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(s),"/*# ".concat(l," */")),i=r.sources.map(function(e){return"/*# sourceURL=".concat(r.sourceRoot).concat(e," */")});return[t].concat(i).concat([o]).join("\n")}var a,s,l;return[t].join("\n")}(n,e);return n[2]?"@media ".concat(n[2],"{").concat(t,"}"):t}).join("")},n.i=function(e,t){"string"==typeof e&&(e=[[null,e,""]]);for(var r={},o=0;o=0;a--){var c=n[a];if(c.correspondingEnclosingToken.role===o.role){n.splice(a,1);break}i.push(c.correspondingEnclosingToken)}this.closeAndReopenConventionsAroundTokenAtIndex(t,i),t+=2*i.length}}},e.prototype.resolveOverlapping=function(e,n){for(var t=0;t1&&(t.colspan=n.countColumnsSpanned),l.htmlElementWithAlreadyEscapedChildren(e,this.renderEach(n.children),t)},n.prototype.htmlElement=function(e,n,t){return void 0===t&&(t={}),l.htmlElementWithAlreadyEscapedChildren(e,this.renderEach(n),t)},n.prototype.htmlIdOfActualEntryInDocument=function(e){return this.idFor(this.settings.terms.sectionReferencedByTableOfContents,e.ordinalInTableOfContents)},n.prototype.footnoteHtmlId=function(e){return this.idFor(this.settings.terms.footnote,e)},n.prototype.footnoteReferenceHtmlId=function(e){return this.idFor(this.settings.terms.footnoteReference,e)},n.prototype.isUrlAllowed=function(e){return this.settings.renderDangerousContent||!f.test(e)},n.prototype.reset=function(e){this.revealableContentCount=0,this.isInsideLink=!1,this.isInsideTableOfContents=null!=e&&e.isInsideTableOfContents},n}(s.Renderer);function d(e,n){return void 0===n&&(n={}),e.sourceLineNumber&&(n["data-up-source-line"]=e.sourceLineNumber),n}function p(){for(var e=[],n=0;n"}function a(e,t){return"<"+r([e],function(e){return Object.keys(e).sort().map(function(t){return function(e,t){var r=e[t];return r===n.EMPTY_ATTRBUTE_VALUE?t:t+'="'+o.escapeHtmlAttrValue(r)+'"'}(e,t)})}(t)).join(" ")+">"}n.htmlElement=function(e,n,t){return void 0===t&&(t={}),i(e,[o.escapeHtmlContent(n)],t)},n.htmlElementWithAlreadyEscapedChildren=i,n.singleTagHtmlElement=function(e,n){return void 0===n&&(n={}),a(e,n)},n.EMPTY_ATTRBUTE_VALUE=void 0},function(e,n,t){"use strict";t.r(n),n.default='##########\r\nWhat\'s Up?\r\n##########\r\n\r\nUp is a markup language for writing structured documents in plain text.\r\n\r\nFor software developers, Up offers a software library that converts Up markup into HTML. To learn more, please see [topic: using the Up library].\r\n\r\n\r\n\r\n===========\r\nWhy use Up?\r\n===========\r\n\r\nUp isn\'t the only markup language that produces HTML. What makes it special?\r\n\r\n\r\nUp has a flexible, forgiving syntax\r\n===================================\r\n\r\nUp recognizes [topic: numbered lists] that count backwards.\r\n\r\nMarkup\r\n ````\r\n 3) Buy milk\r\n 2) Buy bread\r\n #) Buy happiness\r\n ````\r\n\r\nOutput\r\n 3) Buy milk\r\n 2) Buy bread\r\n #) Buy happiness\r\n\r\nUp usually ignores [topic: excessive delimiter characters].\r\n\r\nFor example, you don\'t need to perfectly balance asterisks when stressing or emphasizing text.\r\n\r\nMarkup\r\n ````\r\n I ***love****** asterisks!\r\n ````\r\n\r\nOutput\r\n I ***love****** asterisks!\r\n\r\nUp isn\'t picky about which brackets you use for [topic: links].\r\n\r\nMarkup\r\n ````\r\n - Buy [milk] (en.wikipedia.org/wiki/Milk)\r\n - Buy (bread) [en.wikipedia.org/wiki/Bread]\r\n - Buy [sugar] [en.wikipedia.org/wiki/Sugar]\r\n - Buy (happiness) (en.wikipedia.org/wiki/Happiness)\r\n ````\r\n\r\nOutput\r\n - Buy [milk] (en.wikipedia.org/wiki/Milk)\r\n - Buy (bread) [en.wikipedia.org/wiki/Bread]\r\n - Buy [sugar] [en.wikipedia.org/wiki/Sugar]\r\n - Buy (happiness) (en.wikipedia.org/wiki/Happiness)\r\n\r\nUp even supports [topic: overlapping]!\r\n\r\nMarkup\r\n ````\r\n John **enjoys ==sleeping** late== whenever he can.\r\n ````\r\n\r\nOutput\r\n John **enjoys ==sleeping** late== whenever he can.\r\n\r\n\r\nUp uses customizable keywords\r\n=============================\r\n\r\nToo many markup languages devolve into a dense soup of symbols and punctuation.\r\n\r\nWhen a keyword would provide more clarity than a symbol, Up takes advantage of that! Several writing conventions, including [topic: tables] and [topic: revealable content], incorporate keywords.\r\n\r\nIf you\'re a software developer using the Up library, you can provide multiple custom variations for each keyword. To learn more, please see [topic: customizing keywords].\r\n\r\n\r\nUp produces fully accessible HTML\r\n=================================\r\n\r\nFrom the table of contents to the last movie-ruining spoiler, Up produces fully accessible HTML. This means people who have trouble viewing a screen or a using mouse can enjoy every document.\r\n\r\n\r\n\r\n=================\r\nWhy *not* use Up?\r\n=================\r\n\r\nYou want a rich ecosystem of tools\r\n==================================\r\n\r\nSo far, there is only one [software library for Up] (npmjs.com/package/up-lang), written and maintained by a [single person] (github.com/start). In contrast, [other markup languages] (duckduckgo.com/?q=markdown) have countless tools and plugins.\r\n\r\n\r\nYou need speed\r\n==============\r\n\r\nUp is not terribly slow, but it\'s not terribly fast, either---at least not yet! If you need instant, real-time parsing and rendering of large documents, Up isn\'t the best markup language for you.\r\n\r\n\r\n\r\n###################\r\nWriting conventions\r\n###################\r\n\r\nDon\'t get lost! The following terms are occasionally used throughout this section.\r\n\r\nWriting convention\r\n Any special annotation or formatting recognized by Up.\r\n\r\nInline writing convention\r\n Any writing convention that can be used within paragraphs. This includes [topic: emphasis] and [topic: highlighting].\r\n\r\nOutline writing convention\r\n Any non-inline writing convention. This includes [topic: paragraphs] and [topic: tables].\r\n\r\n\r\n==========\r\nParagraphs\r\n==========\r\n\r\nParagraphs are the simplest writing convention in Up.\r\n\r\nMarkup\r\n ````\r\n Unlike regular dental floss, you can use floss picks even if you\'re not a trained dental hygienist.\r\n\r\n Floss picks are sold in stylish, resealable plastic bags. You have no excuse not to buy some today.\r\n ````\r\n\r\nOutput\r\n Unlike regular dental floss, you can use floss picks even if you\'re not a trained dental hygienist.\r\n\r\n Floss picks are sold in stylish, resealable plastic bags. You have no excuse not to buy some today.\r\n\r\nTo produce a paragraph, write a line of text. That\'s all there is to it!\r\n\r\nTypically, paragraphs are separated by one or two blank lines. Three or more blank lines between paragraphs indicates a meaningful change of subject. To learn more, see [topic: thematic breaks].\r\n\r\nIn contrast, *consecutive* non-blank lines produce [topic: line blocks], not consecutive paragraphs.\r\n\r\n\r\n===========\r\nLine blocks\r\n===========\r\n\r\nUse the line block convention for addresses, lyrics, or anything consisting of *lines* instead of actual [topic: paragraphs].\r\n\r\nMarkup\r\n ````\r\n Have you read my new poem?\r\n\r\n Roses are red\r\n Violets *aren\'t* blue\r\n Lyrics have lines\r\n And addresses do, too\r\n\r\n Poetry is just too easy.\r\n ````\r\n\r\nOutput\r\n Have you read my new poem?\r\n\r\n Roses are red\r\n Violets *aren\'t* blue\r\n Lyrics have lines\r\n And addresses do, too\r\n\r\n Poetry is just too easy.\r\n\r\nConsecutive non-blank lines produce a line block, unless those lines represent another writing convention, like [topic: numbered lists].\r\n\r\n\r\n========\r\nEmphasis\r\n========\r\n\r\nUse the emphasis convention to emphasize a word or phrase.\r\n\r\nIf the reader should pronounce a word or phrase differently (e.g. to indicate contrast or sarcasm), consider emphasizing it.\r\n\r\nMarkup\r\n ````\r\n Only eat the *green* grapes. The red grapes are for Pikachu.\r\n ````\r\n\r\nOutput\r\n Only eat the *green* grapes. The red grapes are for Pikachu.\r\n\r\nTo emphasize text, enclose it within single asterisks.\r\n\r\nLike most inline writing conventions, emphasis can be nested within itself.\r\n\r\nMarkup\r\n ````\r\n John really, *really, *really** hates Red Delicious apples.\r\n ````\r\n\r\nOutput\r\n John really, *really, *really** hates Red Delicious apples.\r\n\r\n\r\n======\r\nStress\r\n======\r\n\r\nUse the stress convention to indicate a word or phrase is particularly important.\r\n\r\nIf the reader should raise their voice while reading a word or phrase, consider stressing it.\r\n\r\nMarkup\r\n ````\r\n Do **not** step on the dinosaur!\r\n ````\r\n\r\nOutput\r\n Do **not** step on the dinosaur!\r\n\r\nTo stress text, enclose it within double asterisks.\r\n\r\nLike most inline writing conventions, stress can be nested within itself.\r\n\r\nMarkup\r\n ````\r\n John really, **really, **really**** hates Red Delicious apples.\r\n ````\r\n\r\nOutput\r\n John really, **really, **really**** hates Red Delicious apples.\r\n\r\n\r\n=======\r\nItalics\r\n=======\r\n\r\nUse the italic convention to stylistically offset a word or phrase from the surrounding text *without* conveying emphasis. The titles of books and movies should probably be italicized.\r\n\r\nIf you want to emphasize text, see [topic: emphasis].\r\n\r\nMarkup\r\n ````\r\n My favorite video game is _Chrono Cross_.\r\n ````\r\n\r\nOutput\r\n My favorite video game is _Chrono Cross_.\r\n\r\nTo italicize text, enclose it within single underscores.\r\n\r\nLike most inline writing conventions, italicized text can be nested within itself.\r\n\r\nMarkup\r\n ````\r\n My favorite show is _Real Recipes _Redux_: Super Suppers_.\r\n ````\r\n\r\nOutput\r\n My favorite show is _Real Recipes _Redux_: Super Suppers_.\r\n\r\n\r\n====\r\nBold\r\n====\r\n\r\nTypically, people use bold text to convey extra importance---that\'s what the [topic: stress] convention is for!\r\n\r\nTo make a word or phrase bold *without* conveying any extra importance, use the plain old bold convention.\r\n\r\nMarkup\r\n ````\r\n Has anyone actually used __KABOOM__ cleaning products?\r\n ````\r\n\r\nOutput\r\n Has anyone actually used __KABOOM__ cleaning products?\r\n\r\nTo make text bold, enclose it within double underscores.\r\n\r\nLike most inline writing conventions, bold text can be nested within itself.\r\n\r\nMarkup\r\n ````\r\n We\'ve all seen the ads.\r\n\r\n __No hard scrubbing! __KABOOM__... and the stains are gone!__\r\n ````\r\n\r\nOutput\r\n We\'ve all seen the ads.\r\n\r\n __No hard scrubbing! __KABOOM__... and the stains are gone!__\r\n\r\n\r\n============\r\nHighlighting\r\n============\r\n\r\nTo draw attention to text without altering its semantics, using the highlighting convention.\r\n\r\nHighlighting should not be used to emphasize or stress text! If that\'s your purpose, see [topic: emphasis] or [topic: stress].\r\n\r\nMarkup\r\n ````\r\n Our cupcakes are organic, ==gluten-free==, and made using only the most expensive ingredients.\r\n ````\r\n\r\nOutput\r\n Our cupcakes are organic, ==gluten-free==, and made using only the most expensive ingredients.\r\n\r\nTo highlight text, enclose it within two or more equal signs.\r\n\r\nLike most inline writing conventions, highlighting can be nested within itself.\r\n\r\nMarkup\r\n ````\r\n Our cupcakes are ==organic, ==gluten-free==, vegan==, and made using only the most expensive ingredients.\r\n ````\r\n\r\nOutput\r\n Our cupcakes are ==organic, ==gluten-free==, vegan==, and made using only the most expensive ingredients.\r\n\r\n\r\n=====\r\nLinks\r\n=====\r\n\r\nYou already know what a link is!\r\n\r\nMarkup\r\n ````\r\n The [Game Boy] (en.wikipedia.org/wiki/Game_Boy) was my first video game system.\r\n ````\r\n\r\nOutput\r\n The [Game Boy] (en.wikipedia.org/wiki/Game_Boy) was my first video game system.\r\n\r\nA link consists of two parts: content and a URL.\r\n\r\nTo produce a link, simply enclose its content in square brackets or parentheses, then enclose its URL in square brackets or parentheses.\r\n\r\nYou can use mix and match either type of bracket---they\'re totally interchangeable.\r\n\r\nMarkup\r\n ````\r\n - Buy [milk] (en.wikipedia.org/wiki/Milk)\r\n - Buy (bread) [en.wikipedia.org/wiki/Bread]\r\n - Buy [sugar] [en.wikipedia.org/wiki/Sugar]\r\n - Buy (happiness) (en.wikipedia.org/wiki/Happiness)\r\n ````\r\n\r\nOutput\r\n - Buy [milk] (en.wikipedia.org/wiki/Milk)\r\n - Buy (bread) [en.wikipedia.org/wiki/Bread]\r\n - Buy [sugar] [en.wikipedia.org/wiki/Sugar]\r\n - Buy (happiness) (en.wikipedia.org/wiki/Happiness)\r\n\r\nAs demonstrated above, you can omit a link\'s URL scheme. [^ `http://` and `https://` are examples of URL schemes.] If you do, Up uses `https://` for the URL scheme.\r\n\r\nIf you\'re a software developer using the Up library, you can specify a different default URL scheme. To learn more, see [topic: `defaultUrlScheme`].\r\n\r\nOther settings affecting links are:\r\n\r\n- [topic: `baseForUrlsStartingWithSlash`]\r\n- [topic: `baseForUrlsStartingWithHashmark`]\r\n- [topic: `renderDangerousContent`]\r\n\r\n\r\nLinks with URLs containing spaces\r\n=================================\r\n\r\nIf your link URL contains spaces, Up assumes you *aren\'t* actually trying to produce a link. So it avoids producing one!\r\n\r\nMarkup\r\n ````\r\n Warlocked is the best game for GameBoy [sic] (other than Pokémon).\r\n ````\r\n\r\nOutput\r\n Warlocked is the best game for GameBoy [sic] (other than Pokémon).\r\n\r\nIf your link URL really does contain spaces, you can make it clear that you intend to produce a link by omitting the space between your link\'s content and its URL.\r\n\r\nMarkup\r\n ````\r\n I love the [music](duckduckgo.com/?q=chrono cross music) for Chrono Cross.\r\n ````\r\n\r\nOutput\r\n I love the [music](duckduckgo.com/?q=chrono cross music) for Chrono Cross.\r\n\r\nWhen you omit the space between your link\'s content and its URL, Up always produces a link.\r\n\r\nThese rules also apply when [topic: linkifying].\r\n\r\n\r\nBare URLs\r\n=========\r\n\r\nAlternatively, if you include a bare URL in your document, Up will automatically produce a link for you.\r\n\r\nMarkup\r\n ````\r\n https://en.wikipedia.org/wiki/John_Carmack\r\n ````\r\n\r\nOutput\r\n https://en.wikipedia.org/wiki/John_Carmack\r\n\r\n\r\n=============\r\nInline quotes\r\n=============\r\n\r\nUp automatically recognizes quoted text.\r\n\r\nIf you want to quote more a few sentences, considering using [topic: blockquotes].\r\n\r\nMarkup\r\n ````\r\n "Only eat the green grapes," John said.\r\n ````\r\n\r\nOutput\r\n "Only eat the green grapes," John said.\r\n\r\nYou already know how to use quotation marks! Just keep doing what you\'re doing.\r\n\r\nLike most inline writing conventions, inline quotes can be nested within themselves.\r\n\r\nMarkup\r\n ````\r\n Bob replied, "Yesterday, Harvey yelled "I\'ll take the case!", but I doubt he will."\r\n ````\r\n\r\nOutput\r\n Bob replied, "Yesterday, Harvey yelled "I\'ll take the case!", but I doubt he will."\r\n\r\n\r\n==================\r\nParenthetical text\r\n==================\r\n\r\nUp automatically recognizes parenthetical text.\r\n\r\nMarkup\r\n ````\r\n When I was ten years old, I left my home (in Pallet Town) to search for Pokémon.\r\n ````\r\n\r\nOutput\r\n When I was ten years old, I left my home (in Pallet Town) to search for Pokémon.\r\n\r\nUp understands that text enclosed within parentheses or square brackets represents supplemental content.\r\n\r\n\r\n==================\r\nExample user input\r\n==================\r\n\r\nUse the example user input convention to represent user input, including:\r\n\r\n- Keys the user should press\r\n- Buttons the user should click\r\n- Menu items the user should access\r\n\r\nMarkup\r\n ````\r\n Press {esc} to quit.\r\n ````\r\n\r\nOutput\r\n Press {esc} to quit.\r\n\r\nTo indicate that text represents user input, enclose the text within curly brackets.\r\n\r\nUp ignores any spaces separating the curly brackets from the content they enclose.\r\n\r\nMarkup\r\n ````\r\n Press { Start Game } when you are ready.\r\n ````\r\nOutput\r\n Press { Start Game } when you are ready.\r\n\r\nWithin example user input, most writing conventions are ignored. However, [topic: typographical writing conventions] are supported.\r\n\r\n\r\n===========\r\nInline code\r\n===========\r\n\r\nUse the inline code convention to represent a small fragment of computer code.\r\n\r\nWhen you need to represent more than a small fragment of computer code, use [topic: code blocks] instead.\r\n\r\nMarkup\r\n ````\r\n In HTML, you probably shouldn\'t use the `` element.\r\n ````\r\n\r\nOutput\r\n In HTML, you probably shouldn\'t use the `` element.\r\n\r\nTo produce inline code, enclose text within an equal number of backticks on either side. You can use any number of backticks---simply make sure both sides match.\r\n\r\nMarkup\r\n ````\r\n In HTML, you probably shouldn\'t use the ```` element.\r\n ````\r\n\r\nOutput\r\n In HTML, you probably shouldn\'t use the ```` element.\r\n\r\nWithin inline code, other writing conventions are ignored. Characters that normally have special meaning are preserved as plain text.\r\n\r\nMarkup\r\n ````\r\n In Up, surround text with `*asterisks*` to emphasize it.\r\n ````\r\n\r\nOutput\r\n In Up, surround text with `*asterisks*` to emphasize it.\r\n\r\n\r\nIncluding backticks in your code\r\n================================\r\n\r\nTo include backticks within inline code, you can precede each backtick with a backslash.\r\n\r\nMarkup\r\n ````\r\n `let output = \\`score:\\` + 5`\r\n ````\r\n\r\nOutput\r\n `let output = \\`score:\\` + 5`\r\n\r\nFor more information about the behavior of backslashes, see [topic: disabling].\r\n\r\nAlternatively, inline code can contain streaks of backticks that aren\'t exactly as long as the inline code\'s outer delimiters. No backslashes are necessary.\r\n\r\nIn this example, the delimiters are **1** backtick long, so the inline code can contain streaks of **2** backticks:\r\n\r\nMarkup\r\n ````\r\n `let output = ``score:`` + 5`\r\n ````\r\n\r\nOutput\r\n `let output = ``score:`` + 5`\r\n\r\nIn this example, the delimiters are **2** backticks long, so the inline code can contain "streaks" of **1** backtick:\r\n\r\nMarkup\r\n ````\r\n ``let output = `score:` + 5``\r\n ````\r\n\r\nOutput\r\n ``let output = `score:` + 5``\r\n\r\n--------------------------------------\r\nCode starting or ending with backticks\r\n--------------------------------------\r\n\r\nIf your inline code starts or ends with backticks, place a single space between the offending backticks and the outer delimiter. This single space is trimmed away.\r\n\r\nIn this example, the inline code both starts and ends with a backtick:\r\n\r\nMarkup\r\n ````\r\n `` `inline_code` ``\r\n ````\r\n\r\nOutput\r\n `` `inline_code` ``\r\n\r\nAny spaces beyond that single space are preserved---if there are multiple spaces between the delimiter and the starting/ending backticks, only one space is trimmed away.\r\n\r\nMarkup\r\n ````\r\n `` `inline_code` ``\r\n ````\r\n\r\nOutput\r\n `` `inline_code` ``\r\n\r\nFurthermore, that single space is only trimmed away when it\'s necessary to separate a delimiter from backticks in your inline code. If a given "side" of inline code has any non-space characters between the delimiter and the outermost backtick, no spaces are trimmed from that side.\r\n\r\nMarkup\r\n ````\r\n `` (`inline_code`) ``\r\n ````\r\n\r\nOutput\r\n `` (`inline_code`) ``\r\n\r\n\r\n========\r\nHeadings\r\n========\r\n\r\nUse headings to introduce a new section in the document.\r\n\r\nMarkup\r\n ````\r\n Example heading\r\n ===============\r\n ````\r\n\r\nOutput\r\n Example heading\r\n ===============\r\n\r\nIf text is underlined, it\'s treated as a heading. The underline can consist of any combination of the following characters (you can mix and match):\r\n\r\n- Hyphens: `-`\r\n- Number signs: `#`\r\n- Equal signs: `=`\r\n- Plus signs: `+`\r\n- Tildes: `~`\r\n- Colons: `:`\r\n- Asterisks: `*`\r\n- At signs: `@`\r\n\r\nA heading\'s underline must be at least three characters long, but it does *not* need to be the same length as the text of the heading.\r\n\r\nMarkup\r\n ````\r\n Example heading with a short underline\r\n ===\r\n ````\r\n\r\nOutput\r\n Example heading with a short underline\r\n ===\r\n\r\n\r\nHeading levels\r\n==============\r\n\r\nThe first heading in a document is always a top-level heading. All subsequent headings with underlines consisting of the same characters are considered top-level.\r\n\r\nThe first heading with a different combination of underline characters is considered a second-level heading. Unsurprisingly, all subsequent headings with underlines consisting of the same characters are also considered second-level.\r\n\r\nThis process continues _ad infinitum_. Every new combination of heading underline characters introduces a new heading level. There is no limit to the number of heading levels in a document.\r\n\r\n\r\nHeadings with "overlines"\r\n=========================\r\n\r\nA heading can have an optional "overline", but its overline must consist of the same combination of characters as its underline.\r\n\r\nMarkup\r\n ````\r\n --------------------------------\r\n Example heading with an overline\r\n --------------------------------\r\n ````\r\n\r\nOutput\r\n --------------------------------\r\n Example heading with an overline\r\n --------------------------------\r\n\r\nFor the purpose of determining heading levels, a heading with an overline is always considered distinct from a heading without one, even if both headings use the same combination of underline characters.\r\n\r\nTherefore, a heading with an overline will never have the same level as a heading without an overline.\r\n\r\n\r\n=============\r\nSection links\r\n=============\r\n\r\nUse the section link convention to link to another section (heading) in your document.\r\n\r\nMarkup\r\n ````\r\n Up even supports [topic: overlapping]!\r\n ````\r\n\r\nOutput\r\n Up even supports [topic: overlapping]!\r\n\r\nTo link to a heading, choose a unique snippet of markup from that heading\'s content line. [^ Don\'t worry about the heading\'s underline or overline! Section links ignore both.] Enclose that markup snippet within square brackets or parentheses, then insert `topic:` or `section:` directly inside your opening bracket.\r\n\r\nUp automatically matches your snippet to the most appropriate heading, then produces a link for you.\r\n\r\n\r\nMatching the most appropriate heading\r\n=====================================\r\n\r\nInitially, Up tries to match your section link to the first heading whose content line\'s markup *exactly matches* your snippet. [^ Up totally ignores the capitalization of section links\' markup snippets, so a section link and a heading can be an "exact match" without being capitalized the same way.] If there isn\'t an exact match, Up matches your section link to the first heading whose content line markup *contains* your snippet.\r\n\r\n\r\n=========\r\nFootnotes\r\n=========\r\n\r\nUse the footnote convention for asides or citations---anything you want to say without breaking the flow of a paragraph.\r\n\r\nFootnotes are automatically extracted into blocks for you.\r\n\r\nMarkup\r\n ````\r\n Warlocked [^ No relation to Warcraft!] is a real-time strategy game.\r\n ````\r\n\r\nOutput\r\n Warlocked [^ No relation to Warcraft!] is a real-time strategy game.\r\n\r\nTo produce a footnote, enclose its content within parentheses or square brackets. Then, insert a caret `^` directly after your opening bracket.\r\n\r\n\r\n=====\r\nMedia\r\n=====\r\n\r\nUp allows you to embed [topic: images], [topic: video], or [topic: audio] in your document.\r\n\r\n\r\nImages\r\n======\r\n\r\nMarkup\r\n ````\r\n [image: Super Mario Land box art] (i.imgur.com/TxlFlkX.jpg)\r\n ````\r\n\r\nOutput\r\n [image: Super Mario Land box art] (i.imgur.com/TxlFlkX.jpg)\r\n\r\nIf you want to link your image to another page, please see [topic: linkifying].\r\n\r\n\r\nVideo\r\n=====\r\n\r\nMarkup\r\n ````\r\n [video: Professor Leonard] (i.imgur.com/32fBpnh.mp4)\r\n ````\r\n\r\nOutput\r\n [video: Professor Leonard] (i.imgur.com/32fBpnh.mp4)\r\n\r\n\r\nAudio\r\n=====\r\n\r\nMarkup\r\n ````\r\n [audio: Sadness theme from Infinity for Game Boy] (a.clyp.it/ybct5hcl.mp3)\r\n ````\r\n\r\nOutput\r\n [audio: Sadness theme from Infinity for Game Boy] (a.clyp.it/ybct5hcl.mp3)\r\n\r\n\r\nSyntax\r\n======\r\n\r\nTo embed media in your document, simply enclose its description in square brackets or parentheses, then enclose its URL in square brackets or parentheses.\r\n\r\nYou can use mix and match either type of bracket---they\'re totally interchangeable.\r\n\r\n------------------\r\nMedia descriptions\r\n------------------\r\n\r\nMedia descriptions always start with `image:`, `audio:`, or `video:`, depending on the type of media you wish to include.\r\n\r\nWithin media descriptions, most writing conventions are ignored. However, [topic: typographical writing conventions] are supported.\r\n\r\n----------\r\nMedia URLs\r\n----------\r\n\r\nAs demonstrated above, you can omit the URL scheme for media URLs. If you do, Up uses `https://` for the URL scheme.\r\n\r\nIf you\'re a software developer using the Up library, you can specify a different default URL scheme. To learn more, see [topic: `defaultUrlScheme`].\r\n\r\nOther settings affecting media are:\r\n\r\n- [topic: `baseForUrlsStartingWithSlash`]\r\n- [topic: `baseForUrlsStartingWithHashmark`]\r\n- [topic: `renderDangerousContent`]\r\n\r\n\r\n==================\r\nRevealable content\r\n==================\r\n\r\nBoth [topic: inline revealables] and [topic: revealable blocks] recognize any of the following keywords:\r\n\r\n- `spoiler`\r\n- `nsfw`\r\n- `nsfl`\r\n- `revealable`\r\n\r\nLike all keywords in Up, you can capitalize them however you want.\r\n\r\n\r\nInline revealables\r\n==================\r\n\r\nUse the inline revealable convention to hide content within a paragraph.\r\n\r\nWhen you want to hide more than a sentence or two, use [topic: revealable blocks] instead.\r\n\r\nMarkup\r\n ````\r\n At the end of Pokémon Red, [SPOILER: you battle your rival] before the credits roll.\r\n ````\r\n\r\nOutput\r\n At the end of Pokémon Red, [SPOILER: you battle your rival] before the credits roll.\r\n\r\nTo hide content within a paragraph, first enclose that content within square brackets or parentheses.\r\n\r\nThen, directly inside your opening bracket, insert one of the revealable keywords followed by a colon: `spoiler:`, `nsfw:`, `nsfl:`, or `revealable:`.\r\n\r\nInline revealables can contain any inline writing convention.\r\n\r\n\r\nRevealable blocks\r\n==================\r\n\r\nUse revealable block convention to hide a block of content.\r\n\r\nWhen you want to hide content within a paragraph, use [topic: inline revealables] instead.\r\n\r\nMarkup\r\n ````\r\n SPOILER:\r\n After defeating the Elite Four at the end of Pokémon Red, you still have to battle your rival one last time.\r\n\r\n Your rival\'s specific lineup depends on the Pokémon you selected at the beginning of the game. However, his first three Pokémon are always the same:\r\n\r\n 1. Pidgeot\r\n 2. Alakazam\r\n 3. Rhydon\r\n ````\r\n\r\nOutput\r\n SPOILER:\r\n After defeating the Elite Four at the end of Pokémon Red, you still have to battle your rival one last time.\r\n\r\n Your rival\'s specific lineup depends on the Pokémon you selected at the beginning of the game. However, his first three Pokémon are always the same:\r\n\r\n 1. Pidgeot\r\n 2. Alakazam\r\n 3. Rhydon\r\n\r\nTo hide a block of content, first indent it two spaces (or a tab).\r\n\r\nThen, on the line *before* your indented block, put one of the revealable keywords: `spoiler`, `nsfw`, `nsfl`, or `revealable`.\r\n\r\nIn the example above, the chosen revealable keyword (`spoiler`) is followed by a colon. The colon is optional.\r\n\r\n\r\n===========\r\nBlockquotes\r\n===========\r\n\r\nUse the blockquote convention to quote a large section of text.\r\n\r\nFor typical dialog, you should probably use [topic: inline quotes] instead.\r\n\r\nMarkup\r\n ````\r\n > I hate oranges for the following reasons:\r\n >\r\n > 1. They\'re not apples.\r\n > 2. They\'re not bananas.\r\n ````\r\n\r\nOutput\r\n > I hate oranges for the following reasons:\r\n >\r\n > 1. They\'re not apples.\r\n > 2. They\'re not bananas.\r\n\r\nA blockquote consists of consecutive lines starting with `> ` (a greater-than symbol followed by a space).\r\n\r\nBlockquotes can contain any outline writing convention, including other blockquotes.\r\n\r\nMarkup\r\n ````\r\n > Thank you for replying to my blog!\r\n >\r\n > > I hate oranges for the following reasons:\r\n > >\r\n > > 1. They\'re not apples.\r\n > > 2. They\'re not bananas.\r\n >\r\n > I completely understand.\r\n ````\r\n\r\nOutput\r\n > Thank you for replying to my blog!\r\n >\r\n > > I hate oranges for the following reasons:\r\n > >\r\n > > 1. They\'re not apples.\r\n > > 2. They\'re not bananas.\r\n >\r\n > I completely understand.\r\n\r\n\r\n===============\r\nThematic breaks\r\n===============\r\n\r\nUse the thematic break convention to represent a change of subject.\r\n\r\nA thematic break can be represented by 3 or more consecutive blank lines.\r\n\r\nMarkup\r\n ````\r\n I vowed never to eat apples again.\r\n\r\n\r\n\r\n By mid-March, a second flock of birds had moved into my dining room.\r\n ````\r\n\r\nOutput\r\n I vowed never to eat apples again.\r\n\r\n\r\n\r\n By mid-March, a second flock of birds had moved into my dining room.\r\n\r\nA thematic break can *also* be represented by a line consisting of 3 or more of the following characters:\r\n\r\n- Hyphens: `-`\r\n- Number signs: `#`\r\n- Equal signs: `=`\r\n- Plus signs: `+`\r\n- Tildes: `~`\r\n- Colons: `:`\r\n- Asterisks: `*`\r\n- At signs: `@`\r\n\r\nYou can use any combination of those characters!\r\n\r\nMarkup\r\n ````\r\n I vowed never to eat apples again.\r\n\r\n #=*=*=*=*=*=*=*=*=*=#\r\n\r\n By mid-March, a second flock of birds had moved into my dining room.\r\n ````\r\n\r\nOutput\r\n I vowed never to eat apples again.\r\n\r\n #=*=*=*=*=*=*=*=*=*=#\r\n\r\n By mid-March, a second flock of birds had moved into my dining room.\r\n\r\n\r\n==============\r\nBulleted lists\r\n==============\r\n\r\nYou already know what a bulleted list is!\r\n\r\nMarkup\r\n ````\r\n - Buy milk\r\n - Buy bread\r\n - Buy happiness\r\n ````\r\n\r\nOutput\r\n - Buy milk\r\n - Buy bread\r\n - Buy happiness\r\n\r\n\r\nBullets\r\n=======\r\n\r\nIn a bulleted list, each item starts with a bullet character followed by a space. The following characters can serve as a bullet:\r\n\r\n- A hyphen: `-`\r\n- An asterisk: `*`\r\n- An actual bullet character: `•`\r\n\r\n\r\nSpacing between list items\r\n==========================\r\n\r\nEach bulleted list item can be followed by a single blank line.\r\n\r\nMarkup\r\n ````\r\n - Buy milk\r\n\r\n - Buy bread\r\n\r\n - Buy happiness\r\n ````\r\n\r\nOutput\r\n - Buy milk\r\n\r\n - Buy bread\r\n\r\n - Buy happiness\r\n\r\nOn the other hand, if a list item is followed by 2 blank lines, it marks the end of the list.\r\n\r\nMarkup\r\n ````\r\n - Buy milk\r\n - Buy bread\r\n\r\n\r\n - Fix squeaky cabinet\r\n - Fix self-esteem\r\n ````\r\n\r\nOutput\r\n - Buy milk\r\n - Buy bread\r\n\r\n\r\n - Fix squeaky cabinet\r\n - Fix self-esteem\r\n\r\n\r\nList items consisting of multiple lines\r\n=======================================\r\n\r\nList items aren\'t limited to a single line! Bulleted lists can contain any outline writing convention, including other bulleted lists.\r\n\r\nIf your list item contains more than one line, subsequent lines should be indented 2 spaces (or a tab).\r\n\r\nMarkup\r\n ````\r\n - Buy milk.\r\n\r\n If whole milk is on sale, buy that. Otherwise, buy 2%.\r\n\r\n - Buy bread.\r\n\r\n Only buy bread from one of the following brands:\r\n\r\n * Little Northern Bakehouse\r\n * Udi\'s\r\n * Canyon Bakehouse\r\n\r\n - Buy happiness.\r\n\r\n Don\'t spend more than a few cents on this.\r\n ````\r\n\r\nOutput\r\n - Buy milk.\r\n\r\n If whole milk is on sale, buy that. Otherwise, buy 2%.\r\n\r\n - Buy bread.\r\n\r\n Only buy bread from one of the following brands:\r\n\r\n * Little Northern Bakehouse\r\n * Udi\'s\r\n * Canyon Bakehouse\r\n\r\n - Buy happiness.\r\n\r\n Don\'t spend more than a few cents on this. Not worth it.\r\n\r\n\r\n==============\r\nNumbered lists\r\n==============\r\n\r\nYou already know what a numbered list is!\r\n\r\nMarkup\r\n ````\r\n 1. Buy milk\r\n 2. Buy bread\r\n 3. Buy happiness\r\n ````\r\n\r\nOutput\r\n 1. Buy milk\r\n 2. Buy bread\r\n 3. Buy happiness\r\n\r\nNumbered lists are nearly identical to [topic: bulleted lists]---the only difference is that numbered list items have ordinals, not bullets.\r\n\r\nThe ordinal for a numbered list item can be expressed several ways:\r\n\r\n- An integer followed by a period: `1.`\r\n- An integer followed by a closing parenthesis: `1)`\r\n- A number sign: `#`\r\n- A number sign followed by a period: `#.`\r\n- A number sign followed by a closing parenthesis: `#)`\r\n\r\nLike each bullet in a bulleted list, each ordinal in a numbered list must be followed by a space.\r\n\r\n\r\nLists starting at a specific number\r\n===================================\r\n\r\nNumbered lists don\'t have to start at `1`.\r\n\r\nMarkup\r\n ````\r\n 3) March\r\n #) April\r\n #) May\r\n ````\r\n\r\nOutput\r\n 3) March\r\n #) April\r\n #) May\r\n\r\n\r\nLists in descending order\r\n=========================\r\n\r\nUp automatically recognizes when a numbered list is in descending order.\r\n\r\nIf a numbered list has at least two items with *integer* ordinals (as opposed to number signs), and if the first integer is greater than the second, Up considers the list to be in descending order.\r\n\r\nMarkup\r\n ````\r\n 3) Buy milk\r\n 2) Buy bread\r\n #) Buy happiness\r\n ````\r\n\r\nOutput\r\n 3) Buy milk\r\n 2) Buy bread\r\n #) Buy happiness\r\n\r\n\r\nSingle-item numbered lists\r\n==========================\r\n\r\nLike bulleted lists, numbered lists can consist of a single item.\r\n\r\nMarkup\r\n ````\r\n 1) Buy milk\r\n ````\r\n\r\nOutput\r\n 1) Buy milk\r\n\r\nThere\'s a small exception to this rule: If your list item\'s ordinal is expressed as an integer followed by a period (e.g. `1.`), you must have more than one list item. This exception helps prevent "accidental" numbered lists.\r\n\r\nMarkup\r\n ````\r\n 1783. Not a good year for Great Britain.\r\n ````\r\n\r\nOutput\r\n 1783. Not a good year for Great Britain.\r\n\r\n\r\n=================\r\nDescription lists\r\n=================\r\n\r\nUse description lists represent a collection of subjects and their descriptions.\r\n\r\nYou can use description lists for:\r\n\r\n- Terms and definitions\r\n- Questions and answers\r\n- Any collection of subjects and descriptions!\r\n\r\nMarkup\r\n ````\r\n Kirby\'s Dreamland\r\n A video game about a flying marshmallow.\r\n\r\n Super Mario Land\r\n A video game about a jumping plumber.\r\n ````\r\n\r\nOutput\r\n Kirby\'s Dreamland\r\n A video game about a flying marshmallow.\r\n\r\n Super Mario Land\r\n A video game about a jumping plumber.\r\n\r\nEvery item in a description list consists of two parts:\r\n\r\n1. One or more subjects\r\n2. A single description of those subjects\r\n\r\n\r\nSubjects\r\n========\r\n\r\nSubjects can contain any inline writing convention.\r\n\r\nMarkup\r\n ````\r\n `
            `\r\n An HTML element representing numbered lists.\r\n\r\n `
              `\r\n An HTML element representing bulleted lists.\r\n ````\r\n\r\nOutput\r\n `
                `\r\n An HTML element representing numbered lists.\r\n\r\n `
                  `\r\n An HTML element representing bulleted lists.\r\n\r\nWhen there is more than one subject for a given description, they should be listed consecutively, one subject per line.\r\n\r\nMarkup\r\n ````\r\n Game Boy Light\r\n Game Boy Pocket\r\n Game Boy Color\r\n Handheld videogame systems released by Nintendo in the 1990s.\r\n ````\r\n\r\nOutput\r\n Game Boy Light\r\n Game Boy Pocket\r\n Game Boy Color\r\n Handheld videogame systems released by Nintendo in the 1990s.\r\n\r\n\r\nDescriptions\r\n============\r\n\r\nEach description follows the subjects it describes.\r\n\r\nDescriptions are indented 2 spaces (or a tab). They can contain any outline writing convention, including other description lists.\r\n\r\nMarkup\r\n ````\r\n Bulbasaur\r\n A plant Pokémon with a bulb growing from its back.\r\n\r\n Height\r\n 0.7 m\r\n Weight\r\n 6.9 kg\r\n\r\n Charmander\r\n A fire Pokémon with a flame on its tail.\r\n\r\n Height\r\n 0.6 m\r\n Weight\r\n 8.5 kg\r\n\r\nOutput\r\n Bulbasaur\r\n A plant Pokémon with a bulb growing from its back.\r\n\r\n Height\r\n 0.7 m\r\n Weight\r\n 6.9 kg\r\n\r\n Charmander\r\n A fire Pokémon with a flame on its tail.\r\n\r\n Height\r\n 0.6 m\r\n Weight\r\n 8.5 kg\r\n\r\nEach description may be followed by an optional blank line. If a description is followed by two blank lines, it marks the end of the description list.\r\n\r\nMarkup\r\n ````\r\n Lime\r\n A green fruit.\r\n Strawberry\r\n A red fruit.\r\n\r\n\r\n Bulbasaur\r\n A green Pokémon.\r\n Charmander\r\n A red Pokémon.\r\n ````\r\n\r\nOutput\r\n Lime\r\n A green fruit.\r\n Strawberry\r\n A red fruit.\r\n\r\n\r\n Bulbasaur\r\n A green Pokémon.\r\n Charmander\r\n A red Pokémon.\r\n\r\n\r\n======\r\nTables\r\n======\r\n\r\nYou already know what a table is! Use tables to display rows of data organized into columns.\r\n\r\nMarkup\r\n ````\r\n Table: Moves learned by the Pokémon Bulbasaur\r\n\r\n Move; Type; Power; Accuracy\r\n\r\n Tackle; Normal; 50; 100%\r\n Growl; Normal; ; 100%\r\n Leech Seed; Grass; ; 90%\r\n Vine Whip; Grass; 45; 100%\r\n ````\r\n\r\nOutput\r\n Table: Moves learned by the Pokémon Bulbasaur\r\n\r\n Move; Type; Power; Accuracy\r\n\r\n Tackle; Normal; 50; 100%\r\n Growl; Normal; ; 100%\r\n Leech Seed; Grass; ; 90%\r\n Vine Whip; Grass; 45; 100%\r\n\r\nA table consists of:\r\n\r\n- An optional caption, representing the table\'s title\r\n- A header row, describing each column\r\n- Content rows, representing the actual data\r\n- An optional header column, describing each row\r\n\r\nTable cells are separated by semicolons. To learn more, see [topic: cells].\r\n\r\nOur examples use extra spaces to align cells. This makes our markup more readable, but it\'s strictly optional! If you want, you can squish your cells together, as long as any empty cells contain at least one space. To learn more, please see [topic: empty cells].\r\n\r\nSquished markup\r\n ````\r\n Table: My favorite fruits\r\n\r\n Fruit;Color;Taste\r\n\r\n Lime;Green;Sour\r\n Lemon;Yellow;Sour\r\n Banana;Yellow;Sweet\r\n ````\r\n\r\nOutput\r\n Table: My favorite fruits\r\n\r\n Fruit;Color;Taste\r\n\r\n Lime;Green;Sour\r\n Lemon;Yellow;Sour\r\n Banana;Yellow;Sweet\r\n\r\n\r\nThe caption\r\n===========\r\n\r\nThe text after `Table:` is treated as the table\'s caption. Captions can contain any inline writing convention.\r\n\r\nMarkup\r\n ````\r\n Table: My favorite [fruits] (en.wikipedia.org/wiki/Fruit)\r\n\r\n Fruit; Color; Taste\r\n\r\n Lime; Green; Sour\r\n Lemon; Yellow; Sour\r\n Banana; Yellow; Sweet\r\n ````\r\n\r\nOutput\r\n Table: My favorite [fruits] (en.wikipedia.org/wiki/Fruit)\r\n\r\n Fruit; Color; Taste\r\n\r\n Lime; Green; Sour\r\n Lemon; Yellow; Sour\r\n Banana; Yellow; Sweet\r\n\r\nCaptions are strongly encouraged, but they\'re not required. To create a table without a caption, simply put "Table" on its own line.\r\n\r\nMarkup\r\n ````\r\n Table\r\n\r\n Fruit; Color; Taste\r\n\r\n Lime; Green; Sour\r\n Lemon; Yellow; Sour\r\n Banana; Yellow; Sweet\r\n ````\r\n\r\nOutput\r\n Table\r\n\r\n Fruit; Color; Taste\r\n\r\n Lime; Green; Sour\r\n Lemon; Yellow; Sour\r\n Banana; Yellow; Sweet\r\n\r\n\r\nCells\r\n=====\r\n\r\nTable cells are separated by semicolons. If you want to include a semicolon in a cell, simply put a backslash before it. To learn more, see [topic: disabling special characters].\r\n\r\nMarkup\r\n ````\r\n Table: My favorite fruits\r\n\r\n Fruit; Reason for liking\r\n\r\n Apples; Easy to eat\\; stylish\r\n Grapes; Each grape is very cheap\r\n Oranges; The color orange is nice\r\n ````\r\n\r\nOutput\r\n Table: My favorite fruits\r\n\r\n Fruit; Reason for liking\r\n\r\n Apples; Easy to eat\\; stylish\r\n Grapes; Each grape is very cheap\r\n Oranges; The color orange is nice\r\n\r\n-------------------------------\r\nCells spanning multiple columns\r\n-------------------------------\r\n\r\nIf you want a cell to span two columns, terminate that cell with two semicolons.\r\n\r\nMarkup\r\n ````\r\n Table: My favorite fruits\r\n\r\n Fruit; Color; Taste\r\n\r\n Lime; Green; Sour\r\n Orange;; Sweet and tart\r\n Banana; Yellow; Sweet\r\n ````\r\n\r\nOutput\r\n Table: My favorite fruits\r\n\r\n Fruit; Color; Taste\r\n\r\n Lime; Green; Sour\r\n Orange;; Sweet and tart\r\n Banana; Yellow; Sweet\r\n\r\nLikewise, if you want a cell to span six columns, terminate that cell with six semicolons.\r\n\r\n-----------\r\nEmpty cells\r\n-----------\r\n\r\nA cell consisting solely of spaces (one or more) is considered empty.\r\n\r\nNormally, you have to put at least one space in the cell, because consecutive semicolons indicate that you want the previous cell to span multiple columns.\r\n\r\nHowever, to indicate that the *first* cell in a row should be empty, simply start that row with a semicolon. You don\'t need to put any spaces before it.\r\n\r\nMarkup\r\n ````\r\n Table: Games in the Chrono series\r\n\r\n Release Date; Game;\r\n\r\n March 11, 1995; Chrono Trigger\r\n November 18, 1999; Chrono Cross\r\n ; Chrono Break\r\n ````\r\n\r\nOutput\r\n Table: Games in the Chrono series\r\n\r\n Release Date; Game\r\n\r\n March 11, 1995; Chrono Trigger\r\n November 18, 1999; Chrono Cross\r\n ; Chrono Break\r\n\r\nLikewise, to indicate that the *last* cell in a row should be empty, simply end that row with a semicolon. You don\'t need to add any spaces after it.\r\n\r\nMarkup\r\n ````\r\n Table: Games in the Chrono series\r\n\r\n Game; Release Date\r\n\r\n Chrono Trigger; March 11, 1995\r\n Chrono Cross; November 18, 1999\r\n Chrono Break;\r\n ````\r\n\r\nOutput\r\n Table: Games in the Chrono series\r\n\r\n Game; Release Date\r\n\r\n Chrono Trigger; March 11, 1995\r\n Chrono Cross; November 18, 1999\r\n Chrono Break;\r\n\r\n\r\nThe header row\r\n==============\r\n\r\nThe header defines each column in the table.\r\n\r\nThe single blank lines before and after the header are not required.\r\n\r\nMarkup\r\n ````\r\n Table: Moves learned by the Pokémon Bulbasaur\r\n Move; Type; Power; Accuracy\r\n Tackle; Normal; 50; 100%\r\n Growl; Normal; ; 100%\r\n Leech Seed; Grass; ; 90%\r\n Vine Whip; Grass; 45; 100%\r\n ````\r\n\r\nOutput\r\n Table: Moves learned by the Pokémon Bulbasaur\r\n Move; Type; Power; Accuracy\r\n Tackle; Normal; 50; 100%\r\n Growl; Normal; ; 100%\r\n Leech Seed; Grass; ; 90%\r\n Vine Whip; Grass; 45; 100%\r\n\r\nCells in a table\'s header can contain any inline writing convention.\r\n\r\n\r\nContent rows\r\n============\r\n\r\nThe "content rows" of a table follow its header row. The content rows contain the table\'s actual data.\r\n\r\nIf a content row is followed by a blank line, it ends the table.\r\n\r\nMarkup\r\n ````\r\n Table: Moves learned by the Pokémon Bulbasaur\r\n\r\n Move; Type; Power; Accuracy\r\n\r\n Tackle; Normal; 50; 100%\r\n Growl; Normal; ; 100%\r\n Leech Seed; Grass; ; 90%\r\n Vine Whip; Grass; 45; 100%\r\n\r\n I love Bulbasaur!\r\n\r\n ````\r\n\r\nOutput\r\n Table: Moves learned by the Pokémon Bulbasaur\r\n\r\n Move; Type; Power; Accuracy\r\n\r\n Tackle; Normal; 50; 100%\r\n Growl; Normal; ; 100%\r\n Leech Seed; Grass; ; 90%\r\n Vine Whip; Grass; 45; 100%\r\n\r\n I love Bulbasaur!\r\n\r\nContent row cells can contain any inline writing convention.\r\n\r\n\r\nIncluding a header column in your table\r\n=======================================\r\n\r\nTo indicate your table has a header column, simply indent its header *row* at least two spaces (or a tab).\r\n\r\nWhen you indent a table\'s the header row, Up automatically treats the first cell in each subsequent row as the header column.\r\n\r\nMarkup\r\n ````\r\n Table: Moves learned by the Pokémon Bulbasaur\r\n\r\n Type; Power; Accuracy\r\n\r\n Tackle; Normal; 50; 100%\r\n Growl; Normal; ; 100%\r\n Leech Seed; Grass; ; 90%\r\n Vine Whip; Grass; 45; 100%\r\n ````\r\n\r\nOutput\r\n Table: Moves learned by the Pokémon Bulbasaur\r\n\r\n Type; Power; Accuracy\r\n\r\n Tackle; Normal; 50; 100%\r\n Growl; Normal; ; 100%\r\n Leech Seed; Grass; ; 90%\r\n Vine Whip; Grass; 45; 100%\r\n\r\nWhen your table has a header column, Up automatically inserts an extra blank cell at the beginning of the header row in the top level corner, above the header column.\r\n\r\n\r\n===========\r\nCode blocks\r\n===========\r\n\r\nUse the code block convention to represent a block of computer code.\r\n\r\nWhen you need to represent only a small fragment of computer code, consider using [topic: inline code] instead.\r\n\r\nMarkup\r\n ````````\r\n ```\r\n function nthFibonacci(n: number): number {\r\n return n <= 2\r\n ? n - 1\r\n : nthFibonacci(n - 1) + nthFibonacci(n - 2)\r\n }\r\n ```\r\n ````````\r\n\r\nOutput\r\n ```\r\n function nthFibonacci(n: number): number {\r\n return n <= 2\r\n ? n - 1\r\n : nthFibonacci(n - 1) + nthFibonacci(n - 2)\r\n }\r\n ```\r\n\r\nCode blocks are surrounded (underlined and "overlined") by matching streaks of 3 or more backticks.\r\n\r\nIf there is no matching end streak, the code block extends to the end of the document (or to the end of the current outline writing convention, if the code block is nested within one).\r\n\r\nWithin a code block, indentation is preserved, and every single character is treated literally. No other writing conventions are recognized, which means code blocks don\'t support [topic: disabling].\r\n\r\n\r\nIncluding streaks of backticks\r\n==============================\r\n\r\nCode blocks can contain streaks of backticks that aren\'t exactly as long as the enclosing streaks.\r\n\r\nMarkup\r\n `````````\r\n ``````\r\n A code block:\r\n\r\n ```\r\n function factorial(n: number): number {\r\n return n <= 1\r\n ? 1\r\n : n * factorial(n - 1)\r\n }\r\n ```\r\n\r\n See? Not so hard!\r\n ``````\r\n `````````\r\n\r\nOutput\r\n ``````\r\n A code block:\r\n\r\n ```\r\n function factorial(n: number): number {\r\n return n <= 1\r\n ? 1\r\n : n * factorial(n - 1)\r\n }\r\n ```\r\n\r\n See? Not so hard!\r\n ``````\r\n\r\n\r\n=====================================\r\nLinkifying another writing convention\r\n=====================================\r\n\r\nYou can put [topic: images] inside of [topic: links], but the syntax can be a bit messy.\r\n\r\nMessy markup\r\n ````\r\n [(image: Warlocked box art) (i.imgur.com/879AeYU.jpg)] [en.wikipedia.org/wiki/Warlocked]\r\n ````\r\n\r\nOutput\r\n [(image: Warlocked box art) (i.imgur.com/879AeYU.jpg)] [en.wikipedia.org/wiki/Warlocked]\r\n\r\nThat\'s a lot of brackets! Luckily, there\'s a shortcut.\r\n\r\nSimply place the "linkifying" URL after the image\'s own URL, and Up will produce a link for you.\r\n\r\nCleaner markup\r\n ````\r\n [image: Warlocked box art] [i.imgur.com/879AeYU.jpg] (en.wikipedia.org/wiki/Warlocked)\r\n ````\r\n\r\nOutput\r\n [image: Warlocked box art] [i.imgur.com/879AeYU.jpg] (en.wikipedia.org/wiki/Warlocked)\r\n\r\nWhen linkifying an image, you can mix and match square brackets and parentheses---they\'re totally interchangeable.\r\n\r\nThis shortcut also works for the following inline writing conventions:\r\n\r\n[topic: Example user input]\r\n Markup\r\n ````\r\n Press {space} (en.wikipedia.org/wiki/Space_bar) to continue.\r\n ````\r\n\r\n Output\r\n Press {space} (en.wikipedia.org/wiki/Space_bar) to continue.\r\n\r\n[topic: Footnotes]\r\n Markup\r\n ````\r\n Pokémon is old [^ Released in 1996!] (en.wikipedia.org/wiki/Pokémon_Red_and_Blue) but it maintains its charm.\r\n ````\r\n\r\n Output\r\n Pokémon is old [^ Released in 1996!] (en.wikipedia.org/wiki/Pokémon_Red_and_Blue) but it maintains its charm.\r\n\r\n[topic: Inline revealables]\r\n Markup\r\n ````\r\n At the end of Pokémon Red, [SPOILER: you battle your rival] (pokemon.wikia.com/wiki/Rival) before the credits roll.\r\n ````\r\n\r\n Output\r\n At the end of Pokémon Red, [SPOILER: you battle your rival] (pokemon.wikia.com/wiki/Rival) before the credits roll.\r\n\r\n\r\n=================================\r\nTypographical writing conventions\r\n=================================\r\n\r\nEllipsis\r\n========\r\n\r\nConsecutive periods represent an ellipsis, so Up replaces them with a fancy ellipsis character.\r\n\r\nMarkup\r\n ````\r\n I don\'t know... I doubt a spider would do this.\r\n ````\r\n\r\nOutput\r\n I don\'t know... I doubt a spider would do this.\r\n\r\nIf you\'re a software developer using the Up library, you can specify a different fancy ellipsis (e.g. `⋯`). To learn more, see [topic: `fancyEllipsis`].\r\n\r\n\r\nEn dash\r\n=======\r\n\r\nTwo consecutive hyphens produce an en dash.\r\n\r\nMarkup\r\n ````\r\n I agree -- to an extent -- with your plan to eat nothing but cereal.\r\n ````\r\n\r\nOutput\r\n I agree -- to an extent -- with your plan to eat nothing but cereal.\r\n\r\n\r\nEm dash\r\n=======\r\n\r\nThree consecutive hyphens produce an em dash.\r\n\r\nMarkup\r\n ````\r\n Use a spoon---a fork won\'t cut it.\r\n ````\r\n\r\nOutput\r\n Use a spoon---a fork won\'t cut it.\r\n\r\n\r\nPlus-minus sign\r\n===============\r\n\r\nA plus sigh followed by a hyphen produces a plus-minus sign.\r\n\r\nMarkup\r\n ````\r\n I ate 5 waffles +- 2.\r\n ````\r\n\r\nOutput\r\n I ate 5 waffles +- 2.\r\n\r\n\r\n==============================\r\nExcessive delimiter characters\r\n==============================\r\n\r\nFor [topic: emphasis], [topic: stress], [topic: italic], [topic: bold], [topic: highlighting], and [topic: inline quotes], Up ignores any excessive delimiter characters.\r\n\r\nMarkup\r\n ````\r\n This organic, ====gluten-free==== cupcake is too expensive.\r\n ````\r\n\r\nOutput\r\n This organic, ====gluten-free==== cupcake is too expensive.\r\n\r\nThis includes when delimiter characters aren\'t perfectly balanced on either side.\r\n\r\nMarkup\r\n ````\r\n My favorite video game is _Chrono Cross__.\r\n ````\r\n\r\nOutput\r\n My favorite video game is _Chrono Cross__.\r\n\r\n\r\n============================\r\nDisabling special characters\r\n============================\r\n\r\nTo disable the special meaning of a character, put a backslash before it.\r\n\r\nMarkup\r\n ````\r\n I love \\*asterisks*!\r\n ````\r\n\r\nOutput\r\n I love \\*asterisks\\*!\r\n\r\nLikewise, to disable the special meaning of a backslash, put another backslash before it.\r\n\r\nMarkup\r\n ````\r\n My favorite kind of slash is the backslash: \\\\. What is yours?\r\n ````\r\n\r\nOutput\r\n My favorite kind of slash is the backslash: \\\\. What is yours?\r\n\r\n\r\n===============================\r\nOverlapping writing conventions\r\n===============================\r\n\r\nIn Up, inline writing conventions can freely overlap.\r\n\r\nMarkup\r\n ````\r\n John **enjoys ==sleeping** late== whenever he can.\r\n ````\r\n\r\nOutput\r\n John **enjoys ==sleeping** late== whenever he can.\r\n\r\n\r\nSuperficial overlapping\r\n=======================\r\n\r\nIf conventions overlap superficially---by only their start or end delimiters---Up pretends they weren\'t overlapped at all.\r\n\r\nMarkup\r\n ````\r\n At the end of Pokémon Red, [SPOILER: you battle your rival *yet again]* before the credits roll.\r\n ````\r\n\r\nOutput\r\n At the end of Pokémon Red, [SPOILER: you battle your rival *yet again]* before the credits roll.\r\n\r\n\r\n\r\n####################\r\nUsing the Up library\r\n####################\r\n\r\nThe Up library can be [found on NPM] (npmjs.com/package/up-lang).\r\n\r\n\r\n============\r\nInstallation\r\n============\r\n\r\n````\r\nnpm install up-lang --save\r\n````\r\n\r\n\r\n==============\r\nUsage Overview\r\n==============\r\n\r\nTypically, you\'ll want to use one of the various [topic: functions] exported by the library.\r\n\r\n````\r\nconst { parseAndRender } = require("up-lang")\r\n\r\nconst html = parseAndRender(markup, optionalSettings)\r\n````\r\n\r\nAlternatively, you can use the exported `Up` class, which can be helpful if you need to parse or render several documents sharing custom settings. Please see [topic: `Up`] to learn more.\r\n\r\nIf you plan to modify or analyze a parsed document, you\'ll want to check out the [topic: abstract syntax tree classes].\r\n\r\n\r\n=========\r\nFunctions\r\n=========\r\n\r\n`parseAndRender` (function)\r\n===========================\r\n\r\nThis function converts Up markup into HTML and returns the result.\r\n\r\nArguments\r\n `markup`: `string`\r\n The Up markup to convert into HTML.\r\n `settings` (optional): [topic: `Settings`]\r\n The custom parsing and/or rendering settings to apply.\r\n\r\nReturn type: `string`\r\n This function returns HTML representing the rendered document.\r\n\r\nUsage\r\n Without custom settings\r\n ````\r\n const html = parseAndRender(markup)\r\n ````\r\n\r\n With custom settings\r\n ````\r\n const html = parseAndRender(markup, {\r\n parsing: {\r\n createSourceMap: true,\r\n keywords: { audio: "listen" }\r\n },\r\n rendering: {\r\n idPrefix: "article"\r\n }\r\n })\r\n ````\r\n\r\n\r\n`parseAndRenderWithTableOfContents` (function)\r\n==============================================\r\n\r\nThis function converts Up markup into two pieces of HTML, both of which are returned:\r\n\r\n1. A table of contents\r\n2. The document itself\r\n\r\nArguments\r\n `markup`: `string`\r\n The Up markup to parse and render.\r\n\r\n `settings` (optional): [topic: `Settings`]\r\n The custom parsing and/or rendering settings to apply.\r\n\r\nReturn type: [topic: `DocumentAndTableOfContentsHtml`]\r\n This function returns HTML representing the rendered document and table of contents.\r\n\r\nUsage\r\n Without custom settings\r\n ````\r\n const { tableOfContentsHtml, documentHtml } =\r\n parseAndRenderWithTableOfContents(markup)\r\n ````\r\n\r\n With custom settings\r\n ````\r\n const { tableOfContentsHtml, documentHtml } =\r\n parseAndRenderWithTableOfContents(markup, {\r\n parsing: {\r\n createSourceMap: true,\r\n keywords: { audio: "listen" }\r\n },\r\n rendering: {\r\n idPrefix: "article",\r\n terms: { reveal: "expand" }\r\n }\r\n })\r\n ````\r\n\r\n\r\n--------------------------------------------\r\n`DocumentAndTableOfContentsHtml` (interface)\r\n--------------------------------------------\r\n\r\nThis interface represents the HTML for a rendered document and its table of contents.\r\n\r\nMembers\r\n `tableOfContentsHtml`: `string`\r\n The HTML for the table of contents.\r\n\r\n `documentHtml`: `string`\r\n The HTML for the document itself.\r\n\r\nNotes\r\n The following functions return an object satisfying this interface:\r\n\r\n - [topic: `parseAndRenderWithTableOfContents`]\r\n - [topic: `renderWithTableOfContents`]\r\n\r\n\r\n`parseAndRenderInline` (function)\r\n=================================\r\n\r\nThis function converts inline Up markup into inline HTML and returns the result.\r\n\r\nTo learn more about inline documents, see [topic: inline documents].\r\n\r\nArguments\r\n `inlineMarkup`: `string`\r\n The inline Up markup to convert into inline HTML.\r\n\r\n `parsingSettings` (optional): [topic: `Settings`]\r\n The custom parsing and/or rendering settings to apply.\r\n\r\nReturn type: `string`\r\n This function returns HTML representing the rendered inline document.\r\n\r\nUsage\r\n Without custom settings\r\n ````\r\n const html = parseAndRenderInline(markup)\r\n ````\r\n\r\n With custom settings\r\n ````\r\n const html = parseAndRenderInline(markup, {\r\n parsing: {\r\n baseForUrlsStartingWithSlash: "https://example.com/en-us",\r\n keywords: { audio: "listen" }\r\n },\r\n rendering: {\r\n idPrefix: "byline",\r\n terms: {\r\n footnoteReference: "footnote mention",\r\n reveal: "show"\r\n }\r\n }\r\n })\r\n ````\r\n\r\n\r\n`parse` (function)\r\n==================\r\n\r\nThis function parses Up markup and returns the resulting syntax tree.\r\n\r\nArguments\r\n `markup`: `string`\r\n The Up markup to parse.\r\n\r\n `parsingSettings` (optional): [topic: `Settings.Parsing`]\r\n The custom parsing settings to apply.\r\n\r\nReturn type: [topic: `Document`]\r\n This function returns a syntax tree representing the parsed document.\r\n\r\nUsage\r\n Without custom settings\r\n ````\r\n const html = parse(markup)\r\n ````\r\n\r\n With custom settings\r\n ````\r\n const document = parse(markup, {\r\n createSourceMap: true,\r\n keywords: { audio: "listen" }\r\n })\r\n ````\r\n\r\n\r\n`parseInline` (function)\r\n========================\r\n\r\nThis function parses inline Up markup and returns the resulting inline syntax tree.\r\n\r\nTo learn more about inline documents, see [topic: inline documents].\r\n\r\nArguments\r\n `inlineMarkup`: `string`\r\n The inline Up markup to parse.\r\n\r\n `parsingSettings` (optional): [topic: `Settings.Parsing`]\r\n The custom parsing settings to apply.\r\n\r\nReturn type: [topic: `InlineDocument`]\r\n This function returns an inline syntax tree representing the parsed document.\r\n\r\nUsage\r\n Without custom settings\r\n ````\r\n const html = parseInline(markup)\r\n ````\r\n\r\n With custom settings\r\n ````\r\n const html = parseInline(markup, {\r\n baseForUrlsStartingWithSlash: "https://example.com/en-us",\r\n keywords: { audio: "listen" }\r\n })\r\n ````\r\n\r\n\r\n`render` (function)\r\n===================\r\n\r\nThis function converts a syntax tree into HTML and returns the result.\r\n\r\nArguments\r\n `document`: [topic: `Document`]\r\n The syntax tree to convert into HTML.\r\n\r\n `renderingSettings` (optional): [topic: `Settings.Rendering`]\r\n The custom rendering settings to apply.\r\n\r\nReturn type: `string`\r\n This function returns HTML representing the rendered document.\r\n\r\nUsage\r\n Without custom settings\r\n ````\r\n const html = render(document)\r\n ````\r\n\r\n With custom settings\r\n ````\r\n const html = render(document, {\r\n idPrefix: "article",\r\n terms: {\r\n footnoteReference: "footnote mention",\r\n reveal: "show"\r\n }\r\n })\r\n ````\r\n\r\n\r\n`renderWithTableOfContents` (function)\r\n======================================\r\n\r\nThis function converts a syntax tree into two pieces of HTML, both of which are returned:\r\n\r\n1. A table of contents\r\n2. The document itself\r\n\r\nArguments\r\n `document`: [topic: `Document`]\r\n The syntax tree to convert into HTML.\r\n\r\n `renderingSettings` (optional): [topic: `Settings.Rendering`]\r\n The custom rendering settings to apply.\r\n\r\nReturn type: [topic: `DocumentAndTableOfContentsHtml`]\r\n This function returns HTML representing the rendered document and table of contents.\r\n\r\nUsage\r\n Without custom settings\r\n ````\r\n const { tableOfContentsHtml, documentHtml } =\r\n renderWithTableOfContents(document)\r\n ````\r\n\r\n With custom settings\r\n ````\r\n const { tableOfContentsHtml, documentHtml } =\r\n renderWithTableOfContents(document, {\r\n idPrefix: "article",\r\n terms: { revveal: "expand" }\r\n })\r\n ````\r\n\r\n\r\n`renderInline` (function)\r\n=========================\r\n\r\nThis function converts an inline syntax tree into inline HTML and returns the result.\r\n\r\nTo learn more about inline documents, see [topic: inline documents].\r\n\r\nArguments\r\n `inlineDocument`: [topic: `InlineDocument`]\r\n The inline syntax tree to convert into HTML.\r\n\r\n `renderingSettings` (optional): [topic: `Settings.Rendering`]\r\n The custom rendering settings to apply.\r\n\r\nReturn type: `string`\r\n This function returns HTML representing the rendered inline document.\r\n\r\nUsage\r\n Without custom settings\r\n ````\r\n const html = renderInline(inlineDocument)\r\n ````\r\n\r\n With custom settings\r\n ````\r\n const html = renderInline(inlineDocument, {\r\n idPrefix: "byline",\r\n terms: {\r\n footnoteReference: "footnote mention",\r\n reveal: "show"\r\n }\r\n })\r\n ````\r\n\r\n\r\n\r\n============\r\n`Up` (class)\r\n============\r\n\r\nAnything you can accomplish using the `Up` class, you can accomplish using the regular [topic: functions] exported by the library.\r\n\r\nHowever, the `Up` class can be helpful if you need to parse or render several documents sharing custom settings.\r\n\r\nThose shared settings can be provided just once---in the constructor. Then, when calling methods on your object, you only need to provide settings that overwrite (or supplement) the ones you provided to the constructor.\r\n\r\n````\r\nconst { Up } = require("up-lang")\r\n\r\nconst up = new Up(settings)\r\nconst html = up.parseAndRender(markup, changedSettings)\r\n````\r\n\r\n\r\nConstructor arguments\r\n=====================\r\n\r\n`settings` (optional): [topic: `Settings`]\r\n The custom parsing and/or rendering settings to apply to all subsequent method calls.\r\n\r\n ```\r\n const up = new Up({\r\n parsing: {\r\n fancyEllipsis: "⋯",\r\n keywords: {\r\n audio: ["sound", "song"],\r\n revealable: "hide"\r\n }\r\n },\r\n rendering: {\r\n idPrefix: \'article\',\r\n terms: { reveal: "expand" }\r\n }\r\n })\r\n ```\r\n\r\n\r\nMethods\r\n=======\r\n\r\nThis class\'s methods have the exact same names and arguments as the library\'s [topic: functions].\r\n\r\n--------------------------------------\r\nInvoking a method with custom settings\r\n--------------------------------------\r\n\r\nWhen a method is invoked with custom settings, those settings are merged with the settings provided to the constructor. If any individual settings conflict, Up uses the conflicting values provided to the method.\r\n\r\nExample\r\n ````\r\n const up = new Up({\r\n parsing: {\r\n createSourceMap: true,\r\n fancyEllipsis: "⋯",\r\n keywords: {\r\n audio: ["sound", "song"],\r\n revealable: "hide"\r\n }\r\n },\r\n rendering: {\r\n terms: { reveal: "expand" }\r\n }\r\n })\r\n\r\n const html = up.parseAndRender(markup, {\r\n parsing: {\r\n createSourceMap: false,\r\n keywords: {\r\n audio: "listen"\r\n }\r\n },\r\n rendering: {\r\n idPrefix: "article"\r\n }\r\n })\r\n ````\r\n\r\nResult\r\n In the above example, the following settings are ultimately applied:\r\n\r\n ````\r\n {\r\n parsing: {\r\n createSourceMap: false,\r\n fancyEllipsis: "⋯",\r\n keywords: {\r\n audio: "listen",\r\n revealable: "hide"\r\n }\r\n },\r\n rendering: {\r\n idPrefix: "article",\r\n terms: { reveal: "expand" }\r\n }\r\n }\r\n ````\r\n\r\n\r\n\r\n=====================\r\nLibrary configuration\r\n=====================\r\n\r\nThe Up library works out of the box! No configuration is necessary.\r\n\r\nHowever, all [topic: functions] do accept optional custom settings. These various settings are described below.\r\n\r\n\r\n`Settings` (interface)\r\n======================\r\n\r\nThe `Settings` interface includes both parsing settings and rendering settings.\r\n\r\nUse this interface to provide custom settings to functions that both parse markup *and* render the result to HTML:\r\n\r\n- [topic: `parseAndRender`]\r\n- [topic: `parseAndRenderWithTableOfContents`]\r\n- [topic: `parseAndRenderInline`]\r\n\r\nUsage\r\n ````\r\n const html = parseAndRender(markup, {\r\n parsing: {\r\n createSourceMap: true,\r\n keywords: { audio: "listen" }\r\n },\r\n rendering: {\r\n idPrefix: "article"\r\n }\r\n })\r\n ````\r\n\r\nMembers (both of which are optional)\r\n `parsing`: [topic: `Settings.Parsing`]\r\n The custom parsing settings to apply.\r\n\r\n `rendering`: [topic: `Settings.Rendering`]\r\n The custom rendering settings to apply.\r\n\r\n\r\n`Settings.Parsing` (interface)\r\n==============================\r\n\r\nThe `Settings.Parsing` interface includes all parsing settings.\r\n\r\nUse this interface to provide custom settings to functions that parse markup and return the resulting syntax tree:\r\n\r\n- [topic: `parse`]\r\n- [topic: `parseInline`]\r\n\r\nAs part of [topic: `Settings`], this interface also provides parsing custom settings to functions that both parse markup *and* render the result to HTML:\r\n\r\n- [topic: `parseAndRender`]\r\n- [topic: `parseAndRenderWithTableOfContents`]\r\n- [topic: `parseAndRenderInline`]\r\n\r\nUsage\r\n ````\r\n const document = parse(markup, {\r\n createSourceMap: true,\r\n keywords: {\r\n audio: ["sound", "song"],\r\n audio: "listen"\r\n }\r\n })\r\n ````\r\n\r\nMembers (all of which are optional)\r\n [topic: `createSourceMap`]: `boolean`\r\n Enables source mapping.\r\n\r\n [topic: `defaultUrlScheme`]: `string`\r\n The default URL scheme for URLs without one.\r\n\r\n [topic: `baseForUrlsStartingWithSlash`]: `string`\r\n The base for URLs starting with `/`.\r\n\r\n [topic: `baseForUrlsStartingWithHashmark`]: `string`\r\n The base for URLs starting with `#`.\r\n\r\n [topic: `fancyEllipsis`]: `string`\r\n Up replaces consecutive periods with this fancy ellipsis.\r\n\r\n `keywords` (all of which are optional)\r\n\r\n --------------------\r\n Customizing keywords\r\n --------------------\r\n\r\n You can provide unlimited custom variations for each keyword. Custom keyword variations do not overwrite the default keywords.\r\n\r\n ````\r\n const document = parse(markup, {\r\n keywords: {\r\n audio: ["sound", "song"],\r\n audio: "listen"\r\n }\r\n })\r\n ````\r\n\r\n Like the default keywords, custom keyword variations are case-insensitive.\r\n\r\n `audio`: `string` or `string[]`\r\n Recognized by [topic: audio].\r\n\r\n `image`: `string` or `string[]`\r\n Recognized by [topic: images].\r\n\r\n `revealable`: `string` or `string[]`\r\n Recognized by [topic: inline revealables] and [topic: revealable blocks].\r\n\r\n `sectionLink`: `string` or `string[]`\r\n Recognized by [topic: section links].\r\n\r\n `table`: `string` or `string[]`\r\n Recognized by [topic: tables].\r\n\r\n `video`: `string` or `string[]`\r\n Recognized by [topic: video].\r\n\r\n\r\n---------------------------\r\n`createSourceMap` (setting)\r\n---------------------------\r\n\r\nWhen `createSourceMap` is enabled, Up keeps track of the original line number for every instance of every outline writing convention.\r\n\r\nThis setting works by setting the `sourceLineNumber` field of each [topic: `OutlineSyntaxNode`].\r\n\r\nUsage\r\n ````\r\n const html = parseAndRender(markup, {\r\n parsing: {\r\n createSourceMap: true\r\n }\r\n })\r\n ````\r\n\r\nDefault value\r\n `false`\r\n\r\nContext\r\n This setting belongs to [topic: `Settings.Parsing`].\r\n\r\n\r\n----------------------------\r\n`defaultUrlScheme` (setting)\r\n----------------------------\r\n\r\nThe `defaultUrlScheme` is prefixed to any link URL or media URL without a URL scheme.\r\n\r\nFor URLs *with* a URL scheme, this setting has no effect. Furthermore, this setting is not applied to URLs that start with `/` or `#`. For those URLs, see:\r\n\r\n- [topic: `baseForUrlsStartingWithSlash`]\r\n- [topic: `baseForUrlsStartingWithHashmark`]\r\n\r\nUsage\r\n ````\r\n const html = parseAndRender(markup, {\r\n parsing: {\r\n defaultUrlScheme: "my-app://"\r\n }\r\n })\r\n ````\r\n\r\nDefault value\r\n `"https://"`\r\n\r\nContext\r\n This setting belongs to [topic: `Settings.Parsing`].\r\n\r\n\r\n----------------------------------------\r\n`baseForUrlsStartingWithSlash` (setting)\r\n----------------------------------------\r\n\r\nThe `baseForUrlsStartingWithSlash` is prefixed to any link URL or media URL starting with `/`.\r\n\r\nUsage\r\n ````\r\n const html = parseAndRender(markup, {\r\n parsing: {\r\n baseForUrlsStartingWithSlash: "https://example.com/blog/"\r\n }\r\n })\r\n ````\r\n\r\nDefault value\r\n `""` (an empty string)\r\n\r\nContext\r\n This setting belongs to [topic: `Settings.Parsing`].\r\n\r\n\r\n-------------------------------------------\r\n`baseForUrlsStartingWithHashMark` (setting)\r\n-------------------------------------------\r\n\r\nThe `baseForUrlsStartingWithSlash` is prefixed to any link URL or media URL starting with `#`.\r\n\r\nUsage\r\n ````\r\n const html = parseAndRender(markup, {\r\n parsing: {\r\n baseForUrlsStartingWithHashMark: "https://example.com/blog/post/28"\r\n }\r\n })\r\n ````\r\n\r\nDefault value\r\n `""` (an empty string)\r\n\r\nContext\r\n This setting belongs to [topic: `Settings.Parsing`].\r\n\r\n\r\n-------------------------\r\n`fancyEllipsis` (setting)\r\n-------------------------\r\n\r\nUp automatically replaces consecutive periods with `fancyEllipsis`.\r\n\r\nBy default, `fancyEllipsis` is `…`. If you want Up to use a different fancy ellipsis (e.g. `⋯` or even `. . .`), set `fancyEllipsis` accordingly.\r\n\r\nUsage\r\n ````\r\n const html = parseAndRender(markup, {\r\n parsing: {\r\n fancyEllipsis: "⋯"\r\n }\r\n })\r\n ````\r\n\r\nDefault value\r\n `"…"`\r\n\r\nContext\r\n This setting belongs to [topic: `Settings.Parsing`].\r\n\r\n\r\n`Settings.Rendering` (interface)\r\n================================\r\n\r\nThe `Settings.Rendering` interface includes all rendering settings.\r\n\r\nUse this interface to provide custom settings to functions that render syntax trees to HTML:\r\n\r\n- [topic: `render`]\r\n- [topic: `renderWithTableOfContents`]\r\n- [topic: `renderInline`]\r\n\r\nAs part of [topic: `Settings`], this interface also provides custom rendering settings to functions that both parse markup *and* render the result to HTML:\r\n\r\n- [topic: `parseAndRender`]\r\n- [topic: `parseAndRenderWithTableOfContents`]\r\n- [topic: `parseAndRenderInline`]\r\n\r\nUsage\r\n ````\r\n const html = render(document, {\r\n idPrefix: "article",\r\n terms: {\r\n footnoteReference: "footnote mention",\r\n reveal: "show"\r\n }\r\n })\r\n ````\r\n\r\nMembers (all of which are optional)\r\n [topic: `idPrefix`]: `string`\r\n The prefix to apply to HTML IDs.\r\n\r\n [topic: `renderDangerousContent`]: `boolean`\r\n Enables the rendering of dangerous content. Enabling this setting is not recommended!\r\n\r\n `terms` (all of which are optional)\r\n `footnote`: `string`\r\n Appears in the URLs of links pointing to footnotes in their footnote blocks.\r\n\r\n `footnoteReference`: `string`\r\n Appears in the URLs of links pointing back to footnote references (i.e. back to the superscripts within paragraphs).\r\n\r\n `hide`: `string`\r\n Appears on the button that hides revealable content.\r\n\r\n `reveal`: `string`\r\n Appears on the button that reveals revealable content.\r\n\r\n `sectionReferencedByTableOfContents`: `string`\r\n Appears in the URLs of table of contents entries.\r\n\r\n You don\'t need to worry about escaping any characters in your custom terms! Up handles that for you.\r\n\r\n\r\n--------------------\r\n`idPrefix` (setting)\r\n--------------------\r\n\r\nIf you are rendering multiple documents onto the same page, you need to use this setting to prevent HTML ID collisions between documents.\r\n\r\nBy default, `idPrefix` is `up` to prevent ID collisions with any HTML elements *not* rendered by Up. If you don\'t want any ID prefix, you can set `idPrefix` to an empty string.\r\n\r\nYou don\'t need to worry about escaping HTML for your `idPrefix`---Up automatically handles that for you. Furthermore, Up automatically converts any spaces in your `idPrefix` to hyphens.\r\n\r\nUsage\r\n ````\r\n const html = parseAndRender(markup, {\r\n rendering: {\r\n idPrefix: "article"\r\n }\r\n })\r\n ````\r\n\r\nContext\r\n This setting belongs to [topic: `Settings.Rendering`].\r\n\r\nDefault value\r\n `"up"`\r\n\r\n\r\n----------------------------------\r\n`renderDangerousContent` (setting)\r\n----------------------------------\r\n\r\nNormally, Up will not render links or media elements with potentially exploitable URI schemes: `javascript`, `vbscript`, `data`, and `file`.\r\n\r\nWhen this setting is enabled, Up will dutifully render all links and media elements.\r\n\r\nUsage\r\n ````\r\n const html = parseAndRender(markup, {\r\n rendering: {\r\n renderDangerousContent: true\r\n }\r\n })\r\n ````\r\n\r\nDefault value\r\n `false`\r\n\r\nContext\r\n This setting belongs to [topic: `Settings.Rendering`].\r\n\r\n\r\n\r\n================\r\nInline documents\r\n================\r\n\r\nIn certain contexts, you might want to restrict a document to just a single line:\r\n\r\n- A chat message\r\n- The title of a thread on a message board\r\n- The byline for a user\'s profile\r\n\r\nThat\'s what inline documents are for! To take advantage of inline documents, use one of the following functions:\r\n\r\n- [topic: `parseAndRenderInline`]\r\n- [topic: `parseInline`]\r\n- [topic: `renderInline`]\r\n\r\n\r\nSyntax differences\r\n==================\r\n\r\nWithin inline documents, Up ignores all outline writing conventions. Furthermore, [topic: footnotes] and [topic: section links] aren\'t supported.\r\n\r\nWhen Up encounters a footnote in an inline document, it pretends the author had used parentheses instead of a footnote.\r\n\r\nInline markup\r\n ````\r\n My dad [^ Professor Oak] is very wise.\r\n ````\r\nOutput\r\n My dad (Professor Oak) is very wise.\r\n\r\nWithin inline documents, Up doesn\'t recognize the syntax for section links. Consequently, their markup is instead treated as regular old text enclosed within brackets.\r\n\r\nInline markup\r\n ````\r\n I enjoyed our conversation [topic: the weather].\r\n ````\r\nOutput\r\n I enjoyed our conversation [\\topic: the weather].\r\n\r\n\r\nRendered HTML\r\n=============\r\n\r\nWhen inline documents are rendered, the resulting HTML is *not* enclosed within any container element (e.g. `

                  `).\r\n\r\nInline markup\r\n ````\r\n I *really* like Starcraft.\r\n ````\r\n\r\nRendered inline HTML\r\n ````\r\n I really like Starcraft.\r\n ````\r\n\r\n\r\n\r\n============================\r\nAbstract syntax tree classes\r\n============================\r\n\r\nUnless you\'re fiddling with the abstract syntax tree of a parsed document, you can safely ignore this section.\r\n\r\nEvery class used in the abstract syntax tree is exported by the library.\r\n\r\n````\r\nconst { Blockquote } = require("up-lang")\r\n\r\nif (syntaxNode instanceof Blockquote) {\r\n // Do something\r\n}\r\n````\r\n\r\nIf you\'re using TypeScript, you can take advantage of several interfaces used in the abstract syntax tree, too.\r\n\r\n````\r\nconst { SyntaxNode } = require("up-lang")\r\n\r\nfunction handle(node: SyntaxNode): void {\r\n // Do something\r\n}\r\n````\r\n\r\nAll classes and interfaces are described below.\r\n\r\n\r\n`Document` (class)\r\n==================\r\n\r\nThis class represents the syntax tree for a parsed document.\r\n\r\nExtends\r\n [topic: `OutlineSyntaxNodeContainer`]\r\n\r\nUnique members\r\n `tableOfContents`: [topic: Document.TableOfContents]\r\n An object representing the document\'s table of contents.\r\n\r\n `create` method (static)\r\n Purpose\r\n This method returns a ready-to-render syntax tree from a collection of outline syntax nodes.\r\n\r\n Usually, you\'ll want to use this static method instead of the constructor.\r\n\r\n Arguments\r\n `children`: array of [topic: `OutlineSyntaxNode`]\r\n A collection of outline syntax nodes representing the content of this document.\r\n\r\n Return type: [topic: `Document`]\r\n This method creates and returns a ready-to-render `Document` object.\r\n\r\n To prepare the document for rendering, this method:\r\n\r\n - Assigns footnotes their reference numbers\r\n - Extracts footnotes into footnote blocks\r\n - Produces a table of contents\r\n - Matches section links with table of contents entries\r\n\r\nConstructor arguments\r\n `children`: array of [topic: `OutlineSyntaxNode`]\r\n A collection of outline syntax nodes representing the content of this document.\r\n\r\n `tableOfContents` (optional): [topic: `Document.TableOfContents`]\r\n The document\'s table of contents.\r\n\r\nRendered HTML\r\n When rendered to HTML, the document is *not* put into an outer container element.\r\n\r\n ````\r\n

                  \r\n Unlike regular dental floss, you can use floss picks even if you\'re not a trained dental hygienist.\r\n

                  \r\n

                  \r\n Floss picks are sold in stylish, resealable plastic bags. You have no excuse not to buy some today.\r\n

                  \r\n ````\r\n\r\n\r\n----------------------------------\r\n`Document.TableOfContents` (class)\r\n----------------------------------\r\n\r\nThis class represents the table of contents for a document. The table of contents includes every heading except those found within [topic: revealable content].\r\n\r\nMembers\r\n `entries`: array of [topic: `Document.TableOfContents.Entry`]\r\n A collection of entries representing headings in the document. In fact, the objects in this collection are the same [topic: `Heading`] objects in the document itself.\r\n\r\nConstructor arguments\r\n `entries`: array of [topic: `Document.TableOfContents.Entry`]\r\n The entries in the table of contents.\r\n\r\nRendered HTML\r\n Each entry in the table of contents renders a heading element corresponding to its `level`. This heading element contains a link to the appropriate section in the document.\r\n\r\n To learn more on how headings are rendered, please see [topic: `Heading`].\r\n\r\n ````\r\n

                  \r\n Fun things\r\n

                  \r\n

                  \r\n Games\r\n

                  \r\n

                  \r\n Video games\r\n

                  \r\n

                  \r\n Released in the 2000s\r\n

                  \r\n
                  \r\n For Nintendo devices\r\n
                  \r\n
                  \r\n Nintendo 64\r\n
                  \r\n \r\n
                  \r\n Game Boy\r\n
                  \r\n \r\n
                  \r\n Warlocked\r\n
                  \r\n ````\r\n\r\n\r\n`Document.TableOfContents.Entry` (interface)\r\n--------------------------------------------\r\n\r\nThis interface represents an entry in the table of contents.\r\n\r\nMembers\r\n `ordinalInTableOfContents`: `number`\r\n The entry\'s ordinal in the table of contents. The first ordinal is `1`, not `0`.\r\n\r\n `level`: `number`\r\n The heading level of the entry. Like HTML heading levels, a level of 1 is considered the most significant.\r\n\r\n `children`: array of [topic: InlineSyntaxNode]\r\n The inline syntax nodes representing this entry in the table of contents.\r\n\r\n `titleMarkup`: string\r\n Currently, headings are the only writing convention that produce table of contents entries, so the `titleMarkup` field always represents the markup for the "content line" of a heading.\r\n\r\n Section links compare their `markupSnippetFromSectionTitle` against this field.\r\n\r\n `sourceLineNumber`: `number`\r\n If [topic: `createSourceMap`] is enabled, this field is set to the line number of the first line of markup that produced the heading represented by this entry. Source line numbers start at `1`, not `0`.\r\n\r\n When rendered to HTML, entries with source line numbers are given a `data-up-source-line` attribute set the appropriate line number.\r\n\r\n ````\r\n

                  \r\n Video games\r\n

                  \r\n ````\r\n\r\n `contentWithinTableOfContents` method\r\n Return type: array of [topic: `InlineSyntaxNode`]\r\n This method returns the inline syntax nodes that should represent this entry\'s content inside the table of contents itself.\r\n\r\n Arguments\r\n None.\r\n\r\n\r\n`InlineDocument` (class)\r\n=======================\r\n\r\nThis class represents the syntax tree for a parsed inline document.\r\n\r\nExtends\r\n [topic: `InlineSyntaxNodeContainer`]\r\n\r\nConstructor arguments\r\n See the constructor arguments for [topic: `InlineSyntaxNodeContainer`].\r\n\r\nRendered HTML\r\n When rendered to HTML, an inline document is *not* put into an outer container element.\r\n\r\n ````\r\n I love dental floss!\r\n ````\r\n\r\n\r\n`SyntaxNode` (interface)\r\n========================\r\n\r\nAll syntax node classes must implement this interface.\r\n\r\nMembers\r\n `inlineDescendants` method\r\n Return type: array of [topic: `InlineSyntaxNode`]\r\n This method returns all inline descendants (including children, grandchildren, etc.).\r\n\r\n Arguments\r\n None.\r\n\r\nNotes\r\n This interface also has a `render` method, but it isn\'t relevant to developers using the Up library.\r\n\r\n\r\n`InlineSyntaxNode` (interface)\r\n==============================\r\n\r\nAll inline syntax node classes must implement this interface.\r\n\r\nExtends\r\n [topic: `SyntaxNode`]\r\n\r\nUnique members\r\n `searchableText` method\r\n Return type: `string`\r\n This method returns the searchable text of the syntax node.\r\n\r\n Ultimately, this method helps match [topic: section links] to the the most appropriate table of content entry.\r\n\r\n Arguments\r\n None.\r\n\r\n `textAppearingInline` method\r\n Return type: `string`\r\n This method returns the text of the syntax node as it should appear inline. Some inline writing conventions don\'t have any text appearing inline, including [topic: footnotes] and [topic: images].\r\n\r\n This method is helps determine whether table cells are numeric.\r\n\r\n Arguments\r\n None.\r\n\r\n\r\n`OutlineSyntaxNode` (interface)\r\n===============================\r\n\r\nAll outline syntax node classes must implement this interface.\r\n\r\nExtends\r\n [topic: `SyntaxNode`]\r\n\r\nUnique members\r\n `sourceLineNumber`: `number`\r\n If [topic: `createSourceMap`] is enabled, this field is set to the first line of markup that produced this syntax node. Source line numbers start at `1`, not `0`.\r\n\r\n HTML elements rendered by outline syntax nodes with source line numbers are given a `data-up-source-line` attribute set the appropriate line number.\r\n\r\n ````\r\n

                  Hi there!

                  \r\n ````\r\n\r\n `descendantsToIncludeInTableOfContents` method\r\n Return type: array of [topic: `Document.TableOfContents.Entry`]\r\n This method returns any descendants (at any nesting level) to include in the table of contents.\r\n\r\n Arguments\r\n None.\r\n\r\n\r\n`RichInlineSyntaxNode` (class)\r\n==============================\r\n\r\nThis abstract class represents an inline syntax node that can contain other inline syntax nodes.\r\n\r\nExtends\r\n [topic: `InlineSyntaxNodeContainer`]\r\n\r\nImplements\r\n [topic: `InlineSyntaxNode`]\r\n\r\nConstructor arguments\r\n See the constructor arguments for [topic: `InlineSyntaxNodeContainer`].\r\n\r\n\r\n`RichOutlineSyntaxNode` (class)\r\n===============================\r\n\r\nThis abstract class represents an outline syntax node that can contain other outline syntax nodes.\r\n\r\nExtends\r\n [topic: `OutlineSyntaxNodeContainer`]\r\n\r\nImplements\r\n [topic: `OutlineSyntaxNode`]\r\n\r\nConstructor arguments\r\n `children`: array of [topic: `OutlineSyntaxNode`]\r\n A collection of outline syntax nodes representing the content of this syntax node.\r\n\r\n `options` (optional)\r\n `sourceLineNumber`: number\r\n The line number of the first line of markup that created this syntax node.\r\n\r\n\r\n`InlineSyntaxNodeContainer` (class)\r\n===================================\r\n\r\nThis abstract class represents a container of inline syntax nodes.\r\n\r\nMembers\r\n `children`: array of [topic: `InlineSyntaxNode`]\r\n A collection of inline syntax nodes representing the content of this container.\r\n\r\n `inlineDescendants` method\r\n Return type: array of [topic: `InlineSyntaxNode`]\r\n This method returns all inline descendants (including `children`, grandchildren, etc.).\r\n\r\n Arguments\r\n None.\r\n\r\nConstructor arguments\r\n `children`: array of [topic: `InlineSyntaxNode`]\r\n This field is described above.\r\n\r\n\r\n`OutlineSyntaxNodeContainer` (class)\r\n====================================\r\n\r\nThis abstract class represents a container of outline syntax nodes.\r\n\r\nMembers\r\n `children`: array of [topic: `OutlineSyntaxNode`]\r\n A collection of outline syntax nodes representing the content of this container.\r\n\r\n `descendantsToIncludeInTableOfContents` method\r\n Return type: array of [topic: `Document.TableOfContents.Entry`]\r\n This method returns any descendants (children, grandchildren, etc.) to include in the table of contents.\r\n\r\n Arguments\r\n None.\r\n\r\n `inlineDescendants` method\r\n Return type: array of [topic: `InlineSyntaxNode`]\r\n This method returns all inline descendants of `children`.\r\n\r\n Arguments\r\n None.\r\n\r\nConstructor arguments\r\n `children`: array of [topic: `OutlineSyntaxNode`]\r\n This field is described above.\r\n\r\n\r\n`MediaSyntaxNode` (class)\r\n=========================\r\n\r\nAll media syntax node classes extend this abstract class:\r\n\r\n- [topic: `Image`]\r\n- [topic: `Video`]\r\n- [topic: `Audio`]\r\n\r\nImplements\r\n [topic: `InlineSyntaxNode`]\r\n Media conventions can appear inline (i.e. within paragraphs).\r\n\r\n [topic: `OutlineSyntaxNode`]\r\n If a line consists solely of media conventions (or media conventions within links), those media conventions (or their outer links) are placed directly into the outline.\r\n\r\nUnique members\r\n `description`: `string`\r\n The media\'s description.\r\n\r\n `url`: `string`\r\n Represents the media\'s URL after the following settings are applied:\r\n\r\n - [topic: `defaultUrlScheme`]\r\n - [topic: `baseForUrlsStartingWithSlash`]\r\n - [topic: `baseForUrlsStartingWithHashmark`]\r\n\r\nConstructor arguments\r\n `description`: string\r\n The media\'s description.\r\n\r\n `url`: string\r\n The media\'s URL.\r\n\r\n `options` (optional)\r\n `sourceLineNumber`: number\r\n The line number of the line of markup that created this media syntax node.\r\n\r\n\r\n`ParentheticalSyntaxNode` (class)\r\n=================================\r\n\r\nThis abstract class represents [topic: parenthetical text]. It exists solely to improve the expressiveness of the type system.\r\n\r\nIt is extended by both parenthetical syntax node classes:\r\n\r\n- [topic: `NormalParenthetical`]\r\n- [topic: `SquareParenthetical`]\r\n\r\nExtends\r\n [topic: `RichInlineSyntaxNode`]\r\n\r\nConstructor arguments\r\n See the constructor arguments for [topic: `RichInlineSyntaxNode`].\r\n\r\n\r\n`Audio` (class)\r\n===============\r\n\r\nWriting convention\r\n [topic: Audio]\r\n\r\nExtends\r\n [topic: `MediaSyntaxNode`]\r\n\r\nConstructor arguments\r\n See the constructor arguments for [topic: `MediaSyntaxNode`].\r\n\r\nRendered HTML\r\n ````\r\n \r\n ````\r\n\r\n\r\n`Blockquote` (class)\r\n====================\r\n\r\nWriting convention\r\n [topic: Blockquotes]\r\n\r\nExtends\r\n [topic: `RichOutlineSyntaxNode`]\r\n\r\nConstructor arguments\r\n See the constructor arguments for [topic: `RichOutlineSyntaxNode`].\r\n\r\nRendered HTML\r\n ````\r\n
                  \r\n

                  Hi there!

                  \r\n
                  \r\n ````\r\n\r\n\r\n`Bold` (class)\r\n==============\r\n\r\nWriting convention\r\n [topic: Audio]\r\n\r\nExtends\r\n [topic: `RichInlineSyntaxNode`]\r\n\r\nConstructor arguments\r\n See the constructor arguments for [topic: `RichInlineSyntaxNode`].\r\n\r\nRendered HTML\r\n ````\r\n Hi there!\r\n ````\r\n\r\n\r\n`BulletedList` (class)\r\n=======================\r\n\r\nWriting convention\r\n [topic: Bulleted lists]\r\n\r\nImplements\r\n [topic: `OutlineSyntaxNode`]\r\n\r\nUnique members\r\n `items`: array of [topic: `BulletedList.Item`]\r\n The collection of items comprising this bulleted list.\r\n\r\nConstructor arguments\r\n `items`: array of [topic: `BulletedList.Item`]\r\n This field is described above.\r\n\r\n `options` (optional)\r\n `sourceLineNumber`: number\r\n The line number of the first line of markup that created this bulleted list.\r\n\r\nRendered HTML\r\n ````\r\n
                    \r\n
                  • \r\n

                    Buy milk

                    \r\n
                  • \r\n
                  • \r\n

                    Buy bread

                    \r\n
                  • \r\n
                  • \r\n

                    Buy happiness

                    \r\n
                  • \r\n
                  \r\n ````\r\n\r\n\r\n----------------------------\r\n`BulletedList.Item` (class)\r\n----------------------------\r\n\r\nThis class represents an item in a bulleted list.\r\n\r\nExtends\r\n [topic: `OutlineSyntaxNodeContainer`]\r\n\r\nConstructor arguments\r\n See the constructor arguments for [topic: `OutlineSyntaxNodeContainer`].\r\n\r\n\r\n`CodeBlock` (class)\r\n===================\r\n\r\nWriting convention\r\n [topic: Code blocks]\r\n\r\nImplements\r\n [topic: `OutlineSyntaxNode`]\r\n\r\nUnique members\r\n `code`: `string`\r\n The code represented by this syntax node.\r\n\r\nConstructor arguments\r\n `code`: `string`\r\n This field is described above.\r\n\r\n `options` (optional)\r\n `sourceLineNumber`: number\r\n The line number of the first line of markup that created this code block.\r\n\r\nRendered HTML\r\n ````\r\n
                  const message = "Hi there!"
                  \r\n ````\r\n\r\n\r\n`DescriptionList` (class)\r\n=========================\r\n\r\nWriting convention\r\n [topic: Description lists]\r\n\r\nImplements\r\n [topic: `OutlineSyntaxNode`]\r\n\r\nUnique members\r\n `items`: array of [topic: `DescriptionList.Item`]\r\n The collection of items comprising this description list.\r\n\r\nConstructor arguments\r\n `items`: array of [topic: `DescriptionList.Item`]\r\n This field is described above.\r\n\r\n `options` (optional)\r\n `sourceLineNumber`: number\r\n The line number of the first line of markup that created this description list.\r\n\r\nRendered HTML\r\n ````\r\n
                  \r\n
                  Kirby\'s Dreamland
                  \r\n
                  \r\n

                  A video game about a flying marshmallow.

                  \r\n
                  \r\n
                  Super Mario Land
                  \r\n
                  \r\n

                  A video game about a jumping plumber.

                  \r\n
                  \r\n
                  \r\n ````\r\n\r\n\r\n------------------------------\r\n`DescriptionList.Item` (class)\r\n------------------------------\r\n\r\nThis class represents a collection of subjects and their corresponding description.\r\n\r\nUnique members\r\n `subjects`: array of [topic: `DescriptionList.Item.Subject`]\r\n The subjects described by `description`.\r\n\r\n `description`: [topic: `DescriptionList.Item.Description`]\r\n The description of `subjects`.\r\n\r\nConstructor arguments\r\n `subjects`: array of [topic: `DescriptionList.Item.Subject`]\r\n This field is described above.\r\n\r\n `description`: [topic: `DescriptionList.Item.Description`]\r\n This field is described above.\r\n\r\n\r\n`DescriptionList.Item.Subject` (class)\r\n--------------------------------------\r\n\r\nThis class represents the collection of subjects described by a given description within a description list item.\r\n\r\nExtends\r\n [topic: `InlineSyntaxNodeContainer`]\r\n\r\nConstructor arguments\r\n See the constructor arguments for [topic: `InlineSyntaxNodeContainer`].\r\n\r\n\r\n`DescriptionList.Item.Description` (class)\r\n------------------------------------------\r\n\r\nThis class represents the description of a given collection of subjects within a description list item.\r\n\r\nExtends\r\n [topic: `OutlineSyntaxNodeContainer`]\r\n\r\nConstructor arguments\r\n See the constructor arguments for [topic: `OutlineSyntaxNodeContainer`].\r\n\r\n\r\n`Emphasis` (class)\r\n==================\r\n\r\nWriting convention\r\n [topic: Emphasis]\r\n\r\nExtends\r\n [topic: `RichInlineSyntaxNode`]\r\n\r\nConstructor arguments\r\n See the constructor arguments for [topic: `RichInlineSyntaxNode`].\r\n\r\nRendered HTML\r\n ````\r\n Hi there!\r\n ````\r\n\r\n\r\n`ExampleUserInput` (class)\r\n==========================\r\n\r\nWriting convention\r\n [topic: Example user input]\r\n\r\nImplements\r\n [topic: `InlineSyntaxNode`]\r\n\r\nUnique members\r\n `userInput`: `string`\r\n The example of user input.\r\n\r\nRendered HTML\r\n ````\r\n esc\r\n ````\r\n\r\n\r\n`Footnote` (class)\r\n==================\r\n\r\nWriting convention\r\n [topic: Footnotes]\r\n\r\nExtends\r\n [topic: `RichInlineSyntaxNode`]\r\n\r\nUnique members\r\n `referenceNumber`: `number`\r\n The number that appears in superscript for this footnote. Within a given document, this value must be unique.\r\n\r\nConstructor arguments\r\n `children`: array of [topic: `InlineSyntaxNode`]\r\n A collection of inline syntax nodes representing the content of this footnote.\r\n\r\n `options` (optional)\r\n `referenceNumber`: number\r\n This field is described above.\r\n\r\nRendered HTML\r\n ````\r\n \r\n 1\r\n \r\n ````\r\n\r\n\r\n`FootnoteBlock` (class)\r\n=======================\r\n\r\nFootnotes are written inline, but they aren\'t meant to appear inline in the final document. That would defeat the purpose of footnotes! Instead, footnotes are extracted and placed in footnote blocks. This class represents one of those footnote blocks.\r\n\r\nImplements\r\n [topic: `OutlineSyntaxNode`]\r\n\r\nUnique members\r\n `footnotes`: array of [topic: Footnote]\r\n The collection of footnotes comprising this footnote block.\r\n\r\nConstructor arguments\r\n `footnotes`: array of [topic: Footnote]\r\n This field is described above.\r\n\r\nRendered HTML\r\n ````\r\n
                  \r\n
                  \r\n 1\r\n
                  \r\n
                  No relation to Warcraft!
                  \r\n
                  \r\n 2\r\n
                  \r\n
                  The pathfinding algorithm had issues.
                  \r\n
                  \r\n ````\r\n\r\n\r\n`Heading` (class)\r\n=================\r\n\r\nWriting convention\r\n [topic: Headings]\r\n\r\nExtends\r\n [topic: `InlineSyntaxNodeContainer`]\r\n\r\nImplements\r\n [topic: `Document.TableOfContents.Entry`]\r\n Headings are special! No other syntax node implements this interface.\r\n\r\n [topic: `OutlineSyntaxNode`]\r\n But headings also serve as regular old outline syntax nodes.\r\n\r\nUnique members\r\n `level`: `number`\r\n A heading\'s level represents its significance in the document. Like HTML heading levels, a level of 1 is considered the most significant.\r\n\r\nConstructor arguments\r\n `children`: array of [topic: `InlineSyntaxNode`]\r\n A collection of inline syntax nodes representing the content of this heading.\r\n\r\n `options`\r\n `level`: `number`\r\n This field is described above.\r\n\r\n `titleMarkup`: string\r\n Represents the markup for the "content line" of this heading.\r\n\r\n Section links compare their `markupSnippetFromSectionTitle` against this field.\r\n\r\n `ordinalInTableOfContents` (optional): `number`\r\n Represents this heading\'s ordinal in the table of contents. The first ordinal is `1`, not `0`.\r\n\r\n `sourceLineNumber` (optional): number\r\n The line number of the first line of markup that created this heading.\r\n\r\nRendered HTML\r\n Levels 1--6\r\n Headings with levels 1 through 6 render the appropriate heading element.\r\n\r\n ````\r\n

                  \r\n I am a level 1 heading!\r\n

                  \r\n\r\n
                  \r\n I am a level 6 heading!\r\n
                  \r\n ````\r\n Levels 7 and higher\r\n Headings with levels 7 and higher render `
                  ` elements with an `aria-level` attribute equal to their level.\r\n\r\n ````\r\n
                  \r\n I am a level 7 heading!\r\n
                  \r\n\r\n
                  \r\n I am a level 10 heading!\r\n
                  \r\n ````\r\n\r\n\r\n`Highlight` (class)\r\n===================\r\n\r\nWriting convention\r\n [topic: Highlighting]\r\n\r\nExtends\r\n [topic: `RichInlineSyntaxNode`]\r\n\r\nConstructor arguments\r\n See the constructor arguments for [topic: `RichInlineSyntaxNode`].\r\n\r\nRendered HTML\r\n ````\r\n Hi there!\r\n ````\r\n\r\n\r\n`Image` (class)\r\n===============\r\n\r\nWriting convention\r\n [topic: Images]\r\n\r\nExtends\r\n [topic: `MediaSyntaxNode`]\r\n\r\nConstructor arguments\r\n See the constructor arguments for [topic: `MediaSyntaxNode`].\r\n\r\nRendered HTML\r\n ````\r\n Super Mario Land box art\r\n ````\r\n\r\n\r\n`InlineCode` (class)\r\n====================\r\n\r\nWriting convention\r\n [topic: Inline code]\r\n\r\nImplements\r\n [topic: `InlineSyntaxNode`]\r\n\r\nUnique members\r\n `code`: `string`\r\n The inline code represented by this syntax node.\r\n\r\nConstructor arguments\r\n `code`: `string`\r\n This field is described above.\r\n\r\nRendered HTML\r\n ````\r\n interface\r\n ````\r\n\r\n\r\n`InlineQuote` (class)\r\n=====================\r\n\r\nWriting convention\r\n [topic: Inline quotes]\r\n\r\nExtends\r\n [topic: `RichInlineSyntaxNode`]\r\n\r\nConstructor arguments\r\n See the constructor arguments for [topic: `RichInlineSyntaxNode`].\r\n\r\nRendered HTML\r\n ````\r\n I know!\r\n ````\r\n\r\n\r\n`InlineRevealable` (class)\r\n==========================\r\n\r\nWriting convention\r\n [topic: Inline revealables]\r\n\r\nExtends\r\n [topic: `RichInlineSyntaxNode`]\r\n\r\nConstructor arguments\r\n See the constructor arguments for [topic: `RichInlineSyntaxNode`].\r\n\r\nRendered HTML\r\n ````\r\n \r\n \r\n \r\n \r\n \r\n Ash fights Gary\r\n \r\n ````\r\n\r\n\r\n`Italic` (class)\r\n================\r\n\r\nWriting convention\r\n [topic: Italics]\r\n\r\nExtends\r\n [topic: `RichInlineSyntaxNode`]\r\n\r\nConstructor arguments\r\n See the constructor arguments for [topic: `RichInlineSyntaxNode`].\r\n\r\nRendered HTML\r\n ````\r\n I know!\r\n ````\r\n\r\n\r\n`LineBlock` (class)\r\n===================\r\n\r\nWriting convention\r\n [topic: Line blocks]\r\n\r\nImplements\r\n [topic: `OutlineSyntaxNode`]\r\n\r\nUnique members\r\n `lines`: array of [topic: `LineBlock.Line`]\r\n The collection of lines comprising this line block.\r\n\r\nConstructor arguments\r\n `lines`: array of [topic: `LineBlock.Line`]\r\n This field is described above.\r\n\r\n `options` (optional)\r\n `sourceLineNumber`: number\r\n The line number of the first line of markup that created this syntax node.\r\n\r\nRendered HTML\r\n ````\r\n
                  \r\n
                  Roses are red
                  \r\n
                  Violets are blue
                  \r\n
                  \r\n ````\r\n\r\n------------------------\r\n`LineBlock.Line` (class)\r\n------------------------\r\n\r\nThis class represents a line in a line block.\r\n\r\nExtends\r\n [topic: `InlineSyntaxNodeContainer`]\r\n\r\nConstructor arguments\r\n See the constructor arguments for [topic: `InlineSyntaxNodeContainer`].\r\n\r\n\r\n`Link` (class)\r\n==============\r\n\r\nWriting convention\r\n [topic: Italics]\r\n\r\nExtends\r\n [topic: `RichInlineSyntaxNode`]\r\n\r\nImplements\r\n [topic: `OutlineSyntaxNode`]\r\n If a line consists solely of media conventions (or media conventions within links), those media conventions (or their outer links) are placed directly into the outline.\r\n\r\nUnique members\r\n `url`: `string`\r\n This links\'s URL after the following settings are applied:\r\n\r\n - [topic: `defaultUrlScheme`]\r\n - [topic: `baseForUrlsStartingWithSlash`]\r\n - [topic: `baseForUrlsStartingWithHashmark`]\r\n\r\nConstructor arguments\r\n `children`: array of [topic: `InlineSyntaxNode`]\r\n A collection of inline syntax nodes representing the content of this link.\r\n\r\n `url`: `string`\r\n This field is described above.\r\n\r\n `options`\r\n `sourceLineNumber` (optional): number\r\n The line number of the line of markup that created this link.\r\n\r\nRendered HTML\r\n ````\r\n Hi there!\r\n ````\r\n\r\n\r\n`NormalParenthetical` (class)\r\n=============================\r\n\r\nWriting convention\r\n [topic: Parenthetical text] produced by parentheses\r\n\r\nExtends\r\n [topic: `ParentheticalSyntaxNode`]\r\n\r\nConstructor arguments\r\n See the constructor arguments for [topic: `ParentheticalSyntaxNode`].\r\n\r\nRendered HTML\r\n ````\r\n (Hi there!)\r\n ````\r\n\r\n\r\n`NumberedList` (class)\r\n======================\r\n\r\nWriting convention\r\n [topic: Numbered lists]\r\n\r\nImplements\r\n [topic: `OutlineSyntaxNode`]\r\n\r\nUnique members\r\n `items`: array of [topic: `NumberedList.Item`]\r\n The collection of items comprising this numbered list.\r\n\r\n `start` method\r\n Return type: `number`\r\n This method returns the starting ordinal of this list, if one was explicitly defined. Otherwise, this method returns `undefined`.\r\n\r\n Arguments\r\n None.\r\n\r\n `order` method\r\n Return type: [topic: `NumberedList.Order`]\r\n This method returns the order of this numered list.\r\n\r\n Arguments\r\n None.\r\n\r\nConstructor arguments\r\n `items`: array of [topic: `NumberedList.Item`]\r\n This field is described above.\r\n\r\n `options` (optional)\r\n `sourceLineNumber`: number\r\n The line number of the first line of markup that created this numbered list.\r\n\r\nRendered HTML\r\n ````\r\n
                    \r\n
                  1. \r\n

                    Buy milk

                    \r\n
                  2. \r\n
                  3. \r\n

                    Buy bread

                    \r\n
                  4. \r\n
                  5. \r\n

                    Buy happiness

                    \r\n
                  6. \r\n
                  \r\n ````\r\n\r\n\r\n---------------------------\r\n`NumberedList.Item` (class)\r\n---------------------------\r\n\r\nThis class represents an item in a numbered list.\r\n\r\nExtends\r\n [topic: `OutlineSyntaxNodeContainer`]\r\n\r\nConstructor arguments\r\n `children`: array of [topic: `OutlineSyntaxNode`]\r\n A collection of outline syntax nodes representing the content of this list item.\r\n\r\n `options` (optional)\r\n `ordinal`: number\r\n This field is described above.\r\n\r\n\r\n----------------------------\r\n`NumberedList.Order` (union)\r\n----------------------------\r\n\r\nThis union type represents the order of a numbered list.\r\n\r\nIt has two members: the string literals `"asc"` (for _ascending_) and `"desc"` (for _descending_).\r\n\r\n`Paragraph` (class)\r\n===================\r\n\r\nWriting convention\r\n [topic: Paragraphs]\r\n\r\nExtends\r\n [topic: `InlineSyntaxNodeContainer`]\r\n\r\nImplements\r\n [topic: `OutlineSyntaxNode`]\r\n\r\nConstructor arguments\r\n `children`: array of [topic: `InlineSyntaxNode`]\r\n A collection of inline syntax nodes representing the content of this paragraph.\r\n\r\n `options` (optional)\r\n `sourceLineNumber`: number\r\n The line number of the line of markup that created this paragraph.\r\n\r\nRendered HTML\r\n ````\r\n

                  Hi there!

                  \r\n ````\r\n\r\n\r\n`RevealableBlock` (class)\r\n=========================\r\n\r\nWriting convention\r\n [topic: Revealable blocks]\r\n\r\nExtends\r\n [topic: `RichOutlineSyntaxNode`]\r\n\r\nConstructor arguments\r\n See the constructor arguments for [topic: `RichOutlineSyntaxNode`].\r\n\r\nRendered HTML\r\n ````\r\n
                  \r\n \r\n \r\n \r\n \r\n
                  \r\n

                  Ash fights Gary.

                  \r\n
                  \r\n
                  \r\n ````\r\n\r\n\r\n`SectionLink` (class)\r\n=====================\r\n\r\nWriting convention\r\n [topic: Section links]\r\n\r\nImplements\r\n [topic: `InlineSyntaxNode`]\r\n\r\nUnique members\r\n `markupSnippetFromSectionTitle`: `string`\r\n This field is compared against the `titleMarkup` field of every table of contents entry to find the most appropriate match.\r\n\r\nConstructor arguments\r\n `markupSnippetFromSectionTitle`: `string`\r\n This field is described above.\r\n\r\n `entry`: [topic: `Document.TableOfContents.Entry`]\r\n The table of contents entry (i.e. heading) this section link points to.\r\n\r\nRendered HTML\r\n When matched with a heading\r\n Up renders a link to that heading. The rendered link contains the heading\'s content.\r\n\r\n ````\r\n Using the Up library\r\n ````\r\n\r\n When *not* matched with a heading\r\n Up renders the value of `markupSnippetFromSectionTitle` in italics.\r\n\r\n ````\r\n Up library\r\n ````\r\n\r\n\r\n`SquareParenthetical` (class)\r\n=============================\r\n\r\nWriting convention\r\n [topic: Parenthetical text] produced by square brackets\r\n\r\nExtends\r\n [topic: `ParentheticalSyntaxNode`]\r\n\r\nConstructor arguments\r\n See the constructor arguments for [topic: `ParentheticalSyntaxNode`].\r\n\r\nRendered HTML\r\n ````\r\n [Hi there!]\r\n ````\r\n\r\n\r\n`Stress` (class)\r\n================\r\n\r\nWriting convention\r\n [topic: Stress]\r\n\r\nExtends\r\n [topic: `RichInlineSyntaxNode`]\r\n\r\nConstructor arguments\r\n See the constructor arguments for [topic: `RichInlineSyntaxNode`].\r\n\r\nRendered HTML\r\n ````\r\n Hi there!\r\n ````\r\n\r\n\r\n`Table` (class)\r\n===============\r\n\r\nWriting convention\r\n [topic: Tables]\r\n\r\nImplements\r\n [topic: `OutlineSyntaxNode`]\r\n\r\nUnique members\r\n `header`: [topic: `Table.Header`]\r\n The header row.\r\n\r\n `rows`: array of [topic: `Table.Row`]\r\n The content rows.\r\n\r\n `caption`: [topic: `Table.Caption`]\r\n The optional caption.\r\n\r\nConstructor arguments\r\n `header`: [topic: `Table.Header`]\r\n This field is described above.\r\n\r\n `rows`: array of [topic: `Table.Row`]\r\n This field is described above.\r\n\r\n `caption`: [topic: `Table.Caption`]\r\n This field is described above.\r\n\r\n `options` (optional)\r\n `sourceLineNumber`: number\r\n The line number of the first line of markup that created this table.\r\n\r\nRendered HTML\r\n Without header column\r\n ````\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
                  Moves learned by the Pokémon Bulbasaur
                  LevelMoveTypePowerAccuracy
                  1TackleNormal50100%
                  3GrowlNormal100%
                  \r\n ````\r\n\r\n With header column\r\n ````\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
                  Moves learned by the Pokémon Bulbasaur
                  LevelTypePowerAccuracy
                  Tackle1Normal50100%
                  Growl3Normal100%
                  \r\n ````\r\n\r\n\r\n-----------------------\r\n`Table.Caption` (class)\r\n-----------------------\r\n\r\nThis class represents the caption of a table.\r\n\r\nExtends\r\n [topic: `InlineSyntaxNodeContainer`]\r\n\r\nConstructor arguments\r\n See the constructor arguments for [topic: `InlineSyntaxNodeContainer`].\r\n\r\n\r\n--------------------\r\n`Table.Cell` (class)\r\n--------------------\r\n\r\nThis abstract class represents a table cell.\r\n\r\nExtends\r\n [topic: `InlineSyntaxNodeContainer`]\r\n\r\nUnique members\r\n `isNumeric` method\r\n Return type: `boolean`\r\n This method returns a `boolean` indicating whether the content of this cell is numeric.\r\n\r\n Arguments\r\n None.\r\n\r\nConstructor arguments\r\n See the constructor arguments for [topic: `InlineSyntaxNodeContainer`].\r\n\r\n\r\n----------------------\r\n`Table.Header` (class)\r\n----------------------\r\n\r\nThis class represents the header row of a table.\r\n\r\nUnique members\r\n `cells`: array of [topic: `Table.Header.Cell`]\r\n The cells in this header row.\r\n\r\nConstructor arguments\r\n `cells`: array of [topic: `Table.Header.Cell`]\r\n This field is described above.\r\n\r\n\r\n`Table.Header.Cell` (class)\r\n---------------------------\r\n\r\nThis class represents a table header cell.\r\n\r\nExtends\r\n [topic: `Table.Cell`]\r\n\r\nConstructor arguments\r\n See the constructor arguments for [topic: `InlineSyntaxNodeContainer`].\r\n\r\n\r\n-------------------\r\n`Table.Row` (class)\r\n-------------------\r\n\r\nThis class represents a content row in a table.\r\n\r\nUnique members\r\n `cells`: array of [topic: `Table.Row.Cell`]\r\n The content cells in this row.\r\n\r\n `headerColumnCell`: [topic: `Table.Header.Cell`]\r\n The single header column cell for this row, if there is one.\r\n\r\n Tables without header columns never have header column cells.\r\n\r\n `allCellsStartingWithHeaderColumnCell` method\r\n Return type: array of [topic: `Table.Cell`]\r\n This method returns every cell in this row.\r\n\r\n If the table has a header column, the row\'s `headerColumnCell` is the first item in the returned collection.\r\n\r\n Arguments\r\n None.\r\n\r\nConstructor arguments\r\n `cells`: array of [topic: `Table.Row.Cell`]\r\n This field is described above.\r\n\r\n `headerColumnCell`: [topic: `Table.Header.Cell`]\r\n This field is described above.\r\n\r\n\r\n`Table.Row.Cell` (class)\r\n------------------------\r\n\r\nThis class represents a regular (non-header) table cell.\r\n\r\nExtends\r\n [topic: `Table.Cell`]\r\n\r\nConstructor arguments\r\n See the constructor arguments for [topic: `InlineSyntaxNodeContainer`].\r\n\r\n\r\n`Text` (class)\r\n==============\r\n\r\nThis class represents regular text content.\r\n\r\nImplements\r\n [topic: `InlineSyntaxNode`]\r\n\r\nUnique members\r\n `text`: `string`\r\n The text represented by this syntax node.\r\n\r\nConstructor arguments\r\n `text`: `string`\r\n This field is described above.\r\n\r\nRendered HTML\r\n ````\r\n Yes, 1 < 2\r\n ````\r\n\r\n\r\n`ThematicBreak` (class)\r\n=======================\r\n\r\nWriting convention\r\n [topic: Thematic breaks]\r\n\r\nExtends\r\n [topic: `OutlineSyntaxNode`]\r\n\r\nConstructor arguments\r\n `options` (optional)\r\n `sourceLineNumber`: number\r\n The line number of the line of markup that created this thematic break.\r\n\r\nRendered HTML\r\n ````\r\n
                  \r\n ````\r\n\r\n\r\n`Video` (class)\r\n===============\r\n\r\nWriting convention\r\n [topic: Video]\r\n\r\nExtends\r\n [topic: `MediaSyntaxNode`]\r\n\r\nConstructor arguments\r\n See the constructor arguments for [topic: `MediaSyntaxNode`].\r\n\r\nRendered HTML\r\n ````\r\n \r\n ````'},function(e,n,t){"use strict";t.r(n);t(68);var r=document.getElementById.bind(document),o=t(12),i=t.n(o),a=t(35);function s(e,n){var t;return function(){for(var r=arguments.length,o=new Array(r),i=0;i=o){var i={line:r.dataset.upSourceLine-1,ch:0},a=e.charCoords(i,"local").top;return void e.scrollTo(null,a)}}}}function y(e,n){var t=1+e.lineAtHeight(0,"window");if(1!==t)for(var r=0;r=t)return void o.scrollIntoView()}else n.scrollTop=0}function b(e){e.tab.addEventListener("click",function(){return k(e)})}function k(e){var n=e.tab,t=e.otherTab;T(n,"true"),T(t,"false"),w(n).style.display="block",w(t).style.display="none"}function T(e,n){e.setAttribute("aria-selected",n)}function w(e){return r(e.getAttribute("aria-controls"))}document.addEventListener("DOMContentLoaded",function(){var e,n,t,o,i=r("editor-container"),a=r("documentation-container");-1!==["iPhone","iPad","iPod"].indexOf(navigator.platform)?(i.style.display="none",a.style.marginLeft=0):g({editorContainerElement:i,documentationContainerElement:a,documentationScrollerElement:document.body,documentationElement:r("documentation"),tableOfContentsElement:r("table-of-contents")}),e=r("show-documentation"),n=r("show-table-of-contents"),b({tab:e,otherTab:n}),b({tab:n,otherTab:e}),t=w(n),o=function(t){var r=t.target.tagName;"LABEL"!==r&&"INPUT"!==r&&k({tab:e,otherTab:n})},t.addEventListener("click",function(e){var n=e.target;do{if("A"===n.tagName)return void o(e)}while(n=n.parentNode)}),a.addEventListener("keydown",function(e){var n=e.target;n.hasAttribute("tabindex")&&-1!==[13,32].indexOf(e.keyCode)&&(e.preventDefault(),n.click())})})}]); \ No newline at end of file diff --git a/docs/index.html b/docs/index.html index 68ce24b..8562a07 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1,580 +1,571 @@ - - - - - - What's Up? - - - - - -
                  -
                  - - Show table of contents - - - Hide table of contents - -
                  - -
                  -

                  What's Up?

                  Up is a markup language for writing structured documents in plain text.

                  For software developers, Up offers a software library that converts Up markup into HTML. To learn more, please see Using the Up library.


                  Why use Up?

                  Up isn't the only markup language that produces HTML. What makes it special?

                  Up uses customizable keywords

                  Too many markup languages devolve into a dense soup of symbols and punctuation.

                  When a keyword would provide more clarity than a symbol, Up takes advantage of that! Several writing conventions, including Tables and Revealable content, incorporate keywords.

                  If you're a software developer using the Up library, you can provide multiple custom variations for each keyword. To learn more, please see Customizing keywords.

                  Up has a flexible, forgiving syntax

                  Up recognizes Numbered lists that count backwards.

                  Markup
                  3) Buy milk
                  -2) Buy bread
                  -#) Buy happiness
                  Output
                  1. Buy milk

                  2. Buy bread

                  3. Buy happiness

                  Up usually ignores Excessive delimiter characters.

                  For example, you don't need to perfectly balance asterisks when stressing or emphasizing text.

                  Markup
                  I ***love****** asterisks!
                  Output

                  I love asterisks!

                  Up isn't picky about which brackets you use for Links.

                  Markup
                  - Buy [milk] (en.wikipedia.org/wiki/Milk)
                  -- Buy (bread) [en.wikipedia.org/wiki/Bread]
                  -- Buy [sugar] [en.wikipedia.org/wiki/Sugar]
                  -- Buy (happiness) (en.wikipedia.org/wiki/Happiness)
                  Output

                  Up even supports Overlapping writing conventions!

                  Markup
                  John **enjoys ==sleeping** late== whenever he can.
                  Output

                  John enjoys sleeping late whenever he can.

                  Up produces fully accessible HTML

                  From the table of contents to the last movie-ruining spoiler, Up produces fully accessible HTML. This means people who have trouble viewing a screen or a using mouse can enjoy every document.


                  Why not use Up?

                  You want a rich ecosystem of tools

                  So far, there is only one software library for Up, written and maintained by a single person. In contrast, other markup languages have countless tools and plugins.

                  You need speed

                  Up is not terribly slow, but it's not terribly fast, either—at least not yet! If you need instant, real-time parsing and rendering of large documents, Up isn't the best markup language for you.


                  Writing conventions

                  Don't get lost! The following terms are occasionally used throughout this section.

                  Writing convention

                  Any special annotation or formatting recognized by Up.

                  Inline writing convention

                  Any writing convention that can be used within paragraphs. This includes Emphasis and Highlighting.

                  Outline writing convention

                  Any non-inline writing convention. This includes Paragraphs and Tables.

                  Paragraphs

                  Paragraphs are the simplest writing convention in Up.

                  Markup
                  Unlike regular dental floss, you can use floss picks even if you're not a trained dental hygienist.
                  -
                  -Floss picks are sold in stylish, resealable plastic bags. You have no excuse not to buy some today.
                  Output

                  Unlike regular dental floss, you can use floss picks even if you're not a trained dental hygienist.

                  Floss picks are sold in stylish, resealable plastic bags. You have no excuse not to buy some today.

                  To produce a paragraph, write a line of text. That's all there is to it!

                  Typically, paragraphs are separated by one or two blank lines. Three or more blank lines between paragraphs indicates a meaningful change of subject. To learn more, see Thematic breaks.

                  In contrast, consecutive non-blank lines produce Line blocks, not consecutive paragraphs.

                  Line blocks

                  Use the line block convention for addresses, lyrics, or anything consisting of lines instead of actual Paragraphs.

                  Markup
                  Have you read my new poem?
                  -
                  -Roses are red
                  -Violets *aren't* blue
                  -Lyrics have lines
                  -And addresses do, too
                  -
                  -Poetry is just too easy.
                  Output

                  Have you read my new poem?

                  Roses are red
                  Violets aren't blue
                  Lyrics have lines
                  And addresses do, too

                  Poetry is just too easy.

                  Consecutive non-blank lines produce a line block, unless those lines represent another writing convention, like Numbered lists.

                  Emphasis

                  Use the emphasis convention to emphasize a word or phrase.

                  If the reader should pronounce a word or phrase differently (e.g. to indicate contrast or sarcasm), consider emphasizing it.

                  Markup
                  Only eat the *green* grapes. The red grapes are for Pikachu.
                  Output

                  Only eat the green grapes. The red grapes are for Pikachu.

                  To emphasize text, enclose it within single asterisks.

                  Like most inline writing conventions, emphasis can be nested within itself.

                  Markup
                  John really, *really, *really** hates Red Delicious apples.
                  Output

                  John really, really, really hates Red Delicious apples.

                  Stress

                  Use the stress convention to indicate a word or phrase is particularly important.

                  If the reader should raise their voice while reading a word or phrase, consider stressing it.

                  Markup
                  Do **not** step on the dinosaur!
                  Output

                  Do not step on the dinosaur!

                  To stress text, enclose it within double asterisks.

                  Like most inline writing conventions, stress can be nested within itself.

                  Markup
                  John really, **really, **really**** hates Red Delicious apples.
                  Output

                  John really, really, really hates Red Delicious apples.

                  Italics

                  Use the italic convention to stylistically offset a word or phrase from the surrounding text without conveying emphasis. The titles of books and movies should probably be italicized.

                  If you want to emphasize text, see Emphasis.

                  Markup
                  My favorite video game is _Chrono Cross_.
                  Output

                  My favorite video game is Chrono Cross.

                  To italicize text, enclose it within single underscores.

                  Like most inline writing conventions, italicized text can be nested within itself.

                  Markup
                  My favorite show is _Real Recipes _Redux_: Super Suppers_.
                  Output

                  My favorite show is Real Recipes Redux: Super Suppers.

                  Bold

                  Typically, people use bold text to convey extra importance—that's what the Stress convention is for!

                  To make a word or phrase bold without conveying any extra importance, use the plain old bold convention.

                  Markup
                  Has anyone actually used __KABOOM__ cleaning products?
                  Output

                  Has anyone actually used KABOOM cleaning products?

                  To make text bold, enclose it within double underscores.

                  Like most inline writing conventions, bold text can be nested within itself.

                  Markup
                  We've all seen the ads.
                  -
                  -__No hard scrubbing! __KABOOM__... and the stains are gone!__
                  Output

                  We've all seen the ads.

                  No hard scrubbing! KABOOM… and the stains are gone!

                  Highlighting

                  To draw attention to text without altering its semantics, using the highlighting convention.

                  Highlighting should not be used to emphasize or stress text! If that's your purpose, see Emphasis or Stress.

                  Markup
                  Our cupcakes are organic, ==gluten-free==, and made using only the most expensive ingredients.
                  Output

                  Our cupcakes are organic, gluten-free, and made using only the most expensive ingredients.

                  To highlight text, enclose it within two or more equal signs.

                  Like most inline writing conventions, highlighting can be nested within itself.

                  Markup
                  Our cupcakes are ==organic, ==gluten-free==, vegan==, and made using only the most expensive ingredients.
                  Output

                  Our cupcakes are organic, gluten-free, vegan, and made using only the most expensive ingredients.

                  Links

                  You already know what a link is!

                  Markup
                  The [Game Boy] (en.wikipedia.org/wiki/Game_Boy) was my first video game system.
                  Output

                  The Game Boy was my first video game system.

                  A link consists of two parts: content and a URL.

                  To produce a link, simply enclose its content in square brackets or parentheses, then enclose its URL in square brackets or parentheses.

                  You can use mix and match either type of bracket—they're totally interchangeable.

                  Markup
                  - Buy [milk] (en.wikipedia.org/wiki/Milk)
                  -- Buy (bread) [en.wikipedia.org/wiki/Bread]
                  -- Buy [sugar] [en.wikipedia.org/wiki/Sugar]
                  -- Buy (happiness) (en.wikipedia.org/wiki/Happiness)
                  Output

                  As demonstrated above, you can omit a link's URL scheme.1 If you do, Up uses https:// for the URL scheme.

                  1
                  http:// and https:// are examples of URL schemes.

                  If you're a software developer using the Up library, you can specify a different default URL scheme. To learn more, see defaultUrlScheme (setting).

                  Other settings affecting links are:

                  Links with URLs containing spaces

                  If your link URL contains spaces, Up assumes you aren't actually trying to produce a link. So it avoids producing one!

                  Markup
                  Warlocked is the best game for GameBoy [sic] (other than Pokémon).
                  Output

                  Warlocked is the best game for GameBoy [sic] (other than Pokémon).

                  If your link URL really does contain spaces, you can make it clear that you intend to produce a link by omitting the space between your link's content and its URL.

                  Markup
                  I love the [music](duckduckgo.com/?q=chrono cross music) for Chrono Cross.
                  Output

                  I love the music for Chrono Cross.

                  When you omit the space between your link's content and its URL, Up always produces a link.

                  These rules also apply when Linkifying another writing convention.

                  Bare URLs

                  Alternatively, if you include a bare URL in your document, Up will automatically produce a link for you.

                  Markup
                  https://en.wikipedia.org/wiki/John_Carmack
                  Output

                  en.wikipedia.org/wiki/John_Carmack

                  Inline quotes

                  Up automatically recognizes quoted text.

                  If you want to quote more a few sentences, considering using Blockquotes.

                  Markup
                  "Only eat the green grapes," John said.
                  Output

                  Only eat the green grapes, John said.

                  You already know how to use quotation marks! Just keep doing what you're doing.

                  Like most inline writing conventions, inline quotes can be nested within themselves.

                  Markup
                  Bob replied, "Yesterday, Harvey yelled "I'll take the case!", but I doubt he will."
                  Output

                  Bob replied, Yesterday, Harvey yelled I'll take the case!, but I doubt he will.

                  Parenthetical text

                  Up automatically recognizes parenthetical text.

                  Markup
                  When I was ten years old, I left my home (in Pallet Town) to search for Pokémon.
                  Output

                  When I was ten years old, I left my home (in Pallet Town) to search for Pokémon.

                  Up understands that text enclosed within parentheses or square brackets represents supplemental content.

                  Example user input

                  Use the example user input convention to represent user input, including:

                  • Keys the user should press

                  • Buttons the user should click

                  • Menu items the user should access

                  Markup
                    Press {esc} to quit.
                  Output

                  Press esc to quit.

                  To indicate that text represents user input, enclose the text within curly brackets.

                  Up ignores any spaces separating the curly brackets from the content they enclose.

                  Markup
                  Press { Start Game } when you are ready.
                  Output

                  Press Start Game when you are ready.

                  Within example user input, most writing conventions are ignored. However, Typographical writing conventions are supported.

                  Inline code

                  Use the inline code convention to represent a small fragment of computer code.

                  When you need to represent more than a small fragment of computer code, use Code blocks instead.

                  Markup
                  In HTML, you probably shouldn't use the `<font>` element.
                  Output

                  In HTML, you probably shouldn't use the <font> element.

                  To produce inline code, enclose text within an equal number of backticks on either side. You can use any number of backticks—simply make sure both sides match.

                  Markup
                  In HTML, you probably shouldn't use the ``<font>`` element.
                  Output

                  In HTML, you probably shouldn't use the <font> element.

                  Within inline code, other writing conventions are ignored. Characters that normally have special meaning are preserved as plain text.

                  Markup
                  In Up, surround text with `*asterisks*` to emphasize it.
                  Output

                  In Up, surround text with *asterisks* to emphasize it.

                  Including backticks in your code

                  To include backticks within inline code, you can precede each backtick with a backslash.

                  Markup
                  `let output = \`score:\` + 5`
                  Output

                  let output = `score:` + 5

                  For more information about the behavior of backslashes, see Disabling special characters.

                  Alternatively, inline code can contain streaks of backticks that aren't exactly as long as the inline code's outer delimiters. No backslashes are necessary.

                  In this example, the delimiters are 1 backtick long, so the inline code can contain streaks of 2 backticks:

                  Markup
                  `let output = ``score:`` + 5`
                  Output

                  let output = ``score:`` + 5

                  In this example, the delimiters are 2 backticks long, so the inline code can contain streaks of 1 backtick:

                  Markup
                  ``let output = `score:` + 5``
                  Output

                  let output = `score:` + 5

                  Code starting or ending with backticks

                  If your inline code starts or ends with backticks, place a single space between the offending backticks and the outer delimiter. This single space is trimmed away.

                  In this example, the inline code both starts and ends with a backtick:

                  Markup
                  `` `inline_code` ``
                  Output

                  `inline_code`

                  Any spaces beyond that single space are preserved—if there are multiple spaces between the delimiter and the starting/ending backticks, only one space is trimmed away.

                  Markup
                  ``    `inline_code`    ``
                  Output

                  `inline_code`

                  Furthermore, that single space is only trimmed away when it's necessary to separate a delimiter from backticks in your inline code. If a given side of inline code has any non-space characters between the delimiter and the outermost backtick, no spaces are trimmed from that side.

                  Markup
                  `` (`inline_code`) ``
                  Output

                  (`inline_code`)

                  Headings

                  Use headings to introduce a new section in the document.

                  Markup
                  Example heading
                  -===============
                  Output

                  Example heading

                  If text is underlined, it's treated as a heading. The underline can consist of any combination of the following characters (you can mix and match):

                  • Hyphens: -

                  • Number signs: #

                  • Equal signs: =

                  • Plus signs: +

                  • Tildes: ~

                  • Colons: :

                  • Asterisks: *

                  • At signs: @

                  A heading's underline must be at least three characters long, but it does not need to be the same length as the text of the heading.

                  Markup
                  Example heading with a short underline
                  -===
                  Output

                  Example heading with a short underline

                  Heading levels

                  The first heading in a document is always a top-level heading. All subsequent headings with underlines consisting of the same characters are considered top-level.

                  The first heading with a different combination of underline characters is considered a second-level heading. Unsurprisingly, all subsequent headings with underlines consisting of the same characters are also considered second-level.

                  This process continues ad infinitum. Every new combination of heading underline characters introduces a new heading level. There is no limit to the number of heading levels in a document.

                  Headings with overlines

                  A heading can have an optional overline, but its overline must consist of the same combination of characters as its underline.

                  Markup
                  --------------------------------
                  -Example heading with an overline
                  ---------------------------------
                  Output

                  Example heading with an overline

                  For the purpose of determining heading levels, a heading with an overline is always considered distinct from a heading without one, even if both headings use the same combination of underline characters.

                  Therefore, a heading with an overline will never have the same level as a heading without an overline.

                  Section links

                  Use the section link convention to link to another section (heading) in your document.

                  Markup
                  Up even supports [topic: overlapping]!
                  Output

                  Up even supports Overlapping writing conventions!

                  To link to a heading, choose a unique snippet of markup from that heading's content line.2 Enclose that markup snippet within square brackets or parentheses, then insert topic: or section: directly inside your opening bracket.

                  2
                  Don't worry about the heading's underline or overline! Section links ignore both.

                  Up automatically matches your snippet to the most appropriate heading, then produces a link for you.

                  Matching the most appropriate heading

                  Initially, Up tries to match your section link to the first heading whose content line's markup exactly matches your snippet.3 If there isn't an exact match, Up matches your section link to the first heading whose content line markup contains your snippet.

                  3
                  Up totally ignores the capitalization of section links' markup snippets, so a section link and a heading can be an exact match without being capitalized the same way.

                  Footnotes

                  Use the footnote convention for asides or citations—anything you want to say without breaking the flow of a paragraph.

                  Footnotes are automatically extracted into blocks for you.

                  Markup
                  Warlocked [^ No relation to Warcraft!] is a real-time strategy game.
                  Output

                  Warlocked4 is a real-time strategy game.

                  4
                  No relation to Warcraft!

                  To produce a footnote, enclose its content within parentheses or square brackets. Then, insert a caret ^ directly after your opening bracket.

                  Media

                  Up allows you to embed Images, Video, or Audio in your document.

                  Images

                  Markup
                  [image: Super Mario Land box art] (i.imgur.com/TxlFlkX.jpg)
                  Output
                  Super Mario Land box art

                  If you want to link your image to another page, please see Linkifying another writing convention.

                  Video

                  Markup
                  [video: Professor Leonard] (i.imgur.com/32fBpnh.mp4)
                  Output

                  Audio

                  Markup
                  [audio: Sadness theme from Infinity for Game Boy] (a.clyp.it/ybct5hcl.mp3)
                  Output

                  Syntax

                  To embed media in your document, simply enclose its description in square brackets or parentheses, then enclose its URL in square brackets or parentheses.

                  You can use mix and match either type of bracket—they're totally interchangeable.

                  Media descriptions

                  Media descriptions always start with image:, audio:, or video:, depending on the type of media you wish to include.

                  Within media descriptions, most writing conventions are ignored. However, Typographical writing conventions are supported.

                  Media URLs

                  As demonstrated above, you can omit the URL scheme for media URLs. If you do, Up uses https:// for the URL scheme.

                  If you're a software developer using the Up library, you can specify a different default URL scheme. To learn more, see defaultUrlScheme (setting).

                  Other settings affecting media are:

                  Revealable content

                  Both Inline revealables and Revealable blocks recognize any of the following keywords:

                  • spoiler

                  • nsfw

                  • nsfl

                  • revealable

                  Like all keywords in Up, you can capitalize them however you want.

                  Inline revealables

                  Use the inline revealable convention to hide content within a paragraph.

                  When you want to hide more than a sentence or two, use Revealable blocks instead.

                  Markup
                  At the end of Pokémon Red, [SPOILER: you battle your rival] before the credits roll.
                  Output

                  At the end of Pokémon Red, you battle your rival before the credits roll.

                  To hide content within a paragraph, first enclose that content within square brackets or parentheses.

                  Then, directly inside your opening bracket, insert one of the revealable keywords followed by a colon: spoiler:, nsfw:, nsfl:, or revealable:.

                  Inline revealables can contain any inline writing convention.

                  Revealable blocks

                  Use revealable block convention to hide a block of content.

                  When you want to hide content within a paragraph, use Inline revealables instead.

                  Markup
                  SPOILER:
                  -  After defeating the Elite Four at the end of Pokémon Red, you still have to battle your rival one last time.
                  -
                  -  Your rival's specific lineup depends on the Pokémon you selected at the beginning of the game. However, his first three Pokémon are always the same:
                  -
                  -  1. Pidgeot
                  -  2. Alakazam
                  -  3. Rhydon
                  Output

                  After defeating the Elite Four at the end of Pokémon Red, you still have to battle your rival one last time.

                  Your rival's specific lineup depends on the Pokémon you selected at the beginning of the game. However, his first three Pokémon are always the same:

                  1. Pidgeot

                  2. Alakazam

                  3. Rhydon

                  To hide a block of content, first indent it two spaces (or a tab).

                  Then, on the line before your indented block, put one of the revealable keywords: spoiler, nsfw, nsfl, or revealable.

                  In the example above, the chosen revealable keyword (spoiler) is followed by a colon. The colon is optional.

                  Blockquotes

                  Use the blockquote convention to quote a large section of text.

                  For typical dialog, you should probably use Inline quotes instead.

                  Markup
                  > I hate oranges for the following reasons:
                  ->
                  -> 1. They're not apples.
                  -> 2. They're not bananas.
                  Output

                  I hate oranges for the following reasons:

                  1. They're not apples.

                  2. They're not bananas.

                  A blockquote consists of consecutive lines starting with > (a greater-than symbol followed by a space).

                  Blockquotes can contain any outline writing convention, including other blockquotes.

                  Markup
                  > Thank you for replying to my blog!
                  ->
                  -> > I hate oranges for the following reasons:
                  -> >
                  -> > 1. They're not apples.
                  -> > 2. They're not bananas.
                  ->
                  -> I completely understand.
                  Output

                  Thank you for replying to my blog!

                  I hate oranges for the following reasons:

                  1. They're not apples.

                  2. They're not bananas.

                  I completely understand.

                  Thematic breaks

                  Use the thematic break convention to represent a change of subject.

                  A thematic break can be represented by 3 or more consecutive blank lines.

                  Markup
                  I vowed never to eat apples again.
                  -
                  -
                  -
                  -By mid-March, a second flock of birds had moved into my dining room.
                  Output

                  I vowed never to eat apples again.


                  By mid-March, a second flock of birds had moved into my dining room.

                  A thematic break can also be represented by a line consisting of 3 or more of the following characters:

                  • Hyphens: -

                  • Number signs: #

                  • Equal signs: =

                  • Plus signs: +

                  • Tildes: ~

                  • Colons: :

                  • Asterisks: *

                  • At signs: @

                  You can use any combination of those characters!

                  Markup
                  I vowed never to eat apples again.
                  -
                  -#=*=*=*=*=*=*=*=*=*=#
                  -
                  -By mid-March, a second flock of birds had moved into my dining room.
                  Output

                  I vowed never to eat apples again.


                  By mid-March, a second flock of birds had moved into my dining room.

                  Bulleted lists

                  You already know what a bulleted list is!

                  Markup
                  - Buy milk
                  -- Buy bread
                  -- Buy happiness
                  Output
                  • Buy milk

                  • Buy bread

                  • Buy happiness

                  Bullets

                  In a bulleted list, each item starts with a bullet character followed by a space. The following characters can serve as a bullet:

                  • A hyphen: -

                  • An asterisk: *

                  • An actual bullet character:

                  Spacing between list items

                  Each bulleted list item can be followed by a single blank line.

                  Markup
                  - Buy milk
                  -
                  -- Buy bread
                  -
                  -- Buy happiness
                  Output
                  • Buy milk

                  • Buy bread

                  • Buy happiness

                  On the other hand, if a list item is followed by 2 blank lines, it marks the end of the list.

                  Markup
                  - Buy milk
                  -- Buy bread
                  -
                  -
                  -- Fix squeaky cabinet
                  -- Fix self-esteem
                  Output
                  • Buy milk

                  • Buy bread

                  • Fix squeaky cabinet

                  • Fix self-esteem

                  List items consisting of multiple lines

                  List items aren't limited to a single line! Bulleted lists can contain any outline writing convention, including other bulleted lists.

                  If your list item contains more than one line, subsequent lines should be indented 2 spaces (or a tab).

                  Markup
                  - Buy milk.
                  -
                  -  If whole milk is on sale, buy that. Otherwise, buy 2%.
                  -
                  -- Buy bread.
                  -
                  -  Only buy bread from one of the following brands:
                  -
                  -  * Little Northern Bakehouse
                  -  * Udi's
                  -  * Canyon Bakehouse
                  -
                  -- Buy happiness.
                  -
                  -  Don't spend more than a few cents on this.
                  Output
                  • Buy milk.

                    If whole milk is on sale, buy that. Otherwise, buy 2%.

                  • Buy bread.

                    Only buy bread from one of the following brands:

                    • Little Northern Bakehouse

                    • Udi's

                    • Canyon Bakehouse

                  • Buy happiness.

                    Don't spend more than a few cents on this. Not worth it.

                  Numbered lists

                  You already know what a numbered list is!

                  Markup
                  1. Buy milk
                  -2. Buy bread
                  -3. Buy happiness
                  Output
                  1. Buy milk

                  2. Buy bread

                  3. Buy happiness

                  Numbered lists are nearly identical to Bulleted lists—the only difference is that numbered list items have ordinals, not bullets.

                  The ordinal for a numbered list item can be expressed several ways:

                  • An integer followed by a period: 1.

                  • An integer followed by a closing parenthesis: 1)

                  • A number sign: #

                  • A number sign followed by a period: #.

                  • A number sign followed by a closing parenthesis: #)

                  Like each bullet in a bulleted list, each ordinal in a numbered list must be followed by a space.

                  Lists starting at a specific number

                  Numbered lists don't have to start at 1.

                  Markup
                  3) March
                  -#) April
                  -#) May
                  Output
                  1. March

                  2. April

                  3. May

                  Lists in descending order

                  Up automatically recognizes when a numbered list is in descending order.

                  If a numbered list has at least two items with integer ordinals (as opposed to number signs), and if the first integer is greater than the second, Up considers the list to be in descending order.

                  Markup
                  3) Buy milk
                  -2) Buy bread
                  -#) Buy happiness
                  Output
                  1. Buy milk

                  2. Buy bread

                  3. Buy happiness

                  Single-item numbered lists

                  Like bulleted lists, numbered lists can consist of a single item.

                  Markup
                  1) Buy milk
                  Output
                  1. Buy milk

                  There's a small exception to this rule: If your list item's ordinal is expressed as an integer followed by a period (e.g. 1.), you must have more than one list item. This exception helps prevent accidental numbered lists.

                  Markup
                  1783. Not a good year for Great Britain.
                  Output

                  1783. Not a good year for Great Britain.

                  Description lists

                  Use description lists represent a collection of subjects and their descriptions.

                  You can use description lists for:

                  • Terms and definitions

                  • Questions and answers

                  • Any collection of subjects and descriptions!

                  Markup
                  Kirby's Dreamland
                  -  A video game about a flying marshmallow.
                  -
                  -Super Mario Land
                  -  A video game about a jumping plumber.
                  Output
                  Kirby's Dreamland

                  A video game about a flying marshmallow.

                  Super Mario Land

                  A video game about a jumping plumber.

                  Every item in a description list consists of two parts:

                  1. One or more subjects

                  2. A single description of those subjects

                  Subjects

                  Subjects can contain any inline writing convention.

                  Markup
                  `<ol>`
                  -  An HTML element representing numbered lists.
                  -
                  -`<ul>`
                  -  An HTML element representing bulleted lists.
                  Output
                  <ol>

                  An HTML element representing numbered lists.

                  <ul>

                  An HTML element representing bulleted lists.

                  When there is more than one subject for a given description, they should be listed consecutively, one subject per line.

                  Markup
                  Game Boy Light
                  -Game Boy Pocket
                  -Game Boy Color
                  -  Handheld videogame systems released by Nintendo in the 1990s.
                  Output
                  Game Boy Light
                  Game Boy Pocket
                  Game Boy Color

                  Handheld videogame systems released by Nintendo in the 1990s.

                  Descriptions

                  Each description follows the subjects it describes.

                  Descriptions are indented 2 spaces (or a tab). They can contain any outline writing convention, including other description lists.

                  Markup
                  Bulbasaur
                  -  A plant Pokémon with a bulb growing from its back.
                  -
                  -  Height
                  -    0.7 m
                  -  Weight
                  -    6.9 kg
                  -
                  -Charmander
                  -  A fire Pokémon with a flame on its tail.
                  -
                  -  Height
                  -    0.6 m
                  -  Weight
                  -    8.5 kg
                  Output
                  Bulbasaur

                  A plant Pokémon with a bulb growing from its back.

                  Height

                  0.7 m

                  Weight

                  6.9 kg

                  Charmander

                  A fire Pokémon with a flame on its tail.

                  Height

                  0.6 m

                  Weight

                  8.5 kg

                  Each description may be followed by an optional blank line. If a description is followed by two blank lines, it marks the end of the description list.

                  Markup
                  Lime
                  -  A green fruit.
                  -Strawberry
                  -  A red fruit.
                  -
                  -
                  -Bulbasaur
                  -  A green Pokémon.
                  -Charmander
                  -  A red Pokémon.
                  Output
                  Lime

                  A green fruit.

                  Strawberry

                  A red fruit.

                  Bulbasaur

                  A green Pokémon.

                  Charmander

                  A red Pokémon.

                  Tables

                  You already know what a table is! Use tables to display rows of data organized into columns.

                  Markup
                  Table: Moves learned by the Pokémon Bulbasaur
                  -
                  -Move;         Type;     Power;  Accuracy
                  -
                  -Tackle;       Normal;   50;     100%
                  -Growl;        Normal;   ;       100%
                  -Leech Seed;   Grass;    ;       90%
                  -Vine Whip;    Grass;    45;     100%
                  Output
                  Moves learned by the Pokémon Bulbasaur
                  MoveTypePowerAccuracy
                  TackleNormal50100%
                  GrowlNormal100%
                  Leech SeedGrass90%
                  Vine WhipGrass45100%

                  A table consists of:

                  • An optional caption, representing the table's title

                  • A header row, describing each column

                  • Content rows, representing the actual data

                  • An optional header column, describing each row

                  Table cells are separated by semicolons. To learn more, see Cells.

                  Our examples use extra spaces to align cells. This makes our markup more readable, but it's strictly optional! If you want, you can squish your cells together, as long as any empty cells contain at least one space. To learn more, please see Empty cells.

                  Squished markup
                  Table: My favorite fruits
                  -
                  -Fruit;Color;Taste
                  -
                  -Lime;Green;Sour
                  -Lemon;Yellow;Sour
                  -Banana;Yellow;Sweet
                  Output
                  My favorite fruits
                  FruitColorTaste
                  LimeGreenSour
                  LemonYellowSour
                  BananaYellowSweet

                  The caption

                  The text after Table: is treated as the table's caption. Captions can contain any inline writing convention.

                  Markup
                  Table: My favorite [fruits] (en.wikipedia.org/wiki/Fruit)
                  -
                  -Fruit;      Color;      Taste
                  -
                  -Lime;       Green;      Sour
                  -Lemon;      Yellow;     Sour
                  -Banana;     Yellow;     Sweet
                  Output
                  My favorite fruits
                  FruitColorTaste
                  LimeGreenSour
                  LemonYellowSour
                  BananaYellowSweet

                  Captions are strongly encouraged, but they're not required. To create a table without a caption, simply put Table on its own line.

                  Markup
                  Table
                  -
                  -Fruit;      Color;      Taste
                  -
                  -Lime;       Green;      Sour
                  -Lemon;      Yellow;     Sour
                  -Banana;     Yellow;     Sweet
                  Output
                  FruitColorTaste
                  LimeGreenSour
                  LemonYellowSour
                  BananaYellowSweet

                  Cells

                  Table cells are separated by semicolons. If you want to include a semicolon in a cell, simply put a backslash before it. To learn more, see Disabling special characters.

                  Markup
                  Table: My favorite fruits
                  -
                  -Fruit;      Reason for liking
                  -
                  -Apples;     Easy to eat\; stylish
                  -Grapes;     Each grape is very cheap
                  -Oranges;    The color orange is nice
                  Output
                  My favorite fruits
                  FruitReason for liking
                  ApplesEasy to eat; stylish
                  GrapesEach grape is very cheap
                  OrangesThe color orange is nice

                  Cells spanning multiple columns

                  If you want a cell to span two columns, terminate that cell with two semicolons.

                  Markup
                  Table: My favorite fruits
                  -
                  -Fruit;      Color;      Taste
                  -
                  -Lime;       Green;      Sour
                  -Orange;;                Sweet and tart
                  -Banana;     Yellow;     Sweet
                  Output
                  My favorite fruits
                  FruitColorTaste
                  LimeGreenSour
                  OrangeSweet and tart
                  BananaYellowSweet

                  Likewise, if you want a cell to span six columns, terminate that cell with six semicolons.

                  Empty cells

                  A cell consisting solely of spaces (one or more) is considered empty.

                  Normally, you have to put at least one space in the cell, because consecutive semicolons indicate that you want the previous cell to span multiple columns.

                  However, to indicate that the first cell in a row should be empty, simply start that row with a semicolon. You don't need to put any spaces before it.

                  Markup
                  Table: Games in the Chrono series
                  -
                  -Release Date;       Game;
                  -
                  -March 11, 1995;     Chrono Trigger
                  -November 18, 1999;  Chrono Cross
                  -;                   Chrono Break
                  Output
                  Games in the Chrono series
                  Release DateGame
                  March 11, 1995Chrono Trigger
                  November 18, 1999Chrono Cross
                  Chrono Break

                  Likewise, to indicate that the last cell in a row should be empty, simply end that row with a semicolon. You don't need to add any spaces after it.

                  Markup
                  Table: Games in the Chrono series
                  -
                  -Game;               Release Date
                  -
                  -Chrono Trigger;     March 11, 1995
                  -Chrono Cross;       November 18, 1999
                  -Chrono Break;
                  Output
                  Games in the Chrono series
                  GameRelease Date
                  Chrono TriggerMarch 11, 1995
                  Chrono CrossNovember 18, 1999
                  Chrono Break

                  The header row

                  The header defines each column in the table.

                  The single blank lines before and after the header are not required.

                  Markup
                  Table: Moves learned by the Pokémon Bulbasaur
                  -Move;         Type;     Power;  Accuracy
                  -Tackle;       Normal;   50;     100%
                  -Growl;        Normal;   ;       100%
                  -Leech Seed;   Grass;    ;       90%
                  -Vine Whip;    Grass;    45;     100%
                  Output
                  Moves learned by the Pokémon Bulbasaur
                  MoveTypePowerAccuracy
                  TackleNormal50100%
                  GrowlNormal100%
                  Leech SeedGrass90%
                  Vine WhipGrass45100%

                  Cells in a table's header can contain any inline writing convention.

                  Content rows

                  The content rows of a table follow its header row. The content rows contain the table's actual data.

                  If a content row is followed by a blank line, it ends the table.

                  Markup
                  Table: Moves learned by the Pokémon Bulbasaur
                  -
                  -Move;         Type;     Power;  Accuracy
                  -
                  -Tackle;       Normal;   50;     100%
                  -Growl;        Normal;   ;       100%
                  -Leech Seed;   Grass;    ;       90%
                  -Vine Whip;    Grass;    45;     100%
                  -
                  -I love Bulbasaur!
                  -
                  Output
                  Moves learned by the Pokémon Bulbasaur
                  MoveTypePowerAccuracy
                  TackleNormal50100%
                  GrowlNormal100%
                  Leech SeedGrass90%
                  Vine WhipGrass45100%

                  I love Bulbasaur!

                  Content row cells can contain any inline writing convention.

                  Including a header column in your table

                  To indicate your table has a header column, simply indent its header row at least two spaces (or a tab).

                  When you indent a table's the header row, Up automatically treats the first cell in each subsequent row as the header column.

                  Markup
                  Table: Moves learned by the Pokémon Bulbasaur
                  -
                  -              Type;     Power;  Accuracy
                  -
                  -Tackle;       Normal;   50;     100%
                  -Growl;        Normal;   ;       100%
                  -Leech Seed;   Grass;    ;       90%
                  -Vine Whip;    Grass;    45;     100%
                  Output
                  Moves learned by the Pokémon Bulbasaur
                  TypePowerAccuracy
                  TackleNormal50100%
                  GrowlNormal100%
                  Leech SeedGrass90%
                  Vine WhipGrass45100%

                  When your table has a header column, Up automatically inserts an extra blank cell at the beginning of the header row in the top level corner, above the header column.

                  Code blocks

                  Use the code block convention to represent a block of computer code.

                  When you need to represent only a small fragment of computer code, consider using Inline code instead.

                  Markup
                  ```
                  -function nthFibonacci(n: number): number {
                  -  return n <= 2
                  -    ? n - 1
                  -    : nthFibonacci(n - 1) + nthFibonacci(n - 2)
                  -}
                  -```
                  Output
                  function nthFibonacci(n: number): number {
                  -  return n <= 2
                  -    ? n - 1
                  -    : nthFibonacci(n - 1) + nthFibonacci(n - 2)
                  -}

                  Code blocks are surrounded (underlined and overlined) by matching streaks of 3 or more backticks.

                  If there is no matching end streak, the code block extends to the end of the document (or to the end of the current outline writing convention, if the code block is nested within one).

                  Within a code block, indentation is preserved, and every single character is treated literally. No other writing conventions are recognized, which means code blocks don't support Disabling special characters.

                  Including streaks of backticks

                  Code blocks can contain streaks of backticks that aren't exactly as long as the enclosing streaks.

                  Markup
                  ``````
                  -A code block:
                  -
                  +
                  +
                  +
                  +  
                  +  
                  +  What's Up?
                  +  
                  +
                  +
                  +
                  +  
                  +
                  + + Show table of contents + + + Hide table of contents + +
                  + +
                  +

                  What's Up?

                  Up is a markup language for writing structured documents in plain text.

                  For software developers, Up offers a software library that converts Up markup into HTML. To learn more, please see Using the Up library.


                  Why use Up?

                  Up isn't the only markup language that produces HTML. What makes it special?

                  Up has a flexible, forgiving syntax

                  Up recognizes Numbered lists that count backwards.

                  Markup
                  3) Buy milk
                  +2) Buy bread
                  +#) Buy happiness
                  
                  Output
                  1. Buy milk

                  2. Buy bread

                  3. Buy happiness

                  Up usually ignores Excessive delimiter characters.

                  For example, you don't need to perfectly balance asterisks when stressing or emphasizing text.

                  Markup
                  I ***love****** asterisks!
                  
                  Output

                  I love asterisks!

                  Up isn't picky about which brackets you use for Links.

                  Markup
                  - Buy [milk] (en.wikipedia.org/wiki/Milk)
                  +- Buy (bread) [en.wikipedia.org/wiki/Bread]
                  +- Buy [sugar] [en.wikipedia.org/wiki/Sugar]
                  +- Buy (happiness) (en.wikipedia.org/wiki/Happiness)
                  
                  Output

                  Up even supports Overlapping writing conventions!

                  Markup
                  John **enjoys ==sleeping** late== whenever he can.
                  
                  Output

                  John enjoys sleeping late whenever he can.

                  Up uses customizable keywords

                  Too many markup languages devolve into a dense soup of symbols and punctuation.

                  When a keyword would provide more clarity than a symbol, Up takes advantage of that! Several writing conventions, including Tables and Revealable content, incorporate keywords.

                  If you're a software developer using the Up library, you can provide multiple custom variations for each keyword. To learn more, please see Customizing keywords.

                  Up produces fully accessible HTML

                  From the table of contents to the last movie-ruining spoiler, Up produces fully accessible HTML. This means people who have trouble viewing a screen or a using mouse can enjoy every document.


                  Why not use Up?

                  You want a rich ecosystem of tools

                  So far, there is only one software library for Up, written and maintained by a single person. In contrast, other markup languages have countless tools and plugins.

                  You need speed

                  Up is not terribly slow, but it's not terribly fast, either—at least not yet! If you need instant, real-time parsing and rendering of large documents, Up isn't the best markup language for you.


                  Writing conventions

                  Don't get lost! The following terms are occasionally used throughout this section.

                  Writing convention

                  Any special annotation or formatting recognized by Up.

                  Inline writing convention

                  Any writing convention that can be used within paragraphs. This includes Emphasis and Highlighting.

                  Outline writing convention

                  Any non-inline writing convention. This includes Paragraphs and Tables.

                  Paragraphs

                  Paragraphs are the simplest writing convention in Up.

                  Markup
                  Unlike regular dental floss, you can use floss picks even if you're not a trained dental hygienist.
                  +
                  +Floss picks are sold in stylish, resealable plastic bags. You have no excuse not to buy some today.
                  
                  Output

                  Unlike regular dental floss, you can use floss picks even if you're not a trained dental hygienist.

                  Floss picks are sold in stylish, resealable plastic bags. You have no excuse not to buy some today.

                  To produce a paragraph, write a line of text. That's all there is to it!

                  Typically, paragraphs are separated by one or two blank lines. Three or more blank lines between paragraphs indicates a meaningful change of subject. To learn more, see Thematic breaks.

                  In contrast, consecutive non-blank lines produce Line blocks, not consecutive paragraphs.

                  Line blocks

                  Use the line block convention for addresses, lyrics, or anything consisting of lines instead of actual Paragraphs.

                  Markup
                  Have you read my new poem?
                  +
                  +Roses are red
                  +Violets *aren't* blue
                  +Lyrics have lines
                  +And addresses do, too
                  +
                  +Poetry is just too easy.
                  
                  Output

                  Have you read my new poem?

                  Roses are red
                  Violets aren't blue
                  Lyrics have lines
                  And addresses do, too

                  Poetry is just too easy.

                  Consecutive non-blank lines produce a line block, unless those lines represent another writing convention, like Numbered lists.

                  Emphasis

                  Use the emphasis convention to emphasize a word or phrase.

                  If the reader should pronounce a word or phrase differently (e.g. to indicate contrast or sarcasm), consider emphasizing it.

                  Markup
                  Only eat the *green* grapes. The red grapes are for Pikachu.
                  
                  Output

                  Only eat the green grapes. The red grapes are for Pikachu.

                  To emphasize text, enclose it within single asterisks.

                  Like most inline writing conventions, emphasis can be nested within itself.

                  Markup
                  John really, *really, *really** hates Red Delicious apples.
                  
                  Output

                  John really, really, really hates Red Delicious apples.

                  Stress

                  Use the stress convention to indicate a word or phrase is particularly important.

                  If the reader should raise their voice while reading a word or phrase, consider stressing it.

                  Markup
                  Do **not** step on the dinosaur!
                  
                  Output

                  Do not step on the dinosaur!

                  To stress text, enclose it within double asterisks.

                  Like most inline writing conventions, stress can be nested within itself.

                  Markup
                  John really, **really, **really**** hates Red Delicious apples.
                  
                  Output

                  John really, really, really hates Red Delicious apples.

                  Italics

                  Use the italic convention to stylistically offset a word or phrase from the surrounding text without conveying emphasis. The titles of books and movies should probably be italicized.

                  If you want to emphasize text, see Emphasis.

                  Markup
                  My favorite video game is _Chrono Cross_.
                  
                  Output

                  My favorite video game is Chrono Cross.

                  To italicize text, enclose it within single underscores.

                  Like most inline writing conventions, italicized text can be nested within itself.

                  Markup
                  My favorite show is _Real Recipes _Redux_: Super Suppers_.
                  
                  Output

                  My favorite show is Real Recipes Redux: Super Suppers.

                  Bold

                  Typically, people use bold text to convey extra importance—that's what the Stress convention is for!

                  To make a word or phrase bold without conveying any extra importance, use the plain old bold convention.

                  Markup
                  Has anyone actually used __KABOOM__ cleaning products?
                  
                  Output

                  Has anyone actually used KABOOM cleaning products?

                  To make text bold, enclose it within double underscores.

                  Like most inline writing conventions, bold text can be nested within itself.

                  Markup
                  We've all seen the ads.
                  +
                  +__No hard scrubbing! __KABOOM__... and the stains are gone!__
                  
                  Output

                  We've all seen the ads.

                  No hard scrubbing! KABOOM… and the stains are gone!

                  Highlighting

                  To draw attention to text without altering its semantics, using the highlighting convention.

                  Highlighting should not be used to emphasize or stress text! If that's your purpose, see Emphasis or Stress.

                  Markup
                  Our cupcakes are organic, ==gluten-free==, and made using only the most expensive ingredients.
                  
                  Output

                  Our cupcakes are organic, gluten-free, and made using only the most expensive ingredients.

                  To highlight text, enclose it within two or more equal signs.

                  Like most inline writing conventions, highlighting can be nested within itself.

                  Markup
                  Our cupcakes are ==organic, ==gluten-free==, vegan==, and made using only the most expensive ingredients.
                  
                  Output

                  Our cupcakes are organic, gluten-free, vegan, and made using only the most expensive ingredients.

                  Links

                  You already know what a link is!

                  Markup
                  The [Game Boy] (en.wikipedia.org/wiki/Game_Boy) was my first video game system.
                  
                  Output

                  The Game Boy was my first video game system.

                  A link consists of two parts: content and a URL.

                  To produce a link, simply enclose its content in square brackets or parentheses, then enclose its URL in square brackets or parentheses.

                  You can use mix and match either type of bracket—they're totally interchangeable.

                  Markup
                  - Buy [milk] (en.wikipedia.org/wiki/Milk)
                  +- Buy (bread) [en.wikipedia.org/wiki/Bread]
                  +- Buy [sugar] [en.wikipedia.org/wiki/Sugar]
                  +- Buy (happiness) (en.wikipedia.org/wiki/Happiness)
                  
                  Output

                  As demonstrated above, you can omit a link's URL scheme.1 If you do, Up uses https:// for the URL scheme.

                  1
                  http:// and https:// are examples of URL schemes.

                  If you're a software developer using the Up library, you can specify a different default URL scheme. To learn more, see defaultUrlScheme (setting).

                  Other settings affecting links are:

                  Links with URLs containing spaces

                  If your link URL contains spaces, Up assumes you aren't actually trying to produce a link. So it avoids producing one!

                  Markup
                  Warlocked is the best game for GameBoy [sic] (other than Pokémon).
                  
                  Output

                  Warlocked is the best game for GameBoy [sic] (other than Pokémon).

                  If your link URL really does contain spaces, you can make it clear that you intend to produce a link by omitting the space between your link's content and its URL.

                  Markup
                  I love the [music](duckduckgo.com/?q=chrono cross music) for Chrono Cross.
                  
                  Output

                  I love the music for Chrono Cross.

                  When you omit the space between your link's content and its URL, Up always produces a link.

                  These rules also apply when Linkifying another writing convention.

                  Bare URLs

                  Alternatively, if you include a bare URL in your document, Up will automatically produce a link for you.

                  Markup
                  https://en.wikipedia.org/wiki/John_Carmack
                  
                  Output

                  en.wikipedia.org/wiki/John_Carmack

                  Inline quotes

                  Up automatically recognizes quoted text.

                  If you want to quote more a few sentences, considering using Blockquotes.

                  Markup
                  "Only eat the green grapes," John said.
                  
                  Output

                  Only eat the green grapes, John said.

                  You already know how to use quotation marks! Just keep doing what you're doing.

                  Like most inline writing conventions, inline quotes can be nested within themselves.

                  Markup
                  Bob replied, "Yesterday, Harvey yelled "I'll take the case!", but I doubt he will."
                  
                  Output

                  Bob replied, Yesterday, Harvey yelled I'll take the case!, but I doubt he will.

                  Parenthetical text

                  Up automatically recognizes parenthetical text.

                  Markup
                  When I was ten years old, I left my home (in Pallet Town) to search for Pokémon.
                  
                  Output

                  When I was ten years old, I left my home (in Pallet Town) to search for Pokémon.

                  Up understands that text enclosed within parentheses or square brackets represents supplemental content.

                  Example user input

                  Use the example user input convention to represent user input, including:

                  • Keys the user should press

                  • Buttons the user should click

                  • Menu items the user should access

                  Markup
                    Press {esc} to quit.
                  
                  Output

                  Press esc to quit.

                  To indicate that text represents user input, enclose the text within curly brackets.

                  Up ignores any spaces separating the curly brackets from the content they enclose.

                  Markup
                  Press { Start Game } when you are ready.
                  
                  Output

                  Press Start Game when you are ready.

                  Within example user input, most writing conventions are ignored. However, Typographical writing conventions are supported.

                  Inline code

                  Use the inline code convention to represent a small fragment of computer code.

                  When you need to represent more than a small fragment of computer code, use Code blocks instead.

                  Markup
                  In HTML, you probably shouldn't use the `<font>` element.
                  
                  Output

                  In HTML, you probably shouldn't use the <font> element.

                  To produce inline code, enclose text within an equal number of backticks on either side. You can use any number of backticks—simply make sure both sides match.

                  Markup
                  In HTML, you probably shouldn't use the ``<font>`` element.
                  
                  Output

                  In HTML, you probably shouldn't use the <font> element.

                  Within inline code, other writing conventions are ignored. Characters that normally have special meaning are preserved as plain text.

                  Markup
                  In Up, surround text with `*asterisks*` to emphasize it.
                  
                  Output

                  In Up, surround text with *asterisks* to emphasize it.

                  Including backticks in your code

                  To include backticks within inline code, you can precede each backtick with a backslash.

                  Markup
                  `let output = \`score:\` + 5`
                  
                  Output

                  let output = `score:` + 5

                  For more information about the behavior of backslashes, see Disabling special characters.

                  Alternatively, inline code can contain streaks of backticks that aren't exactly as long as the inline code's outer delimiters. No backslashes are necessary.

                  In this example, the delimiters are 1 backtick long, so the inline code can contain streaks of 2 backticks:

                  Markup
                  `let output = ``score:`` + 5`
                  
                  Output

                  let output = ``score:`` + 5

                  In this example, the delimiters are 2 backticks long, so the inline code can contain streaks of 1 backtick:

                  Markup
                  ``let output = `score:` + 5``
                  
                  Output

                  let output = `score:` + 5

                  Code starting or ending with backticks

                  If your inline code starts or ends with backticks, place a single space between the offending backticks and the outer delimiter. This single space is trimmed away.

                  In this example, the inline code both starts and ends with a backtick:

                  Markup
                  `` `inline_code` ``
                  
                  Output

                  `inline_code`

                  Any spaces beyond that single space are preserved—if there are multiple spaces between the delimiter and the starting/ending backticks, only one space is trimmed away.

                  Markup
                  ``    `inline_code`    ``
                  
                  Output

                  `inline_code`

                  Furthermore, that single space is only trimmed away when it's necessary to separate a delimiter from backticks in your inline code. If a given side of inline code has any non-space characters between the delimiter and the outermost backtick, no spaces are trimmed from that side.

                  Markup
                  `` (`inline_code`) ``
                  
                  Output

                  (`inline_code`)

                  Headings

                  Use headings to introduce a new section in the document.

                  Markup
                  Example heading
                  +===============
                  
                  Output

                  Example heading

                  If text is underlined, it's treated as a heading. The underline can consist of any combination of the following characters (you can mix and match):

                  • Hyphens: -

                  • Number signs: #

                  • Equal signs: =

                  • Plus signs: +

                  • Tildes: ~

                  • Colons: :

                  • Asterisks: *

                  • At signs: @

                  A heading's underline must be at least three characters long, but it does not need to be the same length as the text of the heading.

                  Markup
                  Example heading with a short underline
                  +===
                  
                  Output

                  Example heading with a short underline

                  Heading levels

                  The first heading in a document is always a top-level heading. All subsequent headings with underlines consisting of the same characters are considered top-level.

                  The first heading with a different combination of underline characters is considered a second-level heading. Unsurprisingly, all subsequent headings with underlines consisting of the same characters are also considered second-level.

                  This process continues ad infinitum. Every new combination of heading underline characters introduces a new heading level. There is no limit to the number of heading levels in a document.

                  Headings with overlines

                  A heading can have an optional overline, but its overline must consist of the same combination of characters as its underline.

                  Markup
                  --------------------------------
                  +Example heading with an overline
                  +--------------------------------
                  
                  Output

                  Example heading with an overline

                  For the purpose of determining heading levels, a heading with an overline is always considered distinct from a heading without one, even if both headings use the same combination of underline characters.

                  Therefore, a heading with an overline will never have the same level as a heading without an overline.

                  Section links

                  Use the section link convention to link to another section (heading) in your document.

                  Markup
                  Up even supports [topic: overlapping]!
                  
                  Output

                  Up even supports Overlapping writing conventions!

                  To link to a heading, choose a unique snippet of markup from that heading's content line.2 Enclose that markup snippet within square brackets or parentheses, then insert topic: or section: directly inside your opening bracket.

                  2
                  Don't worry about the heading's underline or overline! Section links ignore both.

                  Up automatically matches your snippet to the most appropriate heading, then produces a link for you.

                  Matching the most appropriate heading

                  Initially, Up tries to match your section link to the first heading whose content line's markup exactly matches your snippet.3 If there isn't an exact match, Up matches your section link to the first heading whose content line markup contains your snippet.

                  3
                  Up totally ignores the capitalization of section links' markup snippets, so a section link and a heading can be an exact match without being capitalized the same way.

                  Footnotes

                  Use the footnote convention for asides or citations—anything you want to say without breaking the flow of a paragraph.

                  Footnotes are automatically extracted into blocks for you.

                  Markup
                  Warlocked [^ No relation to Warcraft!] is a real-time strategy game.
                  
                  Output

                  Warlocked4 is a real-time strategy game.

                  4
                  No relation to Warcraft!

                  To produce a footnote, enclose its content within parentheses or square brackets. Then, insert a caret ^ directly after your opening bracket.

                  Media

                  Up allows you to embed Images, Video, or Audio in your document.

                  Images

                  Markup
                  [image: Super Mario Land box art] (i.imgur.com/TxlFlkX.jpg)
                  
                  Output
                  Super Mario Land box art

                  If you want to link your image to another page, please see Linkifying another writing convention.

                  Video

                  Markup
                  [video: Professor Leonard] (i.imgur.com/32fBpnh.mp4)
                  
                  Output

                  Audio

                  Markup
                  [audio: Sadness theme from Infinity for Game Boy] (a.clyp.it/ybct5hcl.mp3)
                  
                  Output

                  Syntax

                  To embed media in your document, simply enclose its description in square brackets or parentheses, then enclose its URL in square brackets or parentheses.

                  You can use mix and match either type of bracket—they're totally interchangeable.

                  Media descriptions

                  Media descriptions always start with image:, audio:, or video:, depending on the type of media you wish to include.

                  Within media descriptions, most writing conventions are ignored. However, Typographical writing conventions are supported.

                  Media URLs

                  As demonstrated above, you can omit the URL scheme for media URLs. If you do, Up uses https:// for the URL scheme.

                  If you're a software developer using the Up library, you can specify a different default URL scheme. To learn more, see defaultUrlScheme (setting).

                  Other settings affecting media are:

                  Revealable content

                  Both Inline revealables and Revealable blocks recognize any of the following keywords:

                  • spoiler

                  • nsfw

                  • nsfl

                  • revealable

                  Like all keywords in Up, you can capitalize them however you want.

                  Inline revealables

                  Use the inline revealable convention to hide content within a paragraph.

                  When you want to hide more than a sentence or two, use Revealable blocks instead.

                  Markup
                  At the end of Pokémon Red, [SPOILER: you battle your rival] before the credits roll.
                  
                  Output

                  At the end of Pokémon Red, you battle your rival before the credits roll.

                  To hide content within a paragraph, first enclose that content within square brackets or parentheses.

                  Then, directly inside your opening bracket, insert one of the revealable keywords followed by a colon: spoiler:, nsfw:, nsfl:, or revealable:.

                  Inline revealables can contain any inline writing convention.

                  Revealable blocks

                  Use revealable block convention to hide a block of content.

                  When you want to hide content within a paragraph, use Inline revealables instead.

                  Markup
                  SPOILER:
                  +  After defeating the Elite Four at the end of Pokémon Red, you still have to battle your rival one last time.
                  +
                  +  Your rival's specific lineup depends on the Pokémon you selected at the beginning of the game. However, his first three Pokémon are always the same:
                  +
                  +  1. Pidgeot
                  +  2. Alakazam
                  +  3. Rhydon
                  
                  Output

                  After defeating the Elite Four at the end of Pokémon Red, you still have to battle your rival one last time.

                  Your rival's specific lineup depends on the Pokémon you selected at the beginning of the game. However, his first three Pokémon are always the same:

                  1. Pidgeot

                  2. Alakazam

                  3. Rhydon

                  To hide a block of content, first indent it two spaces (or a tab).

                  Then, on the line before your indented block, put one of the revealable keywords: spoiler, nsfw, nsfl, or revealable.

                  In the example above, the chosen revealable keyword (spoiler) is followed by a colon. The colon is optional.

                  Blockquotes

                  Use the blockquote convention to quote a large section of text.

                  For typical dialog, you should probably use Inline quotes instead.

                  Markup
                  > I hate oranges for the following reasons:
                  +>
                  +> 1. They're not apples.
                  +> 2. They're not bananas.
                  
                  Output

                  I hate oranges for the following reasons:

                  1. They're not apples.

                  2. They're not bananas.

                  A blockquote consists of consecutive lines starting with > (a greater-than symbol followed by a space).

                  Blockquotes can contain any outline writing convention, including other blockquotes.

                  Markup
                  > Thank you for replying to my blog!
                  +>
                  +> > I hate oranges for the following reasons:
                  +> >
                  +> > 1. They're not apples.
                  +> > 2. They're not bananas.
                  +>
                  +> I completely understand.
                  
                  Output

                  Thank you for replying to my blog!

                  I hate oranges for the following reasons:

                  1. They're not apples.

                  2. They're not bananas.

                  I completely understand.

                  Thematic breaks

                  Use the thematic break convention to represent a change of subject.

                  A thematic break can be represented by 3 or more consecutive blank lines.

                  Markup
                  I vowed never to eat apples again.
                  +
                  +
                  +
                  +By mid-March, a second flock of birds had moved into my dining room.
                  
                  Output

                  I vowed never to eat apples again.


                  By mid-March, a second flock of birds had moved into my dining room.

                  A thematic break can also be represented by a line consisting of 3 or more of the following characters:

                  • Hyphens: -

                  • Number signs: #

                  • Equal signs: =

                  • Plus signs: +

                  • Tildes: ~

                  • Colons: :

                  • Asterisks: *

                  • At signs: @

                  You can use any combination of those characters!

                  Markup
                  I vowed never to eat apples again.
                  +
                  +#=*=*=*=*=*=*=*=*=*=#
                  +
                  +By mid-March, a second flock of birds had moved into my dining room.
                  
                  Output

                  I vowed never to eat apples again.


                  By mid-March, a second flock of birds had moved into my dining room.

                  Bulleted lists

                  You already know what a bulleted list is!

                  Markup
                  - Buy milk
                  +- Buy bread
                  +- Buy happiness
                  
                  Output
                  • Buy milk

                  • Buy bread

                  • Buy happiness

                  Bullets

                  In a bulleted list, each item starts with a bullet character followed by a space. The following characters can serve as a bullet:

                  • A hyphen: -

                  • An asterisk: *

                  • An actual bullet character:

                  Spacing between list items

                  Each bulleted list item can be followed by a single blank line.

                  Markup
                  - Buy milk
                  +
                  +- Buy bread
                  +
                  +- Buy happiness
                  
                  Output
                  • Buy milk

                  • Buy bread

                  • Buy happiness

                  On the other hand, if a list item is followed by 2 blank lines, it marks the end of the list.

                  Markup
                  - Buy milk
                  +- Buy bread
                  +
                  +
                  +- Fix squeaky cabinet
                  +- Fix self-esteem
                  
                  Output
                  • Buy milk

                  • Buy bread

                  • Fix squeaky cabinet

                  • Fix self-esteem

                  List items consisting of multiple lines

                  List items aren't limited to a single line! Bulleted lists can contain any outline writing convention, including other bulleted lists.

                  If your list item contains more than one line, subsequent lines should be indented 2 spaces (or a tab).

                  Markup
                  - Buy milk.
                  +
                  +  If whole milk is on sale, buy that. Otherwise, buy 2%.
                  +
                  +- Buy bread.
                  +
                  +  Only buy bread from one of the following brands:
                  +
                  +  * Little Northern Bakehouse
                  +  * Udi's
                  +  * Canyon Bakehouse
                  +
                  +- Buy happiness.
                  +
                  +  Don't spend more than a few cents on this.
                  
                  Output
                  • Buy milk.

                    If whole milk is on sale, buy that. Otherwise, buy 2%.

                  • Buy bread.

                    Only buy bread from one of the following brands:

                    • Little Northern Bakehouse

                    • Udi's

                    • Canyon Bakehouse

                  • Buy happiness.

                    Don't spend more than a few cents on this. Not worth it.

                  Numbered lists

                  You already know what a numbered list is!

                  Markup
                  1. Buy milk
                  +2. Buy bread
                  +3. Buy happiness
                  
                  Output
                  1. Buy milk

                  2. Buy bread

                  3. Buy happiness

                  Numbered lists are nearly identical to Bulleted lists—the only difference is that numbered list items have ordinals, not bullets.

                  The ordinal for a numbered list item can be expressed several ways:

                  • An integer followed by a period: 1.

                  • An integer followed by a closing parenthesis: 1)

                  • A number sign: #

                  • A number sign followed by a period: #.

                  • A number sign followed by a closing parenthesis: #)

                  Like each bullet in a bulleted list, each ordinal in a numbered list must be followed by a space.

                  Lists starting at a specific number

                  Numbered lists don't have to start at 1.

                  Markup
                  3) March
                  +#) April
                  +#) May
                  
                  Output
                  1. March

                  2. April

                  3. May

                  Lists in descending order

                  Up automatically recognizes when a numbered list is in descending order.

                  If a numbered list has at least two items with integer ordinals (as opposed to number signs), and if the first integer is greater than the second, Up considers the list to be in descending order.

                  Markup
                  3) Buy milk
                  +2) Buy bread
                  +#) Buy happiness
                  
                  Output
                  1. Buy milk

                  2. Buy bread

                  3. Buy happiness

                  Single-item numbered lists

                  Like bulleted lists, numbered lists can consist of a single item.

                  Markup
                  1) Buy milk
                  
                  Output
                  1. Buy milk

                  There's a small exception to this rule: If your list item's ordinal is expressed as an integer followed by a period (e.g. 1.), you must have more than one list item. This exception helps prevent accidental numbered lists.

                  Markup
                  1783. Not a good year for Great Britain.
                  
                  Output

                  1783. Not a good year for Great Britain.

                  Description lists

                  Use description lists represent a collection of subjects and their descriptions.

                  You can use description lists for:

                  • Terms and definitions

                  • Questions and answers

                  • Any collection of subjects and descriptions!

                  Markup
                  Kirby's Dreamland
                  +  A video game about a flying marshmallow.
                  +
                  +Super Mario Land
                  +  A video game about a jumping plumber.
                  
                  Output
                  Kirby's Dreamland

                  A video game about a flying marshmallow.

                  Super Mario Land

                  A video game about a jumping plumber.

                  Every item in a description list consists of two parts:

                  1. One or more subjects

                  2. A single description of those subjects

                  Subjects

                  Subjects can contain any inline writing convention.

                  Markup
                  `<ol>`
                  +  An HTML element representing numbered lists.
                  +
                  +`<ul>`
                  +  An HTML element representing bulleted lists.
                  
                  Output
                  <ol>

                  An HTML element representing numbered lists.

                  <ul>

                  An HTML element representing bulleted lists.

                  When there is more than one subject for a given description, they should be listed consecutively, one subject per line.

                  Markup
                  Game Boy Light
                  +Game Boy Pocket
                  +Game Boy Color
                  +  Handheld videogame systems released by Nintendo in the 1990s.
                  
                  Output
                  Game Boy Light
                  Game Boy Pocket
                  Game Boy Color

                  Handheld videogame systems released by Nintendo in the 1990s.

                  Descriptions

                  Each description follows the subjects it describes.

                  Descriptions are indented 2 spaces (or a tab). They can contain any outline writing convention, including other description lists.

                  Markup
                  Bulbasaur
                  +  A plant Pokémon with a bulb growing from its back.
                  +
                  +  Height
                  +    0.7 m
                  +  Weight
                  +    6.9 kg
                  +
                  +Charmander
                  +  A fire Pokémon with a flame on its tail.
                  +
                  +  Height
                  +    0.6 m
                  +  Weight
                  +    8.5 kg
                  
                  Output
                  Bulbasaur

                  A plant Pokémon with a bulb growing from its back.

                  Height

                  0.7 m

                  Weight

                  6.9 kg

                  Charmander

                  A fire Pokémon with a flame on its tail.

                  Height

                  0.6 m

                  Weight

                  8.5 kg

                  Each description may be followed by an optional blank line. If a description is followed by two blank lines, it marks the end of the description list.

                  Markup
                  Lime
                  +  A green fruit.
                  +Strawberry
                  +  A red fruit.
                  +
                  +
                  +Bulbasaur
                  +  A green Pokémon.
                  +Charmander
                  +  A red Pokémon.
                  
                  Output
                  Lime

                  A green fruit.

                  Strawberry

                  A red fruit.

                  Bulbasaur

                  A green Pokémon.

                  Charmander

                  A red Pokémon.

                  Tables

                  You already know what a table is! Use tables to display rows of data organized into columns.

                  Markup
                  Table: Moves learned by the Pokémon Bulbasaur
                  +
                  +Move;         Type;     Power;  Accuracy
                  +
                  +Tackle;       Normal;   50;     100%
                  +Growl;        Normal;   ;       100%
                  +Leech Seed;   Grass;    ;       90%
                  +Vine Whip;    Grass;    45;     100%
                  
                  Output
                  Moves learned by the Pokémon Bulbasaur
                  MoveTypePowerAccuracy
                  TackleNormal50100%
                  GrowlNormal100%
                  Leech SeedGrass90%
                  Vine WhipGrass45100%

                  A table consists of:

                  • An optional caption, representing the table's title

                  • A header row, describing each column

                  • Content rows, representing the actual data

                  • An optional header column, describing each row

                  Table cells are separated by semicolons. To learn more, see Cells.

                  Our examples use extra spaces to align cells. This makes our markup more readable, but it's strictly optional! If you want, you can squish your cells together, as long as any empty cells contain at least one space. To learn more, please see Empty cells.

                  Squished markup
                  Table: My favorite fruits
                  +
                  +Fruit;Color;Taste
                  +
                  +Lime;Green;Sour
                  +Lemon;Yellow;Sour
                  +Banana;Yellow;Sweet
                  
                  Output
                  My favorite fruits
                  FruitColorTaste
                  LimeGreenSour
                  LemonYellowSour
                  BananaYellowSweet

                  The caption

                  The text after Table: is treated as the table's caption. Captions can contain any inline writing convention.

                  Markup
                  Table: My favorite [fruits] (en.wikipedia.org/wiki/Fruit)
                  +
                  +Fruit;      Color;      Taste
                  +
                  +Lime;       Green;      Sour
                  +Lemon;      Yellow;     Sour
                  +Banana;     Yellow;     Sweet
                  
                  Output
                  My favorite fruits
                  FruitColorTaste
                  LimeGreenSour
                  LemonYellowSour
                  BananaYellowSweet

                  Captions are strongly encouraged, but they're not required. To create a table without a caption, simply put Table on its own line.

                  Markup
                  Table
                  +
                  +Fruit;      Color;      Taste
                  +
                  +Lime;       Green;      Sour
                  +Lemon;      Yellow;     Sour
                  +Banana;     Yellow;     Sweet
                  
                  Output
                  FruitColorTaste
                  LimeGreenSour
                  LemonYellowSour
                  BananaYellowSweet

                  Cells

                  Table cells are separated by semicolons. If you want to include a semicolon in a cell, simply put a backslash before it. To learn more, see Disabling special characters.

                  Markup
                  Table: My favorite fruits
                  +
                  +Fruit;      Reason for liking
                  +
                  +Apples;     Easy to eat\; stylish
                  +Grapes;     Each grape is very cheap
                  +Oranges;    The color orange is nice
                  
                  Output
                  My favorite fruits
                  FruitReason for liking
                  ApplesEasy to eat; stylish
                  GrapesEach grape is very cheap
                  OrangesThe color orange is nice

                  Cells spanning multiple columns

                  If you want a cell to span two columns, terminate that cell with two semicolons.

                  Markup
                  Table: My favorite fruits
                  +
                  +Fruit;      Color;      Taste
                  +
                  +Lime;       Green;      Sour
                  +Orange;;                Sweet and tart
                  +Banana;     Yellow;     Sweet
                  
                  Output
                  My favorite fruits
                  FruitColorTaste
                  LimeGreenSour
                  OrangeSweet and tart
                  BananaYellowSweet

                  Likewise, if you want a cell to span six columns, terminate that cell with six semicolons.

                  Empty cells

                  A cell consisting solely of spaces (one or more) is considered empty.

                  Normally, you have to put at least one space in the cell, because consecutive semicolons indicate that you want the previous cell to span multiple columns.

                  However, to indicate that the first cell in a row should be empty, simply start that row with a semicolon. You don't need to put any spaces before it.

                  Markup
                  Table: Games in the Chrono series
                  +
                  +Release Date;       Game;
                  +
                  +March 11, 1995;     Chrono Trigger
                  +November 18, 1999;  Chrono Cross
                  +;                   Chrono Break
                  
                  Output
                  Games in the Chrono series
                  Release DateGame
                  March 11, 1995Chrono Trigger
                  November 18, 1999Chrono Cross
                  Chrono Break

                  Likewise, to indicate that the last cell in a row should be empty, simply end that row with a semicolon. You don't need to add any spaces after it.

                  Markup
                  Table: Games in the Chrono series
                  +
                  +Game;               Release Date
                  +
                  +Chrono Trigger;     March 11, 1995
                  +Chrono Cross;       November 18, 1999
                  +Chrono Break;
                  
                  Output
                  Games in the Chrono series
                  GameRelease Date
                  Chrono TriggerMarch 11, 1995
                  Chrono CrossNovember 18, 1999
                  Chrono Break

                  The header row

                  The header defines each column in the table.

                  The single blank lines before and after the header are not required.

                  Markup
                  Table: Moves learned by the Pokémon Bulbasaur
                  +Move;         Type;     Power;  Accuracy
                  +Tackle;       Normal;   50;     100%
                  +Growl;        Normal;   ;       100%
                  +Leech Seed;   Grass;    ;       90%
                  +Vine Whip;    Grass;    45;     100%
                  
                  Output
                  Moves learned by the Pokémon Bulbasaur
                  MoveTypePowerAccuracy
                  TackleNormal50100%
                  GrowlNormal100%
                  Leech SeedGrass90%
                  Vine WhipGrass45100%

                  Cells in a table's header can contain any inline writing convention.

                  Content rows

                  The content rows of a table follow its header row. The content rows contain the table's actual data.

                  If a content row is followed by a blank line, it ends the table.

                  Markup
                  Table: Moves learned by the Pokémon Bulbasaur
                  +
                  +Move;         Type;     Power;  Accuracy
                  +
                  +Tackle;       Normal;   50;     100%
                  +Growl;        Normal;   ;       100%
                  +Leech Seed;   Grass;    ;       90%
                  +Vine Whip;    Grass;    45;     100%
                  +
                  +I love Bulbasaur!
                  +
                  
                  Output
                  Moves learned by the Pokémon Bulbasaur
                  MoveTypePowerAccuracy
                  TackleNormal50100%
                  GrowlNormal100%
                  Leech SeedGrass90%
                  Vine WhipGrass45100%

                  I love Bulbasaur!

                  Content row cells can contain any inline writing convention.

                  Including a header column in your table

                  To indicate your table has a header column, simply indent its header row at least two spaces (or a tab).

                  When you indent a table's the header row, Up automatically treats the first cell in each subsequent row as the header column.

                  Markup
                  Table: Moves learned by the Pokémon Bulbasaur
                  +
                  +              Type;     Power;  Accuracy
                  +
                  +Tackle;       Normal;   50;     100%
                  +Growl;        Normal;   ;       100%
                  +Leech Seed;   Grass;    ;       90%
                  +Vine Whip;    Grass;    45;     100%
                  
                  Output
                  Moves learned by the Pokémon Bulbasaur
                  TypePowerAccuracy
                  TackleNormal50100%
                  GrowlNormal100%
                  Leech SeedGrass90%
                  Vine WhipGrass45100%

                  When your table has a header column, Up automatically inserts an extra blank cell at the beginning of the header row in the top level corner, above the header column.

                  Code blocks

                  Use the code block convention to represent a block of computer code.

                  When you need to represent only a small fragment of computer code, consider using Inline code instead.

                  Markup
                  ```
                  +function nthFibonacci(n: number): number {
                  +  return n <= 2
                  +    ? n - 1
                  +    : nthFibonacci(n - 1) + nthFibonacci(n - 2)
                  +}
                  +```
                  Output
                  function nthFibonacci(n: number): number {
                  +  return n <= 2
                  +    ? n - 1
                  +    : nthFibonacci(n - 1) + nthFibonacci(n - 2)
                  +}
                  

                  Code blocks are surrounded (underlined and overlined) by matching streaks of 3 or more backticks.

                  If there is no matching end streak, the code block extends to the end of the document (or to the end of the current outline writing convention, if the code block is nested within one).

                  Within a code block, indentation is preserved, and every single character is treated literally. No other writing conventions are recognized, which means code blocks don't support Disabling special characters.

                  Including streaks of backticks

                  Code blocks can contain streaks of backticks that aren't exactly as long as the enclosing streaks.

                  Markup
                  ``````
                  +A code block:
                  +
                   ```
                  -function factorial(n: number): number {
                  -  return n <= 1
                  -    ? 1
                  -    : n * factorial(n - 1)
                  -}
                  +function factorial(n: number): number {
                  +  return n <= 1
                  +    ? 1
                  +    : n * factorial(n - 1)
                  +}
                   ```
                  -
                  -See? Not so hard!
                  -``````
                  Output
                  A code block:
                  -
                  +
                  +See? Not so hard!
                  +``````
                  Output
                  A code block:
                  +
                   ```
                  -function factorial(n: number): number {
                  -  return n <= 1
                  -    ? 1
                  -    : n * factorial(n - 1)
                  -}
                  +function factorial(n: number): number {
                  +  return n <= 1
                  +    ? 1
                  +    : n * factorial(n - 1)
                  +}
                   ```
                  -
                  -See? Not so hard!

                  Linkifying another writing convention

                  You can put Images inside of Links, but the syntax can be a bit messy.

                  Messy markup
                  [(image: Warlocked box art) (i.imgur.com/879AeYU.jpg)] [en.wikipedia.org/wiki/Warlocked]
                  Output
                  Warlocked box art

                  That's a lot of brackets! Luckily, there's a shortcut.

                  Simply place the linkifying URL after the image's own URL, and Up will produce a link for you.

                  Cleaner markup
                  [image: Warlocked box art] [i.imgur.com/879AeYU.jpg] (en.wikipedia.org/wiki/Warlocked)
                  Output
                  Warlocked box art

                  When linkifying an image, you can mix and match square brackets and parentheses—they're totally interchangeable.

                  This shortcut also works for the following inline writing conventions:

                  Example user input
                  Markup
                  Press {space} (en.wikipedia.org/wiki/Space_bar) to continue.
                  Output

                  Press space to continue.

                  Footnotes
                  Markup
                  Pokémon is old [^ Released in 1996!] (en.wikipedia.org/wiki/Pokémon_Red_and_Blue) but it maintains its charm.
                  Output

                  Pokémon is old5 but it maintains its charm.

                  Inline revealables
                  Markup
                  At the end of Pokémon Red, [SPOILER: you battle your rival] (pokemon.wikia.com/wiki/Rival) before the credits roll.
                  Output

                  At the end of Pokémon Red, you battle your rival before the credits roll.

                  5
                  Released in 1996!

                  Typographical writing conventions

                  Ellipsis

                  Consecutive periods represent an ellipsis, so Up replaces them with a fancy ellipsis character.

                  Markup
                  I don't know... I doubt a spider would do this.
                  Output

                  I don't know… I doubt a spider would do this.

                  If you're a software developer using the Up library, you can specify a different fancy ellipsis (e.g. ). To learn more, see fancyEllipsis (setting).

                  En dash

                  Two consecutive hyphens produce an en dash.

                  Markup
                  I agree -- to an extent -- with your plan to eat nothing but cereal.
                  Output

                  I agree – to an extent – with your plan to eat nothing but cereal.

                  Em dash

                  Three consecutive hyphens produce an em dash.

                  Markup
                  Use a spoon---a fork won't cut it.
                  Output

                  Use a spoon—a fork won't cut it.

                  Plus-minus sign

                  A plus sigh followed by a hyphen produces a plus-minus sign.

                  Markup
                  I ate 5 waffles +- 2.
                  Output

                  I ate 5 waffles ± 2.

                  Excessive delimiter characters

                  For Emphasis, Stress, Italics, Bold, Highlighting, and Inline quotes, Up ignores any excessive delimiter characters.

                  Markup
                  This organic, ====gluten-free==== cupcake is too expensive.
                  Output

                  This organic, gluten-free cupcake is too expensive.

                  This includes when delimiter characters aren't perfectly balanced on either side.

                  Markup
                  My favorite video game is _Chrono Cross__.
                  Output

                  My favorite video game is Chrono Cross.

                  Disabling special characters

                  To disable the special meaning of a character, put a backslash before it.

                  Markup
                  I love \*asterisks*!
                  Output

                  I love *asterisks*!

                  Likewise, to disable the special meaning of a backslash, put another backslash before it.

                  Markup
                  My favorite kind of slash is the backslash: \\. What is yours?
                  Output

                  My favorite kind of slash is the backslash: \. What is yours?

                  Overlapping writing conventions

                  In Up, inline writing conventions can freely overlap.

                  Markup
                  John **enjoys ==sleeping** late== whenever he can.
                  Output

                  John enjoys sleeping late whenever he can.

                  Superficial overlapping

                  If conventions overlap superficially—by only their start or end delimiters—Up pretends they weren't overlapped at all.

                  Markup
                  At the end of Pokémon Red, [SPOILER: you battle your rival *yet again]* before the credits roll.
                  Output

                  At the end of Pokémon Red, you battle your rival yet again before the credits roll.


                  Using the Up library

                  The Up library can be found on NPM.

                  Installation

                  npm install up-lang --save

                  Usage Overview

                  Typically, you'll want to use one of the various Functions exported by the library.

                  const { parseAndRender } = require('up-lang')
                  -
                  -const html = parseAndRender(markup, optionalSettings)

                  Alternatively, you can use the exported Up class, which can be helpful if you need to parse or render several documents sharing custom settings. Please see Up (class) to learn more.

                  If you plan to modify or analyze a parsed document, you'll want to check out the Abstract syntax tree classes.

                  Functions

                  parseAndRender (function)

                  This function converts Up markup into HTML and returns the result.

                  Arguments
                  markup: string

                  The Up markup to convert into HTML.

                  settings (optional): Settings (interface)

                  The custom parsing and/or rendering settings to apply.

                  Return type: string

                  This function returns HTML representing the rendered document.

                  Usage
                  Without custom settings
                  const html = parseAndRender(markup)
                  With custom settings
                  const html = parseAndRender(markup, {
                  -  parsing: {
                  -    createSourceMap: true,
                  -    keywords: { audio: "listen" }
                  -  },
                  -  rendering: {
                  -    idPrefix: "article"
                  -  }
                  -})

                  parseAndRenderWithTableOfContents (function)

                  This function converts Up markup into two pieces of HTML, both of which are returned:

                  1. A table of contents

                  2. The document itself

                  Arguments
                  markup: string

                  The Up markup to parse and render.

                  settings (optional): Settings (interface)

                  The custom parsing and/or rendering settings to apply.

                  Return type: DocumentAndTableOfContentsHtml (interface)

                  This function returns HTML representing the rendered document and table of contents.

                  Usage
                  Without custom settings
                  const { tableOfContentsHtml, documentHtml } =
                  -  parseAndRenderWithTableOfContents(markup)
                  With custom settings
                  const { tableOfContentsHtml, documentHtml } =
                  -  parseAndRenderWithTableOfContents(markup, {
                  -    parsing: {
                  -      createSourceMap: true,
                  -      keywords: { audio: "listen" }
                  -    },
                  -    rendering: {
                  -      idPrefix: "article",
                  -      terms: { reveal: "expand" }
                  -    }
                  -  })

                  DocumentAndTableOfContentsHtml (interface)

                  This interface represents the HTML for a rendered document and its table of contents.

                  Members
                  tableOfContentsHtml: string

                  The HTML for the table of contents.

                  documentHtml: string

                  The HTML for the document itself.

                  Notes

                  The following functions return an object satisfying this interface:

                  parseAndRenderInline (function)

                  This function converts inline Up markup into inline HTML and returns the result.

                  To learn more about inline documents, see Inline documents.

                  Arguments
                  inlineMarkup: string

                  The inline Up markup to convert into inline HTML.

                  parsingSettings (optional): Settings (interface)

                  The custom parsing and/or rendering settings to apply.

                  Return type: string

                  This function returns HTML representing the rendered inline document.

                  Usage
                  Without custom settings
                  const html = parseAndRenderInline(markup)
                  With custom settings
                  const html = parseAndRenderInline(markup, {
                  -  parsing: {
                  -    baseForUrlsStartingWithSlash: "https://example.com/en-us",
                  -    keywords: { audio: "listen" }
                  -  },
                  -  rendering: {
                  -    idPrefix: "byline",
                  -    terms: {
                  -      footnoteReference: "footnote mention",
                  -      reveal: "show"
                  -    }
                  -  }
                  -})

                  parse (function)

                  This function parses Up markup and returns the resulting syntax tree.

                  Arguments
                  markup: string

                  The Up markup to parse.

                  parsingSettings (optional): Settings.Parsing (interface)

                  The custom parsing settings to apply.

                  Return type: Document (class)

                  This function returns a syntax tree representing the parsed document.

                  Usage
                  Without custom settings
                  const html = parse(markup)
                  With custom settings
                  const document = parse(markup, {
                  -  createSourceMap: true,
                  -  keywords: { audio: "listen" }
                  -})

                  parseInline (function)

                  This function parses inline Up markup and returns the resulting inline syntax tree.

                  To learn more about inline documents, see Inline documents.

                  Arguments
                  inlineMarkup: string

                  The inline Up markup to parse.

                  parsingSettings (optional): Settings.Parsing (interface)

                  The custom parsing settings to apply.

                  Return type: InlineDocument (class)

                  This function returns an inline syntax tree representing the parsed document.

                  Usage
                  Without custom settings
                  const html = parseInline(markup)
                  With custom settings
                  const html = parseInline(markup, {
                  -  baseForUrlsStartingWithSlash: "https://example.com/en-us",
                  -  keywords: { audio: "listen" }
                  -})

                  render (function)

                  This function converts a syntax tree into HTML and returns the result.

                  Arguments
                  document: Document (class)

                  The syntax tree to convert into HTML.

                  renderingSettings (optional): Settings.Rendering (interface)

                  The custom rendering settings to apply.

                  Return type: string

                  This function returns HTML representing the rendered document.

                  Usage
                  Without custom settings
                  const html = render(document)
                  With custom settings
                  const html = render(document, {
                  -  idPrefix: "article",
                  -  terms: {
                  -    footnoteReference: "footnote mention",
                  -    reveal: "show"
                  -  }
                  -})

                  renderWithTableOfContents (function)

                  This function converts a syntax tree into two pieces of HTML, both of which are returned:

                  1. A table of contents

                  2. The document itself

                  Arguments
                  document: Document (class)

                  The syntax tree to convert into HTML.

                  renderingSettings (optional): Settings.Rendering (interface)

                  The custom rendering settings to apply.

                  Return type: DocumentAndTableOfContentsHtml (interface)

                  This function returns HTML representing the rendered document and table of contents.

                  Usage
                  Without custom settings
                  const { tableOfContentsHtml, documentHtml } =
                  -  renderWithTableOfContents(document)
                  With custom settings
                  const { tableOfContentsHtml, documentHtml } =
                  -  renderWithTableOfContents(document, {
                  -    idPrefix: "article",
                  -    terms: { revveal: "expand" }
                  -  })

                  renderInline (function)

                  This function converts an inline syntax tree into inline HTML and returns the result.

                  To learn more about inline documents, see Inline documents.

                  Arguments
                  inlineDocument: InlineDocument (class)

                  The inline syntax tree to convert into HTML.

                  renderingSettings (optional): Settings.Rendering (interface)

                  The custom rendering settings to apply.

                  Return type: string

                  This function returns HTML representing the rendered inline document.

                  Usage
                  Without custom settings
                  const html = renderInline(inlineDocument)
                  With custom settings
                  const html = renderInline(inlineDocument, {
                  -  idPrefix: "byline",
                  -  terms: {
                  -    footnoteReference: "footnote mention",
                  -    reveal: "show"
                  -  }
                  -})

                  Up (class)

                  Anything you can accomplish using the Up class, you can accomplish using the regular Functions exported by the library.

                  However, the Up class can be helpful if you need to parse or render several documents sharing custom settings.

                  Those shared settings can be provided just once—in the constructor. Then, when calling methods on your object, you only need to provide settings that overwrite (or supplement) the ones you provided to the constructor.

                  const { Up } = require('up-lang')
                  -
                  -const up = new Up(settings)
                  -const html = up.parseAndRender(markup, changedSettings)

                  Constructor arguments

                  settings (optional): Settings (interface)

                  The custom parsing and/or rendering settings to apply to all subsequent method calls.

                  const up = new Up({
                  -  parsing: {
                  -    fancyEllipsis: "⋯",
                  -    keywords: {
                  -      audio: ["sound", "song"],
                  -      revealable: "hide"
                  -    }
                  -  },
                  -  rendering: {
                  -    idPrefix: 'article',
                  -    terms: { reveal: "expand" }
                  -  }
                  -})

                  Methods

                  This class's methods have the exact same names and arguments as the library's Functions.

                  Invoking a method with custom settings

                  When a method is invoked with custom settings, those settings are merged with the settings provided to the constructor. If any individual settings conflict, Up uses the conflicting values provided to the method.

                  Example
                  const up = new Up({
                  -  parsing: {
                  -    createSourceMap: true,
                  -    fancyEllipsis: "⋯",
                  -    keywords: {
                  -      audio: ["sound", "song"],
                  -      revealable: "hide"
                  -    }
                  -  },
                  -  rendering: {
                  -    terms: { reveal: "expand" }
                  -  }
                  -})
                  -
                  -const html = up.parseAndRender(markup, {
                  -  parsing: {
                  -    createSourceMap: false,
                  -    keywords: {
                  -      audio: "listen"
                  -    }
                  -  },
                  -  rendering: {
                  -    idPrefix: "article"
                  -  }
                  -})
                  Result

                  In the above example, the following settings are ultimately applied:

                  {
                  -  parsing: {
                  -    createSourceMap: false,
                  -    fancyEllipsis: "⋯",
                  -    keywords: {
                  -      audio: "listen",
                  -      revealable: "hide"
                  -    }
                  -  },
                  -  rendering: {
                  -    idPrefix: "article",
                  -    terms: { reveal: "expand" }
                  -  }
                  -}

                  Library configuration

                  The Up library works out of the box! No configuration is necessary.

                  However, all Functions do accept optional custom settings. These various settings are described below.

                  Settings (interface)

                  The Settings interface includes both parsing settings and rendering settings.

                  Use this interface to provide custom settings to functions that both parse markup and render the result to HTML:

                  Usage
                  const html = parseAndRender(markup, {
                  -  parsing: {
                  -    createSourceMap: true,
                  -    keywords: { audio: "listen" }
                  -  },
                  -  rendering: {
                  -    idPrefix: "article"
                  -  }
                  -})
                  Members (both of which are optional)
                  parsing: Settings.Parsing (interface)

                  The custom parsing settings to apply.

                  rendering: Settings.Rendering (interface)

                  The custom rendering settings to apply.

                  Settings.Parsing (interface)

                  The Settings.Parsing interface includes all parsing settings.

                  Use this interface to provide custom settings to functions that parse markup and return the resulting syntax tree:

                  As part of Settings (interface), this interface also provides parsing custom settings to functions that both parse markup and render the result to HTML:

                  Usage
                  const document = parse(markup, {
                  -  createSourceMap: true,
                  -  keywords: {
                  -    audio: ["sound", "song"],
                  -    audio: "listen"
                  -  }
                  -})
                  Members (all of which are optional)
                  createSourceMap (setting): boolean

                  Enables source mapping.

                  defaultUrlScheme (setting): string

                  The default URL scheme for URLs without one.

                  baseForUrlsStartingWithSlash (setting): string

                  The base for URLs starting with /.

                  baseForUrlsStartingWithHashMark (setting): string

                  The base for URLs starting with #.

                  fancyEllipsis (setting): string

                  Up replaces consecutive periods with this fancy ellipsis.

                  keywords (all of which are optional)

                  Customizing keywords

                  You can provide unlimited custom variations for each keyword. Custom keyword variations do not overwrite the default keywords.

                  const document = parse(markup, {
                  -  keywords: {
                  -    audio: ["sound", "song"],
                  -    audio: "listen"
                  -  }
                  -})

                  Like the default keywords, custom keyword variations are case-insensitive.

                  audio: string or string[]

                  Recognized by Audio.

                  image: string or string[]

                  Recognized by Images.

                  revealable: string or string[]

                  Recognized by Inline revealables and Revealable blocks.

                  sectionLink: string or string[]

                  Recognized by Section links.

                  table: string or string[]

                  Recognized by Tables.

                  video: string or string[]

                  Recognized by Video.

                  createSourceMap (setting)

                  When createSourceMap is enabled, Up keeps track of the original line number for every instance of every outline writing convention.

                  This setting works by setting the sourceLineNumber field of each OutlineSyntaxNode (interface).

                  Usage
                  const html = parseAndRender(markup, {
                  -  parsing: {
                  -    createSourceMap: true
                  -  }
                  -})
                  Default value

                  false

                  Context

                  This setting belongs to Settings.Parsing (interface).

                  defaultUrlScheme (setting)

                  The defaultUrlScheme is prefixed to any link URL or media URL without a URL scheme.

                  For URLs with a URL scheme, this setting has no effect. Furthermore, this setting is not applied to URLs that start with / or #. For those URLs, see:

                  Usage
                  const html = parseAndRender(markup, {
                  -  parsing: {
                  -    defaultUrlScheme: "my-app://"
                  -  }
                  -})
                  Default value

                  "https://"

                  Context

                  This setting belongs to Settings.Parsing (interface).

                  baseForUrlsStartingWithSlash (setting)

                  The baseForUrlsStartingWithSlash is prefixed to any link URL or media URL starting with /.

                  Usage
                  const html = parseAndRender(markup, {
                  -  parsing: {
                  -    baseForUrlsStartingWithSlash: "https://example.com/blog/"
                  -  }
                  -})
                  Default value

                  "" (an empty string)

                  Context

                  This setting belongs to Settings.Parsing (interface).

                  baseForUrlsStartingWithHashMark (setting)

                  The baseForUrlsStartingWithSlash is prefixed to any link URL or media URL starting with #.

                  Usage
                  const html = parseAndRender(markup, {
                  -  parsing: {
                  -    baseForUrlsStartingWithHashMark: "https://example.com/blog/post/28"
                  -  }
                  -})
                  Default value

                  "" (an empty string)

                  Context

                  This setting belongs to Settings.Parsing (interface).

                  fancyEllipsis (setting)

                  Up automatically replaces consecutive periods with fancyEllipsis.

                  By default, fancyEllipsis is . If you want Up to use a different fancy ellipsis (e.g. or even . . .), set fancyEllipsis accordingly.

                  Usage
                  const html = parseAndRender(markup, {
                  -  parsing: {
                  -    fancyEllipsis: "⋯"
                  -  }
                  -})
                  Default value

                  "…"

                  Context

                  This setting belongs to Settings.Parsing (interface).

                  Settings.Rendering (interface)

                  The Settings.Rendering interface includes all rendering settings.

                  Use this interface to provide custom settings to functions that render syntax trees to HTML:

                  As part of Settings (interface), this interface also provides custom rendering settings to functions that both parse markup and render the result to HTML:

                  Usage
                  const html = render(document, {
                  -  idPrefix: "article",
                  -  terms: {
                  -    footnoteReference: "footnote mention",
                  -    reveal: "show"
                  -  }
                  -})
                  Members (all of which are optional)
                  idPrefix (setting): string

                  The prefix to apply to HTML IDs.

                  renderDangerousContent (setting): boolean

                  Enables the rendering of dangerous content. Enabling this setting is not recommended!

                  terms (all of which are optional)
                  footnote: string

                  Appears in the URLs of links pointing to footnotes in their footnote blocks.

                  footnoteReference: string

                  Appears in the URLs of links pointing back to footnote references (i.e. back to the superscripts within paragraphs).

                  hide: string

                  Appears on the button that hides revealable content.

                  reveal: string

                  Appears on the button that reveals revealable content.

                  sectionReferencedByTableOfContents: string

                  Appears in the URLs of table of contents entries.

                  You don't need to worry about escaping any characters in your custom terms! Up handles that for you.

                  idPrefix (setting)

                  If you are rendering multiple documents onto the same page, you need to use this setting to prevent HTML ID collisions between documents.

                  By default, idPrefix is up to prevent ID collisions with any HTML elements not rendered by Up. If you don't want any ID prefix, you can set idPrefix to an empty string.

                  You don't need to worry about escaping HTML for your idPrefix—Up automatically handles that for you. Furthermore, Up automatically converts any spaces in your idPrefix to hyphens.

                  Usage
                  const html = parseAndRender(markup, {
                  -  rendering: {
                  -    idPrefix: "article"
                  -  }
                  -})
                  Context

                  This setting belongs to Settings.Rendering (interface).

                  Default value

                  "up"

                  renderDangerousContent (setting)

                  Normally, Up will not render links or media elements with potentially exploitable URI schemes: javascript, vbscript, data, and file.

                  When this setting is enabled, Up will dutifully render all links and media elements.

                  Usage
                  const html = parseAndRender(markup, {
                  -  rendering: {
                  -    renderDangerousContent: true
                  -  }
                  -})
                  Default value

                  false

                  Context

                  This setting belongs to Settings.Rendering (interface).


                  Inline documents

                  In certain contexts, you might want to restrict a document to just a single line:

                  • A chat message

                  • The title of a thread on a message board

                  • The byline for a user's profile

                  That's what inline documents are for! To take advantage of inline documents, use one of the following functions:

                  Syntax differences

                  Within inline documents, Up ignores all outline writing conventions. Furthermore, Footnotes and Section links aren't supported.

                  When Up encounters a footnote in an inline document, it pretends the author had used parentheses instead of a footnote.

                  Inline markup
                  My dad [^ Professor Oak] is very wise.
                  Output

                  My dad (Professor Oak) is very wise.

                  Within inline documents, Up doesn't recognize the syntax for section links. Consequently, their markup is instead treated as regular old text enclosed within brackets.

                  Inline markup
                  I enjoyed our conversation [topic: the weather].
                  Output

                  I enjoyed our conversation [topic: the weather].

                  Rendered HTML

                  When inline documents are rendered, the resulting HTML is not enclosed within any container element (e.g. <p>).

                  Inline markup
                  I *really* like Starcraft.
                  Rendered inline HTML
                  I <em>really</em> like Starcraft.

                  Abstract syntax tree classes

                  Unless you're fiddling with the abstract syntax tree of a parsed document, you can safely ignore this section.

                  Every class used in the abstract syntax tree is exported by the library.

                  const { Blockquote } = require("up-lang")
                  -
                  -if (syntaxNode instanceof Blockquote) {
                  -  // Do something
                  -}

                  If you're using TypeScript, you can take advantage of several interfaces used in the abstract syntax tree, too.

                  const { SyntaxNode } = require("up-lang")
                  -
                  -function handle(node: SyntaxNode): void {
                  -  // Do something
                  -}

                  All classes and interfaces are described below.

                  Document (class)

                  This class represents the syntax tree for a parsed document.

                  Extends

                  OutlineSyntaxNodeContainer (class)

                  Unique members
                  tableOfContents: Document.TableOfContents (class)

                  An object representing the document's table of contents.

                  create method (static)
                  Purpose

                  This method returns a ready-to-render syntax tree from a collection of outline syntax nodes.

                  Usually, you'll want to use this static method instead of the constructor.

                  Arguments
                  children: array of OutlineSyntaxNode (interface)

                  A collection of outline syntax nodes representing the content of this document.

                  Return type: Document (class)

                  This method creates and returns a ready-to-render Document object.

                  To prepare the document for rendering, this method:

                  • Assigns footnotes their reference numbers

                  • Extracts footnotes into footnote blocks

                  • Produces a table of contents

                  • Matches section links with table of contents entries

                  Constructor arguments
                  children: array of OutlineSyntaxNode (interface)

                  A collection of outline syntax nodes representing the content of this document.

                  tableOfContents (optional): Document.TableOfContents (class)

                  The document's table of contents.

                  Rendered HTML

                  When rendered to HTML, the document is not put into an outer container element.

                  <p>
                  -  Unlike regular dental floss, you can use floss picks even if you're <em>not</em> a trained dental hygienist.
                  -</p>
                  -<p>
                  -  Floss picks are sold in stylish, resealable plastic bags. You have no excuse not to buy some today.
                  -</p>

                  Document.TableOfContents (class)

                  This class represents the table of contents for a document. The table of contents includes every heading except those found within Revealable content.

                  Members
                  entries: array of Document.TableOfContents.Entry (interface)

                  A collection of entries representing headings in the document. In fact, the objects in this collection are the same Heading (class) objects in the document itself.

                  Constructor arguments
                  entries: array of Document.TableOfContents.Entry (interface)

                  The entries in the table of contents.

                  Rendered HTML

                  Each entry in the table of contents renders a heading element corresponding to its level. This heading element contains a link to the appropriate section in the document.

                  To learn more on how headings are rendered, please see Heading (class).

                  <h1>
                  -  <a href="#up-topic-1">Fun things</a>
                  -</h1>
                  -<h2>
                  -  <a href="#up-topic-2">Games</a>
                  -</h2>
                  -<h3>
                  -  <a href="#up-topic-3">Video games</a>
                  -</h3>
                  -<h4>
                  -  <a href="#up-topic-4">Released in the 2000s</a>
                  -</h4>
                  -<h5>
                  -  <a href="#up-topic-5">For Nintendo devices</a>
                  -</h5>
                  -<h6>
                  -  <a href="#up-topic-6">Nintendo 64</a>
                  -</h6>
                  -<div aria-level="7" role="heading">
                  -  <a href="#up-topic-6">Pokémon Puzzle League</a>
                  -</div>
                  -<h6>
                  -  <a href="#up-topic-8">Game Boy</a>
                  -</h6>
                  -<div aria-level="7" role="heading">
                  -  <a href="#up-topic-9">Game Boy Color Exclusives</a>
                  -</div>
                  -<div aria-level="8" role="heading">
                  -  <a href="#up-topic-10">Warlocked</a>
                  -</div>
                  Document.TableOfContents.Entry (interface)

                  This interface represents an entry in the table of contents.

                  Members
                  ordinalInTableOfContents: number

                  The entry's ordinal in the table of contents. The first ordinal is 1, not 0.

                  level: number

                  The heading level of the entry. Like HTML heading levels, a level of 1 is considered the most significant.

                  children: array of InlineSyntaxNode (interface)

                  The inline syntax nodes representing this entry in the table of contents.

                  titleMarkup: string

                  Currently, headings are the only writing convention that produce table of contents entries, so the titleMarkup field always represents the markup for the content line of a heading.

                  Section links compare their markupSnippetFromSectionTitle against this field.

                  sourceLineNumber: number

                  If createSourceMap (setting) is enabled, this field is set to the line number of the first line of markup that produced the heading represented by this entry. Source line numbers start at 1, not 0.

                  When rendered to HTML, entries with source line numbers are given a data-up-source-line attribute set the appropriate line number.

                  <h3 data-up-source-line="51">
                  -  <a href="#up-topic-5">Video games</a>
                  -</h3>
                  contentWithinTableOfContents method
                  Return type: array of InlineSyntaxNode (interface)

                  This method returns the inline syntax nodes that should represent this entry's content inside the table of contents itself.

                  Arguments

                  None.

                  InlineDocument (class)

                  This class represents the syntax tree for a parsed inline document.

                  Extends

                  InlineSyntaxNodeContainer (class)

                  Constructor arguments

                  See the constructor arguments for InlineSyntaxNodeContainer (class).

                  Rendered HTML

                  When rendered to HTML, an inline document is not put into an outer container element.

                  I <em>love</em> dental floss!

                  SyntaxNode (interface)

                  All syntax node classes must implement this interface.

                  Members
                  inlineDescendants method
                  Return type: array of InlineSyntaxNode (interface)

                  This method returns all inline descendants (including children, grandchildren, etc.).

                  Arguments

                  None.

                  Notes

                  This interface also has a render method, but it isn't relevant to developers using the Up library.

                  InlineSyntaxNode (interface)

                  All inline syntax node classes must implement this interface.

                  Extends

                  SyntaxNode (interface)

                  Unique members
                  searchableText method
                  Return type: string

                  This method returns the searchable text of the syntax node.

                  Ultimately, this method helps match Section links to the the most appropriate table of content entry.

                  Arguments

                  None.

                  textAppearingInline method
                  Return type: string

                  This method returns the text of the syntax node as it should appear inline. Some inline writing conventions don't have any text appearing inline, including Footnotes and Images.

                  This method is helps determine whether table cells are numeric.

                  Arguments

                  None.

                  OutlineSyntaxNode (interface)

                  All outline syntax node classes must implement this interface.

                  Extends

                  SyntaxNode (interface)

                  Unique members
                  sourceLineNumber: number

                  If createSourceMap (setting) is enabled, this field is set to the first line of markup that produced this syntax node. Source line numbers start at 1, not 0.

                  HTML elements rendered by outline syntax nodes with source line numbers are given a data-up-source-line attribute set the appropriate line number.

                  <p data-up-source-line="24">Hi there!</p>
                  descendantsToIncludeInTableOfContents method
                  Return type: array of Document.TableOfContents.Entry (interface)

                  This method returns any descendants (at any nesting level) to include in the table of contents.

                  Arguments

                  None.

                  RichInlineSyntaxNode (class)

                  This abstract class represents an inline syntax node that can contain other inline syntax nodes.

                  Extends

                  InlineSyntaxNodeContainer (class)

                  Implements

                  InlineSyntaxNode (interface)

                  Constructor arguments

                  See the constructor arguments for InlineSyntaxNodeContainer (class).

                  RichOutlineSyntaxNode (class)

                  This abstract class represents an outline syntax node that can contain other outline syntax nodes.

                  Extends

                  OutlineSyntaxNodeContainer (class)

                  Implements

                  OutlineSyntaxNode (interface)

                  Constructor arguments
                  children: array of OutlineSyntaxNode (interface)

                  A collection of outline syntax nodes representing the content of this syntax node.

                  options (optional)
                  sourceLineNumber: number

                  The line number of the first line of markup that created this syntax node.

                  InlineSyntaxNodeContainer (class)

                  This abstract class represents a container of inline syntax nodes.

                  Members
                  children: array of InlineSyntaxNode (interface)

                  A collection of inline syntax nodes representing the content of this container.

                  inlineDescendants method
                  Return type: array of InlineSyntaxNode (interface)

                  This method returns all inline descendants (including children, grandchildren, etc.).

                  Arguments

                  None.

                  Constructor arguments
                  children: array of InlineSyntaxNode (interface)

                  This field is described above.

                  OutlineSyntaxNodeContainer (class)

                  This abstract class represents a container of outline syntax nodes.

                  Members
                  children: array of OutlineSyntaxNode (interface)

                  A collection of outline syntax nodes representing the content of this container.

                  descendantsToIncludeInTableOfContents method
                  Return type: array of Document.TableOfContents.Entry (interface)

                  This method returns any descendants (children, grandchildren, etc.) to include in the table of contents.

                  Arguments

                  None.

                  inlineDescendants method
                  Return type: array of InlineSyntaxNode (interface)

                  This method returns all inline descendants of children.

                  Arguments

                  None.

                  Constructor arguments
                  children: array of OutlineSyntaxNode (interface)

                  This field is described above.

                  MediaSyntaxNode (class)

                  All media syntax node classes extend this abstract class:

                  Implements
                  InlineSyntaxNode (interface)

                  Media conventions can appear inline (i.e. within paragraphs).

                  OutlineSyntaxNode (interface)

                  If a line consists solely of media conventions (or media conventions within links), those media conventions (or their outer links) are placed directly into the outline.

                  Unique members
                  description: string

                  The media's description.

                  url: string

                  Represents the media's URL after the following settings are applied:

                  Constructor arguments
                  description: string

                  The media's description.

                  url: string

                  The media's URL.

                  options (optional)
                  sourceLineNumber: number

                  The line number of the line of markup that created this media syntax node.

                  ParentheticalSyntaxNode (class)

                  This abstract class represents Parenthetical text. It exists solely to improve the expressiveness of the type system.

                  It is extended by both parenthetical syntax node classes:

                  Extends

                  RichInlineSyntaxNode (class)

                  Constructor arguments

                  See the constructor arguments for RichInlineSyntaxNode (class).

                  Audio (class)

                  Writing convention

                  Audio

                  Extends

                  MediaSyntaxNode (class)

                  Constructor arguments

                  See the constructor arguments for MediaSyntaxNode (class).

                  Rendered HTML
                  <audio controls src="https://a.clyp.it/ybct5hcl.mp3" title="Sadness theme from Infinity for Game Boy">
                  -  <a href="https://a.clyp.it/ybct5hcl.mp3">Sadness theme from Infinity for Game Boy</a>
                  -</audio>

                  Blockquote (class)

                  Writing convention

                  Blockquotes

                  Extends

                  RichOutlineSyntaxNode (class)

                  Constructor arguments

                  See the constructor arguments for RichOutlineSyntaxNode (class).

                  Rendered HTML
                  <blockquote>
                  -  <p>Hi there!</p>
                  -</blockquote>

                  Bold (class)

                  Writing convention

                  Audio

                  Extends

                  RichInlineSyntaxNode (class)

                  Constructor arguments

                  See the constructor arguments for RichInlineSyntaxNode (class).

                  Rendered HTML
                  <b>Hi there!</b>

                  BulletedList (class)

                  Writing convention

                  Bulleted lists

                  Implements

                  OutlineSyntaxNode (interface)

                  Unique members
                  items: array of BulletedList.Item (class)

                  The collection of items comprising this bulleted list.

                  Constructor arguments
                  items: array of BulletedList.Item (class)

                  This field is described above.

                  options (optional)
                  sourceLineNumber: number

                  The line number of the first line of markup that created this bulleted list.

                  Rendered HTML
                  <ul>
                  -  <li>
                  -    <p>Buy milk</p>
                  -  </li>
                  -  <li>
                  -    <p>Buy bread</p>
                  -  </li>
                  -  <li>
                  -    <p>Buy happiness</p>
                  -  </li>
                  -</ul>

                  BulletedList.Item (class)

                  This class represents an item in a bulleted list.

                  Extends

                  OutlineSyntaxNodeContainer (class)

                  Constructor arguments

                  See the constructor arguments for OutlineSyntaxNodeContainer (class).

                  CodeBlock (class)

                  Writing convention

                  Code blocks

                  Implements

                  OutlineSyntaxNode (interface)

                  Unique members
                  code: string

                  The code represented by this syntax node.

                  Constructor arguments
                  code: string

                  This field is described above.

                  options (optional)
                  sourceLineNumber: number

                  The line number of the first line of markup that created this code block.

                  Rendered HTML
                  <pre><code>const message = "Hi there!"</code></pre>

                  DescriptionList (class)

                  Writing convention

                  Description lists

                  Implements

                  OutlineSyntaxNode (interface)

                  Unique members
                  items: array of DescriptionList.Item (class)

                  The collection of items comprising this description list.

                  Constructor arguments
                  items: array of DescriptionList.Item (class)

                  This field is described above.

                  options (optional)
                  sourceLineNumber: number

                  The line number of the first line of markup that created this description list.

                  Rendered HTML
                  <dl>
                  -  <dt>Kirby's Dreamland</dt>
                  -  <dd>
                  -    <p>A video game about a flying marshmallow.</p>
                  -  </dd>
                  -  <dt>Super Mario Land</dt>
                  -  <dd>
                  -    <p>A video game about a jumping plumber.</p>
                  -  </dd>
                  -</dl>

                  DescriptionList.Item (class)

                  This class represents a collection of subjects and their corresponding description.

                  Unique members
                  subjects: array of DescriptionList.Item.Subject (class)

                  The subjects described by description.

                  description: DescriptionList.Item.Description (class)

                  The description of subjects.

                  Constructor arguments
                  subjects: array of DescriptionList.Item.Subject (class)

                  This field is described above.

                  description: DescriptionList.Item.Description (class)

                  This field is described above.

                  DescriptionList.Item.Subject (class)

                  This class represents the collection of subjects described by a given description within a description list item.

                  Extends

                  InlineSyntaxNodeContainer (class)

                  Constructor arguments

                  See the constructor arguments for InlineSyntaxNodeContainer (class).

                  DescriptionList.Item.Description (class)

                  This class represents the description of a given collection of subjects within a description list item.

                  Extends

                  OutlineSyntaxNodeContainer (class)

                  Constructor arguments

                  See the constructor arguments for OutlineSyntaxNodeContainer (class).

                  Emphasis (class)

                  Writing convention

                  Emphasis

                  Extends

                  RichInlineSyntaxNode (class)

                  Constructor arguments

                  See the constructor arguments for RichInlineSyntaxNode (class).

                  Rendered HTML
                  <em>Hi there!</em>

                  ExampleUserInput (class)

                  Writing convention

                  Example user input

                  Implements

                  InlineSyntaxNode (interface)

                  Unique members
                  userInput: string

                  The example of user input.

                  Rendered HTML
                  <kbd>esc</kbd>

                  Footnote (class)

                  Writing convention

                  Footnotes

                  Extends

                  RichInlineSyntaxNode (class)

                  Unique members
                  referenceNumber: number

                  The number that appears in superscript for this footnote. Within a given document, this value must be unique.

                  Constructor arguments
                  children: array of InlineSyntaxNode (interface)

                  A collection of inline syntax nodes representing the content of this footnote.

                  options (optional)
                  referenceNumber: number

                  This field is described above.

                  Rendered HTML
                  <sup class="up-footnote-reference" id="up-footnote-reference-1">
                  -  <a href="#up-footnote-1">1</a>
                  -</sup>

                  FootnoteBlock (class)

                  Footnotes are written inline, but they aren't meant to appear inline in the final document. That would defeat the purpose of footnotes! Instead, footnotes are extracted and placed in footnote blocks. This class represents one of those footnote blocks.

                  Implements

                  OutlineSyntaxNode (interface)

                  Unique members
                  footnotes: array of Footnotes

                  The collection of footnotes comprising this footnote block.

                  Constructor arguments
                  footnotes: array of Footnotes

                  This field is described above.

                  Rendered HTML
                  <dl class="up-footnotes">
                  -  <dt id="up-footnote-1">
                  -    <a href="#up-footnote-reference-1">1</a>
                  -  </dt>
                  -  <dd>No relation to Warcraft!</dd>
                  -  <dt id="up-footnote-2">
                  -    <a href="#up-footnote-reference-2">2</a>
                  -  </dt>
                  -  <dd>The pathfinding algorithm had issues.</dd>
                  -</dl>

                  Heading (class)

                  Writing convention

                  Headings

                  Extends

                  InlineSyntaxNodeContainer (class)

                  Implements
                  Document.TableOfContents.Entry (interface)

                  Headings are special! No other syntax node implements this interface.

                  OutlineSyntaxNode (interface)

                  But headings also serve as regular old outline syntax nodes.

                  Unique members
                  level: number

                  A heading's level represents its significance in the document. Like HTML heading levels, a level of 1 is considered the most significant.

                  Constructor arguments
                  children: array of InlineSyntaxNode (interface)

                  A collection of inline syntax nodes representing the content of this heading.

                  options
                  level: number

                  This field is described above.

                  titleMarkup: string

                  Represents the markup for the content line of this heading.

                  Section links compare their markupSnippetFromSectionTitle against this field.

                  ordinalInTableOfContents (optional): number

                  Represents this heading's ordinal in the table of contents. The first ordinal is 1, not 0.

                  sourceLineNumber (optional): number

                  The line number of the first line of markup that created this heading.

                  Rendered HTML
                  Levels 1–6

                  Headings with levels 1 through 6 render the appropriate heading element.

                  <h1>
                  -  I am a level 1 heading!
                  -</h1>
                  -
                  -<h6>
                  -  I am a level 6 heading!
                  -</h6>
                  Levels 7 and higher

                  Headings with levels 7 and higher render <div role="heading"> elements with an aria-level attribute equal to their level.

                  <div aria-level="7" role="heading">
                  -  I am a level 7 heading!
                  -</div>
                  -
                  -<div aria-level="10" role="heading">
                  -  I am a level 10 heading!
                  -</div>

                  Highlight (class)

                  Writing convention

                  Highlighting

                  Extends

                  RichInlineSyntaxNode (class)

                  Constructor arguments

                  See the constructor arguments for RichInlineSyntaxNode (class).

                  Rendered HTML
                  <mark>Hi there!</mark>

                  Image (class)

                  Writing convention

                  Images

                  Extends

                  MediaSyntaxNode (class)

                  Constructor arguments

                  See the constructor arguments for MediaSyntaxNode (class).

                  Rendered HTML
                  <img alt="Super Mario Land box art" src="https://i.imgur.com/TxlFlkX.jpg" title="Super Mario Land box art">

                  InlineCode (class)

                  Writing convention

                  Inline code

                  Implements

                  InlineSyntaxNode (interface)

                  Unique members
                  code: string

                  The inline code represented by this syntax node.

                  Constructor arguments
                  code: string

                  This field is described above.

                  Rendered HTML
                  <code class="up-inline-code">interface</code>

                  InlineQuote (class)

                  Writing convention

                  Inline quotes

                  Extends

                  RichInlineSyntaxNode (class)

                  Constructor arguments

                  See the constructor arguments for RichInlineSyntaxNode (class).

                  Rendered HTML
                  <q>I know!</q>

                  InlineRevealable (class)

                  Writing convention

                  Inline revealables

                  Extends

                  RichInlineSyntaxNode (class)

                  Constructor arguments

                  See the constructor arguments for RichInlineSyntaxNode (class).

                  Rendered HTML
                  <span class="up-revealable">
                  -  <input checked class="up-hide" id="up-hide-button-1" name="up-revealable-1" type="radio">
                  -  <label for="up-hide-button-1" role="button" tabindex="0">hide</label>
                  -  <input class="up-reveal" id="up-reveal-button-1" name="up-revealable-1" type="radio">
                  -  <label for="up-reveal-button-1" role="button" tabindex="0">reveal</label>
                  -  <span role="alert">Ash fights Gary</span>
                  -</span>

                  Italic (class)

                  Writing convention

                  Italics

                  Extends

                  RichInlineSyntaxNode (class)

                  Constructor arguments

                  See the constructor arguments for RichInlineSyntaxNode (class).

                  Rendered HTML
                  <i>I know!</i>

                  LineBlock (class)

                  Writing convention

                  Line blocks

                  Implements

                  OutlineSyntaxNode (interface)

                  Unique members
                  lines: array of LineBlock.Line (class)

                  The collection of lines comprising this line block.

                  Constructor arguments
                  lines: array of LineBlock.Line (class)

                  This field is described above.

                  options (optional)
                  sourceLineNumber: number

                  The line number of the first line of markup that created this syntax node.

                  Rendered HTML
                  <div class="up-lines">
                  -  <div>Roses are red</div>
                  -  <div>Violets are blue</div>
                  -</div>

                  LineBlock.Line (class)

                  This class represents a line in a line block.

                  Extends

                  InlineSyntaxNodeContainer (class)

                  Constructor arguments

                  See the constructor arguments for InlineSyntaxNodeContainer (class).

                  Link (class)

                  Writing convention

                  Italics

                  Extends

                  RichInlineSyntaxNode (class)

                  Implements
                  OutlineSyntaxNode (interface)

                  If a line consists solely of media conventions (or media conventions within links), those media conventions (or their outer links) are placed directly into the outline.

                  Unique members
                  url: string

                  This links's URL after the following settings are applied:

                  Constructor arguments
                  children: array of InlineSyntaxNode (interface)

                  A collection of inline syntax nodes representing the content of this link.

                  url: string

                  This field is described above.

                  options
                  sourceLineNumber (optional): number

                  The line number of the line of markup that created this link.

                  Rendered HTML
                  <a href="https://example.com">Hi there!</a>

                  NormalParenthetical (class)

                  Writing convention

                  Parenthetical text produced by parentheses

                  Extends

                  ParentheticalSyntaxNode (class)

                  Constructor arguments

                  See the constructor arguments for ParentheticalSyntaxNode (class).

                  Rendered HTML
                  <small class="up-parenthetical">(Hi there!)</small>

                  NumberedList (class)

                  Writing convention

                  Numbered lists

                  Implements

                  OutlineSyntaxNode (interface)

                  Unique members
                  items: array of NumberedList.Item (class)

                  The collection of items comprising this numbered list.

                  start method
                  Return type: number

                  This method returns the starting ordinal of this list, if one was explicitly defined. Otherwise, this method returns undefined.

                  Arguments

                  None.

                  order method
                  Return type: NumberedList.Order (enum)

                  This method returns the order of this numered list.

                  Arguments

                  None.

                  Constructor arguments
                  items: array of NumberedList.Item (class)

                  This field is described above.

                  options (optional)
                  sourceLineNumber: number

                  The line number of the first line of markup that created this numbered list.

                  Rendered HTML
                  <ol reversed start="3">
                  -  <li value="3">
                  -    <p>Buy milk</p>
                  -  </li>
                  -  <li value="2">
                  -    <p>Buy bread</p>
                  -  </li>
                  -  <li>
                  -    <p>Buy happiness</p>
                  -  </li>
                  -</ol>

                  NumberedList.Item (class)

                  This class represents an item in a numbered list.

                  Extends

                  OutlineSyntaxNodeContainer (class)

                  Constructor arguments
                  children: array of OutlineSyntaxNode (interface)

                  A collection of outline syntax nodes representing the content of this list item.

                  options (optional)
                  ordinal: number

                  This field is described above.

                  NumberedList.Order (enum)

                  This enum represents the order of a numbered list. It has two members:

                  • Ascending, whose value is 1

                  • Descending, whose value is 2

                  Paragraph (class)

                  Writing convention

                  Paragraphs

                  Extends

                  InlineSyntaxNodeContainer (class)

                  Implements

                  OutlineSyntaxNode (interface)

                  Constructor arguments
                  children: array of InlineSyntaxNode (interface)

                  A collection of inline syntax nodes representing the content of this paragraph.

                  options (optional)
                  sourceLineNumber: number

                  The line number of the line of markup that created this paragraph.

                  Rendered HTML
                  <p>Hi there!</p>

                  RevealableBlock (class)

                  Writing convention

                  Revealable blocks

                  Extends

                  RichOutlineSyntaxNode (class)

                  Constructor arguments

                  See the constructor arguments for RichOutlineSyntaxNode (class).

                  Rendered HTML
                  <div class="up-revealable">
                  -  <input checked class="up-hide" id="up-hide-button-1" name="up-revealable-1" type="radio">
                  -  <label for="up-hide-button-1" role="button" tabindex="0">hide</label>
                  -  <input class="up-reveal" id="up-reveal-button-1" name="up-revealable-1" type="radio">
                  -  <label for="up-reveal-button-1" role="button" tabindex="0">reveal</label>
                  -  <div role="alert">
                  -    <p>Ash fights Gary.</p>
                  -  </div>
                  -</div>

                  SectionLink (class)

                  Writing convention

                  Section links

                  Implements

                  InlineSyntaxNode (interface)

                  Unique members
                  markupSnippetFromSectionTitle: string

                  This field is compared against the titleMarkup field of every table of contents entry to find the most appropriate match.

                  Constructor arguments
                  markupSnippetFromSectionTitle: string

                  This field is described above.

                  entry: Document.TableOfContents.Entry (interface)

                  The table of contents entry (i.e. heading) this section link points to.

                  Rendered HTML
                  When matched with a heading

                  Up renders a link to that heading. The rendered link contains the heading's content.

                  <a href="#up-topic-77">Using the Up library</a>
                  When not matched with a heading

                  Up renders the value of markupSnippetFromSectionTitle in italics.

                  <i>Up library</i>

                  SquareParenthetical (class)

                  Writing convention

                  Parenthetical text produced by square brackets

                  Extends

                  ParentheticalSyntaxNode (class)

                  Constructor arguments

                  See the constructor arguments for ParentheticalSyntaxNode (class).

                  Rendered HTML
                  <small class="up-parenthetical up-square-brackets">[Hi there!]</small>

                  Stress (class)

                  Writing convention

                  Stress

                  Extends

                  RichInlineSyntaxNode (class)

                  Constructor arguments

                  See the constructor arguments for RichInlineSyntaxNode (class).

                  Rendered HTML
                  <strong>Hi there!</strong>

                  Table (class)

                  Writing convention

                  Tables

                  Implements

                  OutlineSyntaxNode (interface)

                  Unique members
                  header: Table.Header (class)

                  The header row.

                  rows: array of Table.Row (class)

                  The content rows.

                  caption: Table.Caption (class)

                  The optional caption.

                  Constructor arguments
                  header: Table.Header (class)

                  This field is described above.

                  rows: array of Table.Row (class)

                  This field is described above.

                  caption: Table.Caption (class)

                  This field is described above.

                  options (optional)
                  sourceLineNumber: number

                  The line number of the first line of markup that created this table.

                  Rendered HTML
                  Without header column
                  <table>
                  -  <caption>Moves learned by the Pokémon Bulbasaur</caption>
                  -  <tr>
                  -    <th scope="col">Level</th>
                  -    <th scope="col">Move</th>
                  -    <th scope="col">Type</th>
                  -    <th scope="col">Power</th>
                  -    <th scope="col">Accuracy</th>
                  -  </tr>
                  -  <tr>
                  -    <td class="up-numeric">1</td>
                  -    <td>Tackle</td>
                  -    <td>Normal</td>
                  -    <td class="up-numeric">50</td>
                  -    <td class="up-numeric">100%</td>
                  -  </tr>
                  -  <tr>
                  -    <td class="up-numeric">3</td>
                  -    <td>Growl</td>
                  -    <td>Normal</td>
                  -    <td></td>
                  -    <td class="up-numeric">100%</td>
                  -  </tr>
                  -</table>
                  With header column
                  <table>
                  -  <caption>Moves learned by the Pokémon Bulbasaur</caption>
                  -  <tr>
                  -    <th scope="col"></th>
                  -    <th scope="col">Level</th>
                  -    <th scope="col">Type</th>
                  -    <th scope="col">Power</th>
                  -    <th scope="col">Accuracy</th>
                  -  </tr>
                  -  <tr>
                  -    <th scope="row">Tackle</th>
                  -    <td class="up-numeric">1</td>
                  -    <td>Normal</td>
                  -    <td class="up-numeric">50</td>
                  -    <td class="up-numeric">100%</td>
                  -  </tr>
                  -  <tr>
                  -    <th scope="row">Growl</th>
                  -    <td class="up-numeric">3</td>
                  -    <td>Normal</td>
                  -    <td></td>
                  -    <td class="up-numeric">100%</td>
                  -  </tr>
                  -</table>

                  Table.Caption (class)

                  This class represents the caption of a table.

                  Extends

                  InlineSyntaxNodeContainer (class)

                  Constructor arguments

                  See the constructor arguments for InlineSyntaxNodeContainer (class).

                  Table.Cell (class)

                  This abstract class represents a table cell.

                  Extends

                  InlineSyntaxNodeContainer (class)

                  Unique members
                  isNumeric method
                  Return type: boolean

                  This method returns a boolean indicating whether the content of this cell is numeric.

                  Arguments

                  None.

                  Constructor arguments

                  See the constructor arguments for InlineSyntaxNodeContainer (class).

                  Table.Header (class)

                  This class represents the header row of a table.

                  Unique members
                  cells: array of Table.Header.Cell (class)

                  The cells in this header row.

                  Constructor arguments
                  cells: array of Table.Header.Cell (class)

                  This field is described above.

                  Table.Header.Cell (class)

                  This class represents a table header cell.

                  Extends

                  Table.Cell (class)

                  Constructor arguments

                  See the constructor arguments for InlineSyntaxNodeContainer (class).

                  Table.Row (class)

                  This class represents a content row in a table.

                  Unique members
                  cells: array of Table.Row.Cell (class)

                  The content cells in this row.

                  headerColumnCell: Table.Header.Cell (class)

                  The single header column cell for this row, if there is one.

                  Tables without header columns never have header column cells.

                  allCellsStartingWithHeaderColumnCell method
                  Return type: array of Table.Cell (class)

                  This method returns every cell in this row.

                  If the table has a header column, the row's headerColumnCell is the first item in the returned collection.

                  Arguments

                  None.

                  Constructor arguments
                  cells: array of Table.Row.Cell (class)

                  This field is described above.

                  headerColumnCell: Table.Header.Cell (class)

                  This field is described above.

                  Table.Row.Cell (class)

                  This class represents a regular (non-header) table cell.

                  Extends

                  Table.Cell (class)

                  Constructor arguments

                  See the constructor arguments for InlineSyntaxNodeContainer (class).

                  Text (class)

                  This class represents regular text content.

                  Implements

                  InlineSyntaxNode (interface)

                  Unique members
                  text: string

                  The text represented by this syntax node.

                  Constructor arguments
                  text: string

                  This field is described above.

                  Rendered HTML
                  Yes, 1 &lt; 2

                  ThematicBreak (class)

                  Writing convention

                  Thematic breaks

                  Extends

                  OutlineSyntaxNode (interface)

                  Constructor arguments
                  options (optional)
                  sourceLineNumber: number

                  The line number of the line of markup that created this thematic break.

                  Rendered HTML
                  <hr>

                  Video (class)

                  Writing convention

                  Video

                  Extends

                  MediaSyntaxNode (class)

                  Constructor arguments

                  See the constructor arguments for MediaSyntaxNode (class).

                  Rendered HTML
                  <video controls src="https://i.imgur.com/32fBpnh.mp4" title="Professor Leonard">
                  -  <a href="https://i.imgur.com/32fBpnh.mp4">Professor Leonard</a>
                  -</video>
                  -
                  -
                  - -
                  + +See? Not so hard!

                  Linkifying another writing convention

                  You can put Images inside of Links, but the syntax can be a bit messy.

                  Messy markup
                  [(image: Warlocked box art) (i.imgur.com/879AeYU.jpg)] [en.wikipedia.org/wiki/Warlocked]
                  
                  Output
                  Warlocked box art

                  That's a lot of brackets! Luckily, there's a shortcut.

                  Simply place the linkifying URL after the image's own URL, and Up will produce a link for you.

                  Cleaner markup
                  [image: Warlocked box art] [i.imgur.com/879AeYU.jpg] (en.wikipedia.org/wiki/Warlocked)
                  
                  Output
                  Warlocked box art

                  When linkifying an image, you can mix and match square brackets and parentheses—they're totally interchangeable.

                  This shortcut also works for the following inline writing conventions:

                  Example user input
                  Markup
                  Press {space} (en.wikipedia.org/wiki/Space_bar) to continue.
                  
                  Output

                  Press space to continue.

                  Footnotes
                  Markup
                  Pokémon is old [^ Released in 1996!] (en.wikipedia.org/wiki/Pokémon_Red_and_Blue) but it maintains its charm.
                  
                  Output

                  Pokémon is old5 but it maintains its charm.

                  Inline revealables
                  Markup
                  At the end of Pokémon Red, [SPOILER: you battle your rival] (pokemon.wikia.com/wiki/Rival) before the credits roll.
                  
                  Output

                  At the end of Pokémon Red, you battle your rival before the credits roll.

                  5
                  Released in 1996!

                  Typographical writing conventions

                  Ellipsis

                  Consecutive periods represent an ellipsis, so Up replaces them with a fancy ellipsis character.

                  Markup
                  I don't know... I doubt a spider would do this.
                  
                  Output

                  I don't know… I doubt a spider would do this.

                  If you're a software developer using the Up library, you can specify a different fancy ellipsis (e.g. ). To learn more, see fancyEllipsis (setting).

                  En dash

                  Two consecutive hyphens produce an en dash.

                  Markup
                  I agree -- to an extent -- with your plan to eat nothing but cereal.
                  
                  Output

                  I agree – to an extent – with your plan to eat nothing but cereal.

                  Em dash

                  Three consecutive hyphens produce an em dash.

                  Markup
                  Use a spoon---a fork won't cut it.
                  
                  Output

                  Use a spoon—a fork won't cut it.

                  Plus-minus sign

                  A plus sigh followed by a hyphen produces a plus-minus sign.

                  Markup
                  I ate 5 waffles +- 2.
                  
                  Output

                  I ate 5 waffles ± 2.

                  Excessive delimiter characters

                  For Emphasis, Stress, Italics, Bold, Highlighting, and Inline quotes, Up ignores any excessive delimiter characters.

                  Markup
                  This organic, ====gluten-free==== cupcake is too expensive.
                  
                  Output

                  This organic, gluten-free cupcake is too expensive.

                  This includes when delimiter characters aren't perfectly balanced on either side.

                  Markup
                  My favorite video game is _Chrono Cross__.
                  
                  Output

                  My favorite video game is Chrono Cross.

                  Disabling special characters

                  To disable the special meaning of a character, put a backslash before it.

                  Markup
                  I love \*asterisks*!
                  
                  Output

                  I love *asterisks*!

                  Likewise, to disable the special meaning of a backslash, put another backslash before it.

                  Markup
                  My favorite kind of slash is the backslash: \\. What is yours?
                  
                  Output

                  My favorite kind of slash is the backslash: \. What is yours?

                  Overlapping writing conventions

                  In Up, inline writing conventions can freely overlap.

                  Markup
                  John **enjoys ==sleeping** late== whenever he can.
                  
                  Output

                  John enjoys sleeping late whenever he can.

                  Superficial overlapping

                  If conventions overlap superficially—by only their start or end delimiters—Up pretends they weren't overlapped at all.

                  Markup
                  At the end of Pokémon Red, [SPOILER: you battle your rival *yet again]* before the credits roll.
                  
                  Output

                  At the end of Pokémon Red, you battle your rival yet again before the credits roll.


                  Using the Up library

                  The Up library can be found on NPM.

                  Installation

                  npm install up-lang --save
                  

                  Usage Overview

                  Typically, you'll want to use one of the various Functions exported by the library.

                  const { parseAndRender } = require("up-lang")
                  +
                  +const html = parseAndRender(markup, optionalSettings)
                  

                  Alternatively, you can use the exported Up class, which can be helpful if you need to parse or render several documents sharing custom settings. Please see Up (class) to learn more.

                  If you plan to modify or analyze a parsed document, you'll want to check out the Abstract syntax tree classes.

                  Functions

                  parseAndRender (function)

                  This function converts Up markup into HTML and returns the result.

                  Arguments
                  markup: string

                  The Up markup to convert into HTML.

                  settings (optional): Settings (interface)

                  The custom parsing and/or rendering settings to apply.

                  Return type: string

                  This function returns HTML representing the rendered document.

                  Usage
                  Without custom settings
                  const html = parseAndRender(markup)
                  
                  With custom settings
                  const html = parseAndRender(markup, {
                  +  parsing: {
                  +    createSourceMap: true,
                  +    keywords: { audio: "listen" }
                  +  },
                  +  rendering: {
                  +    idPrefix: "article"
                  +  }
                  +})
                  

                  parseAndRenderWithTableOfContents (function)

                  This function converts Up markup into two pieces of HTML, both of which are returned:

                  1. A table of contents

                  2. The document itself

                  Arguments
                  markup: string

                  The Up markup to parse and render.

                  settings (optional): Settings (interface)

                  The custom parsing and/or rendering settings to apply.

                  Return type: DocumentAndTableOfContentsHtml (interface)

                  This function returns HTML representing the rendered document and table of contents.

                  Usage
                  Without custom settings
                  const { tableOfContentsHtml, documentHtml } =
                  +  parseAndRenderWithTableOfContents(markup)
                  
                  With custom settings
                  const { tableOfContentsHtml, documentHtml } =
                  +  parseAndRenderWithTableOfContents(markup, {
                  +    parsing: {
                  +      createSourceMap: true,
                  +      keywords: { audio: "listen" }
                  +    },
                  +    rendering: {
                  +      idPrefix: "article",
                  +      terms: { reveal: "expand" }
                  +    }
                  +  })
                  

                  DocumentAndTableOfContentsHtml (interface)

                  This interface represents the HTML for a rendered document and its table of contents.

                  Members
                  tableOfContentsHtml: string

                  The HTML for the table of contents.

                  documentHtml: string

                  The HTML for the document itself.

                  Notes

                  The following functions return an object satisfying this interface:

                  parseAndRenderInline (function)

                  This function converts inline Up markup into inline HTML and returns the result.

                  To learn more about inline documents, see Inline documents.

                  Arguments
                  inlineMarkup: string

                  The inline Up markup to convert into inline HTML.

                  parsingSettings (optional): Settings (interface)

                  The custom parsing and/or rendering settings to apply.

                  Return type: string

                  This function returns HTML representing the rendered inline document.

                  Usage
                  Without custom settings
                  const html = parseAndRenderInline(markup)
                  
                  With custom settings
                  const html = parseAndRenderInline(markup, {
                  +  parsing: {
                  +    baseForUrlsStartingWithSlash: "https://example.com/en-us",
                  +    keywords: { audio: "listen" }
                  +  },
                  +  rendering: {
                  +    idPrefix: "byline",
                  +    terms: {
                  +      footnoteReference: "footnote mention",
                  +      reveal: "show"
                  +    }
                  +  }
                  +})
                  

                  parse (function)

                  This function parses Up markup and returns the resulting syntax tree.

                  Arguments
                  markup: string

                  The Up markup to parse.

                  parsingSettings (optional): Settings.Parsing (interface)

                  The custom parsing settings to apply.

                  Return type: Document (class)

                  This function returns a syntax tree representing the parsed document.

                  Usage
                  Without custom settings
                  const html = parse(markup)
                  
                  With custom settings
                  const document = parse(markup, {
                  +  createSourceMap: true,
                  +  keywords: { audio: "listen" }
                  +})
                  

                  parseInline (function)

                  This function parses inline Up markup and returns the resulting inline syntax tree.

                  To learn more about inline documents, see Inline documents.

                  Arguments
                  inlineMarkup: string

                  The inline Up markup to parse.

                  parsingSettings (optional): Settings.Parsing (interface)

                  The custom parsing settings to apply.

                  Return type: InlineDocument (class)

                  This function returns an inline syntax tree representing the parsed document.

                  Usage
                  Without custom settings
                  const html = parseInline(markup)
                  
                  With custom settings
                  const html = parseInline(markup, {
                  +  baseForUrlsStartingWithSlash: "https://example.com/en-us",
                  +  keywords: { audio: "listen" }
                  +})
                  

                  render (function)

                  This function converts a syntax tree into HTML and returns the result.

                  Arguments
                  document: Document (class)

                  The syntax tree to convert into HTML.

                  renderingSettings (optional): Settings.Rendering (interface)

                  The custom rendering settings to apply.

                  Return type: string

                  This function returns HTML representing the rendered document.

                  Usage
                  Without custom settings
                  const html = render(document)
                  
                  With custom settings
                  const html = render(document, {
                  +  idPrefix: "article",
                  +  terms: {
                  +    footnoteReference: "footnote mention",
                  +    reveal: "show"
                  +  }
                  +})
                  

                  renderWithTableOfContents (function)

                  This function converts a syntax tree into two pieces of HTML, both of which are returned:

                  1. A table of contents

                  2. The document itself

                  Arguments
                  document: Document (class)

                  The syntax tree to convert into HTML.

                  renderingSettings (optional): Settings.Rendering (interface)

                  The custom rendering settings to apply.

                  Return type: DocumentAndTableOfContentsHtml (interface)

                  This function returns HTML representing the rendered document and table of contents.

                  Usage
                  Without custom settings
                  const { tableOfContentsHtml, documentHtml } =
                  +  renderWithTableOfContents(document)
                  
                  With custom settings
                  const { tableOfContentsHtml, documentHtml } =
                  +  renderWithTableOfContents(document, {
                  +    idPrefix: "article",
                  +    terms: { revveal: "expand" }
                  +  })
                  

                  renderInline (function)

                  This function converts an inline syntax tree into inline HTML and returns the result.

                  To learn more about inline documents, see Inline documents.

                  Arguments
                  inlineDocument: InlineDocument (class)

                  The inline syntax tree to convert into HTML.

                  renderingSettings (optional): Settings.Rendering (interface)

                  The custom rendering settings to apply.

                  Return type: string

                  This function returns HTML representing the rendered inline document.

                  Usage
                  Without custom settings
                  const html = renderInline(inlineDocument)
                  
                  With custom settings
                  const html = renderInline(inlineDocument, {
                  +  idPrefix: "byline",
                  +  terms: {
                  +    footnoteReference: "footnote mention",
                  +    reveal: "show"
                  +  }
                  +})
                  

                  Up (class)

                  Anything you can accomplish using the Up class, you can accomplish using the regular Functions exported by the library.

                  However, the Up class can be helpful if you need to parse or render several documents sharing custom settings.

                  Those shared settings can be provided just once—in the constructor. Then, when calling methods on your object, you only need to provide settings that overwrite (or supplement) the ones you provided to the constructor.

                  const { Up } = require("up-lang")
                  +
                  +const up = new Up(settings)
                  +const html = up.parseAndRender(markup, changedSettings)
                  

                  Constructor arguments

                  settings (optional): Settings (interface)

                  The custom parsing and/or rendering settings to apply to all subsequent method calls.

                  const up = new Up({
                  +  parsing: {
                  +    fancyEllipsis: "⋯",
                  +    keywords: {
                  +      audio: ["sound", "song"],
                  +      revealable: "hide"
                  +    }
                  +  },
                  +  rendering: {
                  +    idPrefix: 'article',
                  +    terms: { reveal: "expand" }
                  +  }
                  +})
                  

                  Methods

                  This class's methods have the exact same names and arguments as the library's Functions.

                  Invoking a method with custom settings

                  When a method is invoked with custom settings, those settings are merged with the settings provided to the constructor. If any individual settings conflict, Up uses the conflicting values provided to the method.

                  Example
                  const up = new Up({
                  +  parsing: {
                  +    createSourceMap: true,
                  +    fancyEllipsis: "⋯",
                  +    keywords: {
                  +      audio: ["sound", "song"],
                  +      revealable: "hide"
                  +    }
                  +  },
                  +  rendering: {
                  +    terms: { reveal: "expand" }
                  +  }
                  +})
                  +
                  +const html = up.parseAndRender(markup, {
                  +  parsing: {
                  +    createSourceMap: false,
                  +    keywords: {
                  +      audio: "listen"
                  +    }
                  +  },
                  +  rendering: {
                  +    idPrefix: "article"
                  +  }
                  +})
                  
                  Result

                  In the above example, the following settings are ultimately applied:

                  {
                  +  parsing: {
                  +    createSourceMap: false,
                  +    fancyEllipsis: "⋯",
                  +    keywords: {
                  +      audio: "listen",
                  +      revealable: "hide"
                  +    }
                  +  },
                  +  rendering: {
                  +    idPrefix: "article",
                  +    terms: { reveal: "expand" }
                  +  }
                  +}
                  

                  Library configuration

                  The Up library works out of the box! No configuration is necessary.

                  However, all Functions do accept optional custom settings. These various settings are described below.

                  Settings (interface)

                  The Settings interface includes both parsing settings and rendering settings.

                  Use this interface to provide custom settings to functions that both parse markup and render the result to HTML:

                  Usage
                  const html = parseAndRender(markup, {
                  +  parsing: {
                  +    createSourceMap: true,
                  +    keywords: { audio: "listen" }
                  +  },
                  +  rendering: {
                  +    idPrefix: "article"
                  +  }
                  +})
                  
                  Members (both of which are optional)
                  parsing: Settings.Parsing (interface)

                  The custom parsing settings to apply.

                  rendering: Settings.Rendering (interface)

                  The custom rendering settings to apply.

                  Settings.Parsing (interface)

                  The Settings.Parsing interface includes all parsing settings.

                  Use this interface to provide custom settings to functions that parse markup and return the resulting syntax tree:

                  As part of Settings (interface), this interface also provides parsing custom settings to functions that both parse markup and render the result to HTML:

                  Usage
                  const document = parse(markup, {
                  +  createSourceMap: true,
                  +  keywords: {
                  +    audio: ["sound", "song"],
                  +    audio: "listen"
                  +  }
                  +})
                  
                  Members (all of which are optional)
                  createSourceMap (setting): boolean

                  Enables source mapping.

                  defaultUrlScheme (setting): string

                  The default URL scheme for URLs without one.

                  baseForUrlsStartingWithSlash (setting): string

                  The base for URLs starting with /.

                  baseForUrlsStartingWithHashMark (setting): string

                  The base for URLs starting with #.

                  fancyEllipsis (setting): string

                  Up replaces consecutive periods with this fancy ellipsis.

                  keywords (all of which are optional)

                  Customizing keywords

                  You can provide unlimited custom variations for each keyword. Custom keyword variations do not overwrite the default keywords.

                  const document = parse(markup, {
                  +  keywords: {
                  +    audio: ["sound", "song"],
                  +    audio: "listen"
                  +  }
                  +})
                  

                  Like the default keywords, custom keyword variations are case-insensitive.

                  audio: string or string[]

                  Recognized by Audio.

                  image: string or string[]

                  Recognized by Images.

                  revealable: string or string[]

                  Recognized by Inline revealables and Revealable blocks.

                  sectionLink: string or string[]

                  Recognized by Section links.

                  table: string or string[]

                  Recognized by Tables.

                  video: string or string[]

                  Recognized by Video.

                  createSourceMap (setting)

                  When createSourceMap is enabled, Up keeps track of the original line number for every instance of every outline writing convention.

                  This setting works by setting the sourceLineNumber field of each OutlineSyntaxNode (interface).

                  Usage
                  const html = parseAndRender(markup, {
                  +  parsing: {
                  +    createSourceMap: true
                  +  }
                  +})
                  
                  Default value

                  false

                  Context

                  This setting belongs to Settings.Parsing (interface).

                  defaultUrlScheme (setting)

                  The defaultUrlScheme is prefixed to any link URL or media URL without a URL scheme.

                  For URLs with a URL scheme, this setting has no effect. Furthermore, this setting is not applied to URLs that start with / or #. For those URLs, see:

                  Usage
                  const html = parseAndRender(markup, {
                  +  parsing: {
                  +    defaultUrlScheme: "my-app://"
                  +  }
                  +})
                  
                  Default value

                  "https://"

                  Context

                  This setting belongs to Settings.Parsing (interface).

                  baseForUrlsStartingWithSlash (setting)

                  The baseForUrlsStartingWithSlash is prefixed to any link URL or media URL starting with /.

                  Usage
                  const html = parseAndRender(markup, {
                  +  parsing: {
                  +    baseForUrlsStartingWithSlash: "https://example.com/blog/"
                  +  }
                  +})
                  
                  Default value

                  "" (an empty string)

                  Context

                  This setting belongs to Settings.Parsing (interface).

                  baseForUrlsStartingWithHashMark (setting)

                  The baseForUrlsStartingWithSlash is prefixed to any link URL or media URL starting with #.

                  Usage
                  const html = parseAndRender(markup, {
                  +  parsing: {
                  +    baseForUrlsStartingWithHashMark: "https://example.com/blog/post/28"
                  +  }
                  +})
                  
                  Default value

                  "" (an empty string)

                  Context

                  This setting belongs to Settings.Parsing (interface).

                  fancyEllipsis (setting)

                  Up automatically replaces consecutive periods with fancyEllipsis.

                  By default, fancyEllipsis is . If you want Up to use a different fancy ellipsis (e.g. or even . . .), set fancyEllipsis accordingly.

                  Usage
                  const html = parseAndRender(markup, {
                  +  parsing: {
                  +    fancyEllipsis: "⋯"
                  +  }
                  +})
                  
                  Default value

                  "…"

                  Context

                  This setting belongs to Settings.Parsing (interface).

                  Settings.Rendering (interface)

                  The Settings.Rendering interface includes all rendering settings.

                  Use this interface to provide custom settings to functions that render syntax trees to HTML:

                  As part of Settings (interface), this interface also provides custom rendering settings to functions that both parse markup and render the result to HTML:

                  Usage
                  const html = render(document, {
                  +  idPrefix: "article",
                  +  terms: {
                  +    footnoteReference: "footnote mention",
                  +    reveal: "show"
                  +  }
                  +})
                  
                  Members (all of which are optional)
                  idPrefix (setting): string

                  The prefix to apply to HTML IDs.

                  renderDangerousContent (setting): boolean

                  Enables the rendering of dangerous content. Enabling this setting is not recommended!

                  terms (all of which are optional)
                  footnote: string

                  Appears in the URLs of links pointing to footnotes in their footnote blocks.

                  footnoteReference: string

                  Appears in the URLs of links pointing back to footnote references (i.e. back to the superscripts within paragraphs).

                  hide: string

                  Appears on the button that hides revealable content.

                  reveal: string

                  Appears on the button that reveals revealable content.

                  sectionReferencedByTableOfContents: string

                  Appears in the URLs of table of contents entries.

                  You don't need to worry about escaping any characters in your custom terms! Up handles that for you.

                  idPrefix (setting)

                  If you are rendering multiple documents onto the same page, you need to use this setting to prevent HTML ID collisions between documents.

                  By default, idPrefix is up to prevent ID collisions with any HTML elements not rendered by Up. If you don't want any ID prefix, you can set idPrefix to an empty string.

                  You don't need to worry about escaping HTML for your idPrefix—Up automatically handles that for you. Furthermore, Up automatically converts any spaces in your idPrefix to hyphens.

                  Usage
                  const html = parseAndRender(markup, {
                  +  rendering: {
                  +    idPrefix: "article"
                  +  }
                  +})
                  
                  Context

                  This setting belongs to Settings.Rendering (interface).

                  Default value

                  "up"

                  renderDangerousContent (setting)

                  Normally, Up will not render links or media elements with potentially exploitable URI schemes: javascript, vbscript, data, and file.

                  When this setting is enabled, Up will dutifully render all links and media elements.

                  Usage
                  const html = parseAndRender(markup, {
                  +  rendering: {
                  +    renderDangerousContent: true
                  +  }
                  +})
                  
                  Default value

                  false

                  Context

                  This setting belongs to Settings.Rendering (interface).


                  Inline documents

                  In certain contexts, you might want to restrict a document to just a single line:

                  • A chat message

                  • The title of a thread on a message board

                  • The byline for a user's profile

                  That's what inline documents are for! To take advantage of inline documents, use one of the following functions:

                  Syntax differences

                  Within inline documents, Up ignores all outline writing conventions. Furthermore, Footnotes and Section links aren't supported.

                  When Up encounters a footnote in an inline document, it pretends the author had used parentheses instead of a footnote.

                  Inline markup
                  My dad [^ Professor Oak] is very wise.
                  
                  Output

                  My dad (Professor Oak) is very wise.

                  Within inline documents, Up doesn't recognize the syntax for section links. Consequently, their markup is instead treated as regular old text enclosed within brackets.

                  Inline markup
                  I enjoyed our conversation [topic: the weather].
                  
                  Output

                  I enjoyed our conversation [topic: the weather].

                  Rendered HTML

                  When inline documents are rendered, the resulting HTML is not enclosed within any container element (e.g. <p>).

                  Inline markup
                  I *really* like Starcraft.
                  
                  Rendered inline HTML
                  I <em>really</em> like Starcraft.
                  

                  Abstract syntax tree classes

                  Unless you're fiddling with the abstract syntax tree of a parsed document, you can safely ignore this section.

                  Every class used in the abstract syntax tree is exported by the library.

                  const { Blockquote } = require("up-lang")
                  +
                  +if (syntaxNode instanceof Blockquote) {
                  +  // Do something
                  +}
                  

                  If you're using TypeScript, you can take advantage of several interfaces used in the abstract syntax tree, too.

                  const { SyntaxNode } = require("up-lang")
                  +
                  +function handle(node: SyntaxNode): void {
                  +  // Do something
                  +}
                  

                  All classes and interfaces are described below.

                  Document (class)

                  This class represents the syntax tree for a parsed document.

                  Extends

                  OutlineSyntaxNodeContainer (class)

                  Unique members
                  tableOfContents: Document.TableOfContents (class)

                  An object representing the document's table of contents.

                  create method (static)
                  Purpose

                  This method returns a ready-to-render syntax tree from a collection of outline syntax nodes.

                  Usually, you'll want to use this static method instead of the constructor.

                  Arguments
                  children: array of OutlineSyntaxNode (interface)

                  A collection of outline syntax nodes representing the content of this document.

                  Return type: Document (class)

                  This method creates and returns a ready-to-render Document object.

                  To prepare the document for rendering, this method:

                  • Assigns footnotes their reference numbers

                  • Extracts footnotes into footnote blocks

                  • Produces a table of contents

                  • Matches section links with table of contents entries

                  Constructor arguments
                  children: array of OutlineSyntaxNode (interface)

                  A collection of outline syntax nodes representing the content of this document.

                  tableOfContents (optional): Document.TableOfContents (class)

                  The document's table of contents.

                  Rendered HTML

                  When rendered to HTML, the document is not put into an outer container element.

                  <p>
                  +  Unlike regular dental floss, you can use floss picks even if you're <em>not</em> a trained dental hygienist.
                  +</p>
                  +<p>
                  +  Floss picks are sold in stylish, resealable plastic bags. You have no excuse not to buy some today.
                  +</p>
                  

                  Document.TableOfContents (class)

                  This class represents the table of contents for a document. The table of contents includes every heading except those found within Revealable content.

                  Members
                  entries: array of Document.TableOfContents.Entry (interface)

                  A collection of entries representing headings in the document. In fact, the objects in this collection are the same Heading (class) objects in the document itself.

                  Constructor arguments
                  entries: array of Document.TableOfContents.Entry (interface)

                  The entries in the table of contents.

                  Rendered HTML

                  Each entry in the table of contents renders a heading element corresponding to its level. This heading element contains a link to the appropriate section in the document.

                  To learn more on how headings are rendered, please see Heading (class).

                  <h1>
                  +  <a href="#up-topic-1">Fun things</a>
                  +</h1>
                  +<h2>
                  +  <a href="#up-topic-2">Games</a>
                  +</h2>
                  +<h3>
                  +  <a href="#up-topic-3">Video games</a>
                  +</h3>
                  +<h4>
                  +  <a href="#up-topic-4">Released in the 2000s</a>
                  +</h4>
                  +<h5>
                  +  <a href="#up-topic-5">For Nintendo devices</a>
                  +</h5>
                  +<h6>
                  +  <a href="#up-topic-6">Nintendo 64</a>
                  +</h6>
                  +<div aria-level="7" role="heading">
                  +  <a href="#up-topic-6">Pokémon Puzzle League</a>
                  +</div>
                  +<h6>
                  +  <a href="#up-topic-8">Game Boy</a>
                  +</h6>
                  +<div aria-level="7" role="heading">
                  +  <a href="#up-topic-9">Game Boy Color Exclusives</a>
                  +</div>
                  +<div aria-level="8" role="heading">
                  +  <a href="#up-topic-10">Warlocked</a>
                  +</div>
                  
                  Document.TableOfContents.Entry (interface)

                  This interface represents an entry in the table of contents.

                  Members
                  ordinalInTableOfContents: number

                  The entry's ordinal in the table of contents. The first ordinal is 1, not 0.

                  level: number

                  The heading level of the entry. Like HTML heading levels, a level of 1 is considered the most significant.

                  children: array of InlineSyntaxNode (interface)

                  The inline syntax nodes representing this entry in the table of contents.

                  titleMarkup: string

                  Currently, headings are the only writing convention that produce table of contents entries, so the titleMarkup field always represents the markup for the content line of a heading.

                  Section links compare their markupSnippetFromSectionTitle against this field.

                  sourceLineNumber: number

                  If createSourceMap (setting) is enabled, this field is set to the line number of the first line of markup that produced the heading represented by this entry. Source line numbers start at 1, not 0.

                  When rendered to HTML, entries with source line numbers are given a data-up-source-line attribute set the appropriate line number.

                  <h3 data-up-source-line="51">
                  +  <a href="#up-topic-5">Video games</a>
                  +</h3>
                  
                  contentWithinTableOfContents method
                  Return type: array of InlineSyntaxNode (interface)

                  This method returns the inline syntax nodes that should represent this entry's content inside the table of contents itself.

                  Arguments

                  None.

                  InlineDocument (class)

                  This class represents the syntax tree for a parsed inline document.

                  Extends

                  InlineSyntaxNodeContainer (class)

                  Constructor arguments

                  See the constructor arguments for InlineSyntaxNodeContainer (class).

                  Rendered HTML

                  When rendered to HTML, an inline document is not put into an outer container element.

                  I <em>love</em> dental floss!
                  

                  SyntaxNode (interface)

                  All syntax node classes must implement this interface.

                  Members
                  inlineDescendants method
                  Return type: array of InlineSyntaxNode (interface)

                  This method returns all inline descendants (including children, grandchildren, etc.).

                  Arguments

                  None.

                  Notes

                  This interface also has a render method, but it isn't relevant to developers using the Up library.

                  InlineSyntaxNode (interface)

                  All inline syntax node classes must implement this interface.

                  Extends

                  SyntaxNode (interface)

                  Unique members
                  searchableText method
                  Return type: string

                  This method returns the searchable text of the syntax node.

                  Ultimately, this method helps match Section links to the the most appropriate table of content entry.

                  Arguments

                  None.

                  textAppearingInline method
                  Return type: string

                  This method returns the text of the syntax node as it should appear inline. Some inline writing conventions don't have any text appearing inline, including Footnotes and Images.

                  This method is helps determine whether table cells are numeric.

                  Arguments

                  None.

                  OutlineSyntaxNode (interface)

                  All outline syntax node classes must implement this interface.

                  Extends

                  SyntaxNode (interface)

                  Unique members
                  sourceLineNumber: number

                  If createSourceMap (setting) is enabled, this field is set to the first line of markup that produced this syntax node. Source line numbers start at 1, not 0.

                  HTML elements rendered by outline syntax nodes with source line numbers are given a data-up-source-line attribute set the appropriate line number.

                  <p data-up-source-line="24">Hi there!</p>
                  
                  descendantsToIncludeInTableOfContents method
                  Return type: array of Document.TableOfContents.Entry (interface)

                  This method returns any descendants (at any nesting level) to include in the table of contents.

                  Arguments

                  None.

                  RichInlineSyntaxNode (class)

                  This abstract class represents an inline syntax node that can contain other inline syntax nodes.

                  Extends

                  InlineSyntaxNodeContainer (class)

                  Implements

                  InlineSyntaxNode (interface)

                  Constructor arguments

                  See the constructor arguments for InlineSyntaxNodeContainer (class).

                  RichOutlineSyntaxNode (class)

                  This abstract class represents an outline syntax node that can contain other outline syntax nodes.

                  Extends

                  OutlineSyntaxNodeContainer (class)

                  Implements

                  OutlineSyntaxNode (interface)

                  Constructor arguments
                  children: array of OutlineSyntaxNode (interface)

                  A collection of outline syntax nodes representing the content of this syntax node.

                  options (optional)
                  sourceLineNumber: number

                  The line number of the first line of markup that created this syntax node.

                  InlineSyntaxNodeContainer (class)

                  This abstract class represents a container of inline syntax nodes.

                  Members
                  children: array of InlineSyntaxNode (interface)

                  A collection of inline syntax nodes representing the content of this container.

                  inlineDescendants method
                  Return type: array of InlineSyntaxNode (interface)

                  This method returns all inline descendants (including children, grandchildren, etc.).

                  Arguments

                  None.

                  Constructor arguments
                  children: array of InlineSyntaxNode (interface)

                  This field is described above.

                  OutlineSyntaxNodeContainer (class)

                  This abstract class represents a container of outline syntax nodes.

                  Members
                  children: array of OutlineSyntaxNode (interface)

                  A collection of outline syntax nodes representing the content of this container.

                  descendantsToIncludeInTableOfContents method
                  Return type: array of Document.TableOfContents.Entry (interface)

                  This method returns any descendants (children, grandchildren, etc.) to include in the table of contents.

                  Arguments

                  None.

                  inlineDescendants method
                  Return type: array of InlineSyntaxNode (interface)

                  This method returns all inline descendants of children.

                  Arguments

                  None.

                  Constructor arguments
                  children: array of OutlineSyntaxNode (interface)

                  This field is described above.

                  MediaSyntaxNode (class)

                  All media syntax node classes extend this abstract class:

                  Implements
                  InlineSyntaxNode (interface)

                  Media conventions can appear inline (i.e. within paragraphs).

                  OutlineSyntaxNode (interface)

                  If a line consists solely of media conventions (or media conventions within links), those media conventions (or their outer links) are placed directly into the outline.

                  Unique members
                  description: string

                  The media's description.

                  url: string

                  Represents the media's URL after the following settings are applied:

                  Constructor arguments
                  description: string

                  The media's description.

                  url: string

                  The media's URL.

                  options (optional)
                  sourceLineNumber: number

                  The line number of the line of markup that created this media syntax node.

                  ParentheticalSyntaxNode (class)

                  This abstract class represents Parenthetical text. It exists solely to improve the expressiveness of the type system.

                  It is extended by both parenthetical syntax node classes:

                  Extends

                  RichInlineSyntaxNode (class)

                  Constructor arguments

                  See the constructor arguments for RichInlineSyntaxNode (class).

                  Audio (class)

                  Writing convention

                  Audio

                  Extends

                  MediaSyntaxNode (class)

                  Constructor arguments

                  See the constructor arguments for MediaSyntaxNode (class).

                  Rendered HTML
                  <audio controls src="https://a.clyp.it/ybct5hcl.mp3" title="Sadness theme from Infinity for Game Boy">
                  +  <a href="https://a.clyp.it/ybct5hcl.mp3">Sadness theme from Infinity for Game Boy</a>
                  +</audio>
                  

                  Blockquote (class)

                  Writing convention

                  Blockquotes

                  Extends

                  RichOutlineSyntaxNode (class)

                  Constructor arguments

                  See the constructor arguments for RichOutlineSyntaxNode (class).

                  Rendered HTML
                  <blockquote>
                  +  <p>Hi there!</p>
                  +</blockquote>
                  

                  Bold (class)

                  Writing convention

                  Audio

                  Extends

                  RichInlineSyntaxNode (class)

                  Constructor arguments

                  See the constructor arguments for RichInlineSyntaxNode (class).

                  Rendered HTML
                  <b>Hi there!</b>
                  

                  BulletedList (class)

                  Writing convention

                  Bulleted lists

                  Implements

                  OutlineSyntaxNode (interface)

                  Unique members
                  items: array of BulletedList.Item (class)

                  The collection of items comprising this bulleted list.

                  Constructor arguments
                  items: array of BulletedList.Item (class)

                  This field is described above.

                  options (optional)
                  sourceLineNumber: number

                  The line number of the first line of markup that created this bulleted list.

                  Rendered HTML
                  <ul>
                  +  <li>
                  +    <p>Buy milk</p>
                  +  </li>
                  +  <li>
                  +    <p>Buy bread</p>
                  +  </li>
                  +  <li>
                  +    <p>Buy happiness</p>
                  +  </li>
                  +</ul>
                  

                  BulletedList.Item (class)

                  This class represents an item in a bulleted list.

                  Extends

                  OutlineSyntaxNodeContainer (class)

                  Constructor arguments

                  See the constructor arguments for OutlineSyntaxNodeContainer (class).

                  CodeBlock (class)

                  Writing convention

                  Code blocks

                  Implements

                  OutlineSyntaxNode (interface)

                  Unique members
                  code: string

                  The code represented by this syntax node.

                  Constructor arguments
                  code: string

                  This field is described above.

                  options (optional)
                  sourceLineNumber: number

                  The line number of the first line of markup that created this code block.

                  Rendered HTML
                  <pre><code>const message = "Hi there!"</code></pre>
                  

                  DescriptionList (class)

                  Writing convention

                  Description lists

                  Implements

                  OutlineSyntaxNode (interface)

                  Unique members
                  items: array of DescriptionList.Item (class)

                  The collection of items comprising this description list.

                  Constructor arguments
                  items: array of DescriptionList.Item (class)

                  This field is described above.

                  options (optional)
                  sourceLineNumber: number

                  The line number of the first line of markup that created this description list.

                  Rendered HTML
                  <dl>
                  +  <dt>Kirby's Dreamland</dt>
                  +  <dd>
                  +    <p>A video game about a flying marshmallow.</p>
                  +  </dd>
                  +  <dt>Super Mario Land</dt>
                  +  <dd>
                  +    <p>A video game about a jumping plumber.</p>
                  +  </dd>
                  +</dl>
                  

                  DescriptionList.Item (class)

                  This class represents a collection of subjects and their corresponding description.

                  Unique members
                  subjects: array of DescriptionList.Item.Subject (class)

                  The subjects described by description.

                  description: DescriptionList.Item.Description (class)

                  The description of subjects.

                  Constructor arguments
                  subjects: array of DescriptionList.Item.Subject (class)

                  This field is described above.

                  description: DescriptionList.Item.Description (class)

                  This field is described above.

                  DescriptionList.Item.Subject (class)

                  This class represents the collection of subjects described by a given description within a description list item.

                  Extends

                  InlineSyntaxNodeContainer (class)

                  Constructor arguments

                  See the constructor arguments for InlineSyntaxNodeContainer (class).

                  DescriptionList.Item.Description (class)

                  This class represents the description of a given collection of subjects within a description list item.

                  Extends

                  OutlineSyntaxNodeContainer (class)

                  Constructor arguments

                  See the constructor arguments for OutlineSyntaxNodeContainer (class).

                  Emphasis (class)

                  Writing convention

                  Emphasis

                  Extends

                  RichInlineSyntaxNode (class)

                  Constructor arguments

                  See the constructor arguments for RichInlineSyntaxNode (class).

                  Rendered HTML
                  <em>Hi there!</em>
                  

                  ExampleUserInput (class)

                  Writing convention

                  Example user input

                  Implements

                  InlineSyntaxNode (interface)

                  Unique members
                  userInput: string

                  The example of user input.

                  Rendered HTML
                  <kbd>esc</kbd>
                  

                  Footnote (class)

                  Writing convention

                  Footnotes

                  Extends

                  RichInlineSyntaxNode (class)

                  Unique members
                  referenceNumber: number

                  The number that appears in superscript for this footnote. Within a given document, this value must be unique.

                  Constructor arguments
                  children: array of InlineSyntaxNode (interface)

                  A collection of inline syntax nodes representing the content of this footnote.

                  options (optional)
                  referenceNumber: number

                  This field is described above.

                  Rendered HTML
                  <sup class="up-footnote-reference" id="up-footnote-reference-1">
                  +  <a href="#up-footnote-1">1</a>
                  +</sup>
                  

                  FootnoteBlock (class)

                  Footnotes are written inline, but they aren't meant to appear inline in the final document. That would defeat the purpose of footnotes! Instead, footnotes are extracted and placed in footnote blocks. This class represents one of those footnote blocks.

                  Implements

                  OutlineSyntaxNode (interface)

                  Unique members
                  footnotes: array of Footnotes

                  The collection of footnotes comprising this footnote block.

                  Constructor arguments
                  footnotes: array of Footnotes

                  This field is described above.

                  Rendered HTML
                  <dl class="up-footnotes">
                  +  <dt id="up-footnote-1">
                  +    <a href="#up-footnote-reference-1">1</a>
                  +  </dt>
                  +  <dd>No relation to Warcraft!</dd>
                  +  <dt id="up-footnote-2">
                  +    <a href="#up-footnote-reference-2">2</a>
                  +  </dt>
                  +  <dd>The pathfinding algorithm had issues.</dd>
                  +</dl>
                  

                  Heading (class)

                  Writing convention

                  Headings

                  Extends

                  InlineSyntaxNodeContainer (class)

                  Implements
                  Document.TableOfContents.Entry (interface)

                  Headings are special! No other syntax node implements this interface.

                  OutlineSyntaxNode (interface)

                  But headings also serve as regular old outline syntax nodes.

                  Unique members
                  level: number

                  A heading's level represents its significance in the document. Like HTML heading levels, a level of 1 is considered the most significant.

                  Constructor arguments
                  children: array of InlineSyntaxNode (interface)

                  A collection of inline syntax nodes representing the content of this heading.

                  options
                  level: number

                  This field is described above.

                  titleMarkup: string

                  Represents the markup for the content line of this heading.

                  Section links compare their markupSnippetFromSectionTitle against this field.

                  ordinalInTableOfContents (optional): number

                  Represents this heading's ordinal in the table of contents. The first ordinal is 1, not 0.

                  sourceLineNumber (optional): number

                  The line number of the first line of markup that created this heading.

                  Rendered HTML
                  Levels 1–6

                  Headings with levels 1 through 6 render the appropriate heading element.

                  <h1>
                  +  I am a level 1 heading!
                  +</h1>
                  +
                  +<h6>
                  +  I am a level 6 heading!
                  +</h6>
                  
                  Levels 7 and higher

                  Headings with levels 7 and higher render <div role="heading"> elements with an aria-level attribute equal to their level.

                  <div aria-level="7" role="heading">
                  +  I am a level 7 heading!
                  +</div>
                  +
                  +<div aria-level="10" role="heading">
                  +  I am a level 10 heading!
                  +</div>
                  

                  Highlight (class)

                  Writing convention

                  Highlighting

                  Extends

                  RichInlineSyntaxNode (class)

                  Constructor arguments

                  See the constructor arguments for RichInlineSyntaxNode (class).

                  Rendered HTML
                  <mark>Hi there!</mark>
                  

                  Image (class)

                  Writing convention

                  Images

                  Extends

                  MediaSyntaxNode (class)

                  Constructor arguments

                  See the constructor arguments for MediaSyntaxNode (class).

                  Rendered HTML
                  <img alt="Super Mario Land box art" src="https://i.imgur.com/TxlFlkX.jpg" title="Super Mario Land box art">
                  

                  InlineCode (class)

                  Writing convention

                  Inline code

                  Implements

                  InlineSyntaxNode (interface)

                  Unique members
                  code: string

                  The inline code represented by this syntax node.

                  Constructor arguments
                  code: string

                  This field is described above.

                  Rendered HTML
                  <code class="up-inline-code">interface</code>
                  

                  InlineQuote (class)

                  Writing convention

                  Inline quotes

                  Extends

                  RichInlineSyntaxNode (class)

                  Constructor arguments

                  See the constructor arguments for RichInlineSyntaxNode (class).

                  Rendered HTML
                  <q>I know!</q>
                  

                  InlineRevealable (class)

                  Writing convention

                  Inline revealables

                  Extends

                  RichInlineSyntaxNode (class)

                  Constructor arguments

                  See the constructor arguments for RichInlineSyntaxNode (class).

                  Rendered HTML
                  <span class="up-revealable">
                  +  <input checked class="up-hide" id="up-hide-button-1" name="up-revealable-1" type="radio">
                  +  <label for="up-hide-button-1" role="button" tabindex="0">hide</label>
                  +  <input class="up-reveal" id="up-reveal-button-1" name="up-revealable-1" type="radio">
                  +  <label for="up-reveal-button-1" role="button" tabindex="0">reveal</label>
                  +  <span role="alert">Ash fights Gary</span>
                  +</span>
                  

                  Italic (class)

                  Writing convention

                  Italics

                  Extends

                  RichInlineSyntaxNode (class)

                  Constructor arguments

                  See the constructor arguments for RichInlineSyntaxNode (class).

                  Rendered HTML
                  <i>I know!</i>
                  

                  LineBlock (class)

                  Writing convention

                  Line blocks

                  Implements

                  OutlineSyntaxNode (interface)

                  Unique members
                  lines: array of LineBlock.Line (class)

                  The collection of lines comprising this line block.

                  Constructor arguments
                  lines: array of LineBlock.Line (class)

                  This field is described above.

                  options (optional)
                  sourceLineNumber: number

                  The line number of the first line of markup that created this syntax node.

                  Rendered HTML
                  <div class="up-lines">
                  +  <div>Roses are red</div>
                  +  <div>Violets are blue</div>
                  +</div>
                  

                  LineBlock.Line (class)

                  This class represents a line in a line block.

                  Extends

                  InlineSyntaxNodeContainer (class)

                  Constructor arguments

                  See the constructor arguments for InlineSyntaxNodeContainer (class).

                  Link (class)

                  Writing convention

                  Italics

                  Extends

                  RichInlineSyntaxNode (class)

                  Implements
                  OutlineSyntaxNode (interface)

                  If a line consists solely of media conventions (or media conventions within links), those media conventions (or their outer links) are placed directly into the outline.

                  Unique members
                  url: string

                  This links's URL after the following settings are applied:

                  Constructor arguments
                  children: array of InlineSyntaxNode (interface)

                  A collection of inline syntax nodes representing the content of this link.

                  url: string

                  This field is described above.

                  options
                  sourceLineNumber (optional): number

                  The line number of the line of markup that created this link.

                  Rendered HTML
                  <a href="https://example.com">Hi there!</a>
                  

                  NormalParenthetical (class)

                  Writing convention

                  Parenthetical text produced by parentheses

                  Extends

                  ParentheticalSyntaxNode (class)

                  Constructor arguments

                  See the constructor arguments for ParentheticalSyntaxNode (class).

                  Rendered HTML
                  <small class="up-parenthetical">(Hi there!)</small>
                  

                  NumberedList (class)

                  Writing convention

                  Numbered lists

                  Implements

                  OutlineSyntaxNode (interface)

                  Unique members
                  items: array of NumberedList.Item (class)

                  The collection of items comprising this numbered list.

                  start method
                  Return type: number

                  This method returns the starting ordinal of this list, if one was explicitly defined. Otherwise, this method returns undefined.

                  Arguments

                  None.

                  order method
                  Return type: NumberedList.Order (union)

                  This method returns the order of this numered list.

                  Arguments

                  None.

                  Constructor arguments
                  items: array of NumberedList.Item (class)

                  This field is described above.

                  options (optional)
                  sourceLineNumber: number

                  The line number of the first line of markup that created this numbered list.

                  Rendered HTML
                  <ol reversed start="3">
                  +  <li value="3">
                  +    <p>Buy milk</p>
                  +  </li>
                  +  <li value="2">
                  +    <p>Buy bread</p>
                  +  </li>
                  +  <li>
                  +    <p>Buy happiness</p>
                  +  </li>
                  +</ol>
                  

                  NumberedList.Item (class)

                  This class represents an item in a numbered list.

                  Extends

                  OutlineSyntaxNodeContainer (class)

                  Constructor arguments
                  children: array of OutlineSyntaxNode (interface)

                  A collection of outline syntax nodes representing the content of this list item.

                  options (optional)
                  ordinal: number

                  This field is described above.

                  NumberedList.Order (union)

                  This union type represents the order of a numbered list.

                  It has two members: the string literals "asc" (for ascending) and "desc" (for descending).

                  Paragraph (class)

                  Writing convention

                  Paragraphs

                  Extends

                  InlineSyntaxNodeContainer (class)

                  Implements

                  OutlineSyntaxNode (interface)

                  Constructor arguments
                  children: array of InlineSyntaxNode (interface)

                  A collection of inline syntax nodes representing the content of this paragraph.

                  options (optional)
                  sourceLineNumber: number

                  The line number of the line of markup that created this paragraph.

                  Rendered HTML
                  <p>Hi there!</p>
                  

                  RevealableBlock (class)

                  Writing convention

                  Revealable blocks

                  Extends

                  RichOutlineSyntaxNode (class)

                  Constructor arguments

                  See the constructor arguments for RichOutlineSyntaxNode (class).

                  Rendered HTML
                  <div class="up-revealable">
                  +  <input checked class="up-hide" id="up-hide-button-1" name="up-revealable-1" type="radio">
                  +  <label for="up-hide-button-1" role="button" tabindex="0">hide</label>
                  +  <input class="up-reveal" id="up-reveal-button-1" name="up-revealable-1" type="radio">
                  +  <label for="up-reveal-button-1" role="button" tabindex="0">reveal</label>
                  +  <div role="alert">
                  +    <p>Ash fights Gary.</p>
                  +  </div>
                  +</div>
                  

                  SectionLink (class)

                  Writing convention

                  Section links

                  Implements

                  InlineSyntaxNode (interface)

                  Unique members
                  markupSnippetFromSectionTitle: string

                  This field is compared against the titleMarkup field of every table of contents entry to find the most appropriate match.

                  Constructor arguments
                  markupSnippetFromSectionTitle: string

                  This field is described above.

                  entry: Document.TableOfContents.Entry (interface)

                  The table of contents entry (i.e. heading) this section link points to.

                  Rendered HTML
                  When matched with a heading

                  Up renders a link to that heading. The rendered link contains the heading's content.

                  <a href="#up-topic-77">Using the Up library</a>
                  
                  When not matched with a heading

                  Up renders the value of markupSnippetFromSectionTitle in italics.

                  <i>Up library</i>
                  

                  SquareParenthetical (class)

                  Writing convention

                  Parenthetical text produced by square brackets

                  Extends

                  ParentheticalSyntaxNode (class)

                  Constructor arguments

                  See the constructor arguments for ParentheticalSyntaxNode (class).

                  Rendered HTML
                  <small class="up-parenthetical up-square-brackets">[Hi there!]</small>
                  

                  Stress (class)

                  Writing convention

                  Stress

                  Extends

                  RichInlineSyntaxNode (class)

                  Constructor arguments

                  See the constructor arguments for RichInlineSyntaxNode (class).

                  Rendered HTML
                  <strong>Hi there!</strong>
                  

                  Table (class)

                  Writing convention

                  Tables

                  Implements

                  OutlineSyntaxNode (interface)

                  Unique members
                  header: Table.Header (class)

                  The header row.

                  rows: array of Table.Row (class)

                  The content rows.

                  caption: Table.Caption (class)

                  The optional caption.

                  Constructor arguments
                  header: Table.Header (class)

                  This field is described above.

                  rows: array of Table.Row (class)

                  This field is described above.

                  caption: Table.Caption (class)

                  This field is described above.

                  options (optional)
                  sourceLineNumber: number

                  The line number of the first line of markup that created this table.

                  Rendered HTML
                  Without header column
                  <table>
                  +  <caption>Moves learned by the Pokémon Bulbasaur</caption>
                  +  <tr>
                  +    <th scope="col">Level</th>
                  +    <th scope="col">Move</th>
                  +    <th scope="col">Type</th>
                  +    <th scope="col">Power</th>
                  +    <th scope="col">Accuracy</th>
                  +  </tr>
                  +  <tr>
                  +    <td class="up-numeric">1</td>
                  +    <td>Tackle</td>
                  +    <td>Normal</td>
                  +    <td class="up-numeric">50</td>
                  +    <td class="up-numeric">100%</td>
                  +  </tr>
                  +  <tr>
                  +    <td class="up-numeric">3</td>
                  +    <td>Growl</td>
                  +    <td>Normal</td>
                  +    <td></td>
                  +    <td class="up-numeric">100%</td>
                  +  </tr>
                  +</table>
                  
                  With header column
                  <table>
                  +  <caption>Moves learned by the Pokémon Bulbasaur</caption>
                  +  <tr>
                  +    <th scope="col"></th>
                  +    <th scope="col">Level</th>
                  +    <th scope="col">Type</th>
                  +    <th scope="col">Power</th>
                  +    <th scope="col">Accuracy</th>
                  +  </tr>
                  +  <tr>
                  +    <th scope="row">Tackle</th>
                  +    <td class="up-numeric">1</td>
                  +    <td>Normal</td>
                  +    <td class="up-numeric">50</td>
                  +    <td class="up-numeric">100%</td>
                  +  </tr>
                  +  <tr>
                  +    <th scope="row">Growl</th>
                  +    <td class="up-numeric">3</td>
                  +    <td>Normal</td>
                  +    <td></td>
                  +    <td class="up-numeric">100%</td>
                  +  </tr>
                  +</table>
                  

                  Table.Caption (class)

                  This class represents the caption of a table.

                  Extends

                  InlineSyntaxNodeContainer (class)

                  Constructor arguments

                  See the constructor arguments for InlineSyntaxNodeContainer (class).

                  Table.Cell (class)

                  This abstract class represents a table cell.

                  Extends

                  InlineSyntaxNodeContainer (class)

                  Unique members
                  isNumeric method
                  Return type: boolean

                  This method returns a boolean indicating whether the content of this cell is numeric.

                  Arguments

                  None.

                  Constructor arguments

                  See the constructor arguments for InlineSyntaxNodeContainer (class).

                  Table.Header (class)

                  This class represents the header row of a table.

                  Unique members
                  cells: array of Table.Header.Cell (class)

                  The cells in this header row.

                  Constructor arguments
                  cells: array of Table.Header.Cell (class)

                  This field is described above.

                  Table.Header.Cell (class)

                  This class represents a table header cell.

                  Extends

                  Table.Cell (class)

                  Constructor arguments

                  See the constructor arguments for InlineSyntaxNodeContainer (class).

                  Table.Row (class)

                  This class represents a content row in a table.

                  Unique members
                  cells: array of Table.Row.Cell (class)

                  The content cells in this row.

                  headerColumnCell: Table.Header.Cell (class)

                  The single header column cell for this row, if there is one.

                  Tables without header columns never have header column cells.

                  allCellsStartingWithHeaderColumnCell method
                  Return type: array of Table.Cell (class)

                  This method returns every cell in this row.

                  If the table has a header column, the row's headerColumnCell is the first item in the returned collection.

                  Arguments

                  None.

                  Constructor arguments
                  cells: array of Table.Row.Cell (class)

                  This field is described above.

                  headerColumnCell: Table.Header.Cell (class)

                  This field is described above.

                  Table.Row.Cell (class)

                  This class represents a regular (non-header) table cell.

                  Extends

                  Table.Cell (class)

                  Constructor arguments

                  See the constructor arguments for InlineSyntaxNodeContainer (class).

                  Text (class)

                  This class represents regular text content.

                  Implements

                  InlineSyntaxNode (interface)

                  Unique members
                  text: string

                  The text represented by this syntax node.

                  Constructor arguments
                  text: string

                  This field is described above.

                  Rendered HTML
                  Yes, 1 &lt; 2
                  

                  ThematicBreak (class)

                  Writing convention

                  Thematic breaks

                  Extends

                  OutlineSyntaxNode (interface)

                  Constructor arguments
                  options (optional)
                  sourceLineNumber: number

                  The line number of the line of markup that created this thematic break.

                  Rendered HTML
                  <hr>
                  

                  Video (class)

                  Writing convention

                  Video

                  Extends

                  MediaSyntaxNode (class)

                  Constructor arguments

                  See the constructor arguments for MediaSyntaxNode (class).

                  Rendered HTML
                  <video controls src="https://i.imgur.com/32fBpnh.mp4" title="Professor Leonard">
                  +  <a href="https://i.imgur.com/32fBpnh.mp4">Professor Leonard</a>
                  +</video>
                  
                  +
                  +
                  + +
                  \ No newline at end of file diff --git a/src/content/documentation.up b/src/content/documentation.up index 1c619ac..be858a0 100644 --- a/src/content/documentation.up +++ b/src/content/documentation.up @@ -15,16 +15,6 @@ Why use Up? Up isn't the only markup language that produces HTML. What makes it special? -Up uses customizable keywords -============================= - -Too many markup languages devolve into a dense soup of symbols and punctuation. - -When a keyword would provide more clarity than a symbol, Up takes advantage of that! Several writing conventions, including [topic: tables] and [topic: revealable content], incorporate keywords. - -If you're a software developer using the Up library, you can provide multiple custom variations for each keyword. To learn more, please see [topic: customizing keywords]. - - Up has a flexible, forgiving syntax =================================== @@ -81,6 +71,16 @@ Output John **enjoys ==sleeping** late== whenever he can. +Up uses customizable keywords +============================= + +Too many markup languages devolve into a dense soup of symbols and punctuation. + +When a keyword would provide more clarity than a symbol, Up takes advantage of that! Several writing conventions, including [topic: tables] and [topic: revealable content], incorporate keywords. + +If you're a software developer using the Up library, you can provide multiple custom variations for each keyword. To learn more, please see [topic: customizing keywords]. + + Up produces fully accessible HTML ================================= diff --git a/src/layout/index.hbs b/src/layout/index.hbs index 82b046a..6eb4d69 100644 --- a/src/layout/index.hbs +++ b/src/layout/index.hbs @@ -4,15 +4,6 @@ What's Up? -