diff --git a/example0.pdf b/example0.pdf index 2c92ea2..0475c4e 100644 Binary files a/example0.pdf and b/example0.pdf differ diff --git a/example1.html b/example1.html index 511e94f..6492721 100644 --- a/example1.html +++ b/example1.html @@ -8,7 +8,7 @@ And, yes, it is **as simple** as **one** HTML line at the beginning and **one** # This second example supports UTF-8 input Yes, that's cool. -Did you know that [Næreen](http://gravatar.com/naereen) is originally an iranian name ? +Did you know that [Næreen](http://gravatar.com/naereen) is originally an Iranian name ? --- diff --git a/example1.pdf b/example1.pdf index 00d408e..cfee2ef 100644 Binary files a/example1.pdf and b/example1.pdf differ diff --git a/example2.pdf b/example2.pdf index 75dc2eb..887ec1d 100644 Binary files a/example2.pdf and b/example2.pdf differ diff --git a/example3.html b/example3.html index b534749..f78cdb7 100644 --- a/example3.html +++ b/example3.html @@ -14,7 +14,7 @@ $x\_{1,2} = \frac{-b\pm\sqrt{\Delta}}{2a}$, or display equations as this one :

## From a classic math book -But a less classic exercise about [holderian functions](https://en.wikipedia.org/wiki/H%C3%B6lder_condition) +But a less classic exercise about [Hölder functions](https://en.wikipedia.org/wiki/H%C3%B6lder_condition) (more precisely, *Exercice 7*, Chapter 4.5, page 267, of the [Gourdon, "*Les maths en tête : Analyse*", $2^\text{nd}$ edition](http://www.amazon.fr/gp/product/2729837590) book).

@@ -41,7 +41,7 @@ from the bottom of a *StrapDown*-flavored page, for instance from the default *C You can consult [a second example](example4.html) to see some more advanced examples of LaTeX equations rendered with MathJax. ### A better solution? -From version 0.5, you can import MathJax in an even *quicker* way: you just have to add ``&mathjax=yes`` to the URL used to import [strapdown.min.js](index.html). +From version 0.5, you can import MathJax in an even *quicker* way: you just have to add ``&mathjax=yes`` to the URL used to import [``strapdown.min.js``](index.html). See [the first paragraph of this third example](example5.html) to see this. *** @@ -71,12 +71,12 @@ Feel free to refresh your mind about which symbols are used as elements of the M with [this page](http://daringfireball.net/projects/markdown/syntax#list), or [this one on Wikipedia](https://en.wikipedia.org/wiki/Markdown). -## Escape the antislash ('``\``') -The antislash symbol, already escaped by an antislash ('``\``') +## Escape the backslash ('``\``') +The backslash symbol, already escaped by an backslash ('``\``') is used in LaTeX to force a new line. It is usually used in aligned equations, as shown in the Lorenz Equations [here](example4.html). -You should also escape the antislash, by typing ``\\`` where you would have +You should also escape the backslash, by typing ``\\`` where you would have used a simple ``\`` in LaTeX. *** diff --git a/example3.pdf b/example3.pdf index 8276abd..2cdee87 100644 Binary files a/example3.pdf and b/example3.pdf differ diff --git a/example4.html b/example4.html index 6d375a4..c9edd1f 100644 --- a/example4.html +++ b/example4.html @@ -5,7 +5,7 @@

-# A second example with [MathJax](http://www.mathjax.org/) activacted (and the *paper* theme) +# A second example with [MathJax](http://www.mathjax.org/) activated (and the *paper* theme) > To know how to include MathJax in a *StrapDown*-flavored HTML page, you can read this [example 3](example3.html). To discover an even nicer way to import MathJax, read [the last example](example5.html). @@ -88,7 +88,7 @@ $$ \left\\\{\begin{aligned} $$ ``` -As you can see, math environment (like ``aligned``) are supported by MathJax, even with the default configuration and no external plugins. +As you can see, math environment (like ``aligned``) are supported by MathJax, even with the default configuration and no external plugin. **** diff --git a/example4.pdf b/example4.pdf index 0093b9d..fd8c8b2 100644 Binary files a/example4.pdf and b/example4.pdf differ diff --git a/example5.html b/example5.html index 06bf67b..b52dd48 100644 --- a/example5.html +++ b/example5.html @@ -5,17 +5,19 @@ -# A third example with [MathJax](http://www.mathjax.org/) activacted +# A third example with [MathJax](http://www.mathjax.org/) activated > This *StrapDown*-flavored HTML page comes with MathJax enabled, simply because **we asked the script to do so**. The last line of this page source (you can read it with "Ctrl+u" in Firefox) imports the script ``strapdown.min.js`` with this URL : ``"strapdown.min.js?src=example5&mathjax=y&theme=united&beacon=y"``. -This way, some options are avaible: +This way, some options are available: -1. ``mathjax=y`` if you want to load MathJax, with ``$`` being the default separator for inline maths and ``$$`` for display, -2. ``theme=united`` or ``theme=united`` if you want to load a specific theme (without having to specify it as the theme attribute of the main ``xmp``), +1. ``mathjax=y`` if you want to load MathJax, with ``$ ... $`` being the default syntax for inline maths and ``$$ ... $$`` for display, +2. ``theme=united`` or ``theme=cyborg`` if you want to load a specific theme (without having to specify it as the ``theme`` attribute of the main ``xmp`` tag containing your Markdown code), 3. ``beacon=y`` if you want to include an invisible [GA Beacon](http://perso.crans.org/besson/beacon.en.html) image in your page, -4. ``nonavbarfixed=y`` if you prefer the [top navigation bar](https://bootswatch.com/united/#navbar) to not be fixed, but scroll as the rest of the page (*new!*). +4. ``pedantic=y`` if you want to force the use of the ["pedantic" option](https://github.com/chjj/marked#pedantic) for [marked](https://github.com/chjj/marked), the Markdown parser used by StrapDown.js (note: you probably don't want that, [pedantic=false is usually better](https://github.com/chuckhoupt/strapdown/commit/1a090729fb717059be0689aa65025de6de67b3cd)). Default is pedantic=false. +5. ``nonavbarfixed=y`` if you prefer the [top navigation bar](https://bootswatch.com/united/#navbar) to not be fixed, but scroll as the rest of the page (*new!*). See [example8](example8.html), +6. ``keepicon=y`` if you prefer StrapDown.js to keep the favicon included in your HTML document (*new!*). See [example9](example9.html). *** diff --git a/example5.pdf b/example5.pdf index 857b8f1..b1a2bc6 100644 Binary files a/example5.pdf and b/example5.pdf differ diff --git a/example6.html b/example6.html index 346b8c1..89d00bc 100644 --- a/example6.html +++ b/example6.html @@ -109,11 +109,12 @@ Here is a last example, displaying some *super heroes* ^^: --- -## A personnal example +## [A personal example](../cv/) And if you may, I will conclude these examples with a more personal one: | *Scholar* Year | My age
(when started/when finishing) | Scholar level | City, *Country* | | :----------- | :----: | :-----------: | --: | +| 2015 ~ 2016 | 22 → 23 | [Another 2nd Year M.Sc. (Maths and CS)](http://www.cmla.ens-cachan.fr/version-anglaise/academics/mva-master-degree-227777.kjsp) | Cachan (Paris), *France* | | 2014 ~ 2015 | 21 → 22 | [Assistant professor](http://web.archive.org/web/20141103063707/http://www.mahindraecolecentrale.edu.in/faculties.html), Maths and CS | Hyderabad, *India* | | 2013 ~ 2014 | 20 → 21 | 2nd Year M.Sc. (Maths, CS)
and ranked 23rd at the French Agrégation | Cachan (Paris), *France* | | 2012 ~ 2013 | 19 → 20 | 1st Year M.Sc. (Maths, CS) | Cachan (Paris), *France* | @@ -123,7 +124,7 @@ And if you may, I will conclude these examples with a more personal one: | 2008 ~ 2009 | 15 → 16 | Scientific *"Baccalauréat"* | Briançon, *France* | -> ... Yeah, I am kinda proud of my academic education and [my curriculum](http://lbesson.tk) ([also here](http://perso.crans.org/besson/cv.en.pdf) or [here](http://perso.crans.org/besson/cv.en.pdf)). +> ... But that was just a short overview of my academic education and [my curriculum](http://perso.crans.org/besson/cv.en.pdf). --- diff --git a/example6.pdf b/example6.pdf index 3d8261c..2627936 100644 Binary files a/example6.pdf and b/example6.pdf differ diff --git a/example7.html b/example7.html index dcb7dfe..769aa2a 100644 --- a/example7.html +++ b/example7.html @@ -26,7 +26,8 @@ That search feature is working **incredibly well**, on the box below, if you sta

Search on that table?

Thanks to the QuickSearch jQuery plug-in.

-
+ + # A partial list of the [Justice League of America](https://en.wikipedia.org/wiki/Justice_League) Here is an example of a table, displaying some *super heroes* ^^
@@ -87,9 +88,9 @@ Finally, after loading the two scripts (step 2), one line of JavaScript in enoug ``` > More explanations? This Javascript line has three parts: -> 1. `$('input#id_search')` is using jQuery (the `$()` fonction) to select the DOM element of type `input` with `id=id_search` (id because of the `#`, it would be a class if `.`, like `div.navbar`), -> 2. `.quicksearch(...)` is calling the `quicksearch` fonction (available because QuickSearch has been registered as a jQuery plug-in), using it for that DOM element (the input search bar), -> 3. and finally we apply that fonction with the argument `'table tbody tr'`, which means that we initialize QuickSearch to look for all the `` elements, only on their children `` (content of the table), and only on the different lines (``). +> 1. `$('input#id_search')` is using jQuery (the `$()` function) to select the DOM element of type `input` with `id=id_search` (id because of the `#`, it would be a class if `.`, like `div.navbar`), +> 2. `.quicksearch(...)` is calling the `quicksearch` function (available because QuickSearch has been registered as a jQuery plug-in), using it for that DOM element (the input search bar), +> 3. and finally we apply that function with the argument `'table tbody tr'`, which means that we initialize QuickSearch to look for all the `
` elements, only on their children `` (content of the table), and only on the different lines (``). --- diff --git a/example7.pdf b/example7.pdf index 1d56af0..f4e39ce 100644 Binary files a/example7.pdf and b/example7.pdf differ diff --git a/example8.html b/example8.html index efce0c7..75829b6 100644 --- a/example8.html +++ b/example8.html @@ -2,7 +2,7 @@ # This is a Markdown document @@ -62,7 +62,7 @@ This was a brief overview, to show the basic use of [StrapDown.js](index.html). diff --git a/example8.pdf b/example8.pdf index 21b9135..d439492 100644 Binary files a/example8.pdf and b/example8.pdf differ diff --git a/example9.html b/example9.html new file mode 100644 index 0000000..c21325a --- /dev/null +++ b/example9.html @@ -0,0 +1,76 @@ + + + +Example with StrapDown.js with custom favicon + + + +<ul class="pager"> +<li class="previous"><a href="example8.html">← Previous example</a></li> +<li><a href="index.html">Index</a></li> +<li class="next disabled"><a href="#">(Last example)</a></li> +</ul> + +# This is a Markdown document + +This page is the same example as [example #2](example2.html), but with a customized icon to be displayed on the web-browser ("favicon"). + +If you like, you can load the script ``strapdown.min.js`` with this option ``keepicon=y`` if you prefer StrapDown.js to keep the [favicon](https://en.wikipedia.org/wiki/Favicon) included in your HTML document (*new!*). + +See [example #5](example5.html) for other options. + +---- + +You can now write your web page in Markdown. +You opened a `textarea` tag, but a `xmp` tag works as well. +And, yes, it is **as simple** as **one** HTML line at the beginning and **one** HTML line at the end of this document. + +## What to say more +Feel free to use it, redistribute it etc, *under the condition of the GPLv3 License*. + +## Only for textual, simple documents +StrapDown.js is *awesome* to quickly build nice-looking web pages, +but it might not be efficient for anything more complicated, as it is really not designed for it. + +## Add a picture ? +With Markdown syntax, it's easy : ![GA|Analytics](https://ga-beacon.appspot.com/UA-38514290-14/example2.html "Thanks to ga-beacon"). + +### An other one ? +Alright, here comes the mighty Cthulhu ![Logo Squirt](../squirt/images/logo.png "Logo Cthulhu") + +### A last one, because it's dangerous to go alone : + +![Logo Take this from dotcore](../squirt/images/takethis.jpg "Logo «Take this» from dotcore") + +## Add anything you want, it *might* work +For instance, you can add Google Analytics to monitor the page's activity, +by including a piece of Javascript code, before *or* after closing the *textarea* tag. + +<script type="text/javascript"> + (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ + (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), + m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) + })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); + ga('create','UA-38514290-14','lbesson.bitbucket.org'); ga('send','pageview'); +</script> +<noscript> + The previous paragraph was supposed to include Google Analytics web monitoring tool, + but hey, you are browsing without JavaScript enabled, what can I do for it ? <br/> + Maybe you are using a text-only browser (w3m, links, elinks ? I love elinks !), + or a 19th-century IE, or maybe you disabled JavaScript globally (which is kinda stupid) or site-by-site (with NoScript, as I do, which is brilliant, and safer). +</noscript> + +## That's it +This was a brief overview, to show the basic use of [StrapDown.js](index.html). + +--- + +<ul class="pager"> +<li class="previous"><a href="example8.html">← Previous example</a></li> +<li><a href="index.html">Index</a></li> +<li class="next disabled"><a href="#">(Last example)</a></li> +</ul> + + + + diff --git a/example9.pdf b/example9.pdf new file mode 100644 index 0000000..afd22ea Binary files /dev/null and b/example9.pdf differ diff --git a/index.htm b/index.htm index 8616dcf..2a7adbf 100644 --- a/index.htm +++ b/index.htm @@ -123,7 +123,8 @@ It has a perfect support for Markdown markup.

  • This (French) homepage of a programming project on Euler theorems on Eulerian path. I did this as an assignment for my M.Sc. of Computer Science in 2014, and it was also a good training for one oral exam of the French national competitive examination to become a prep' school professor in Mathematics and Computer Science (for which I have been ranked 23rd among 795 in 2014!).
  • -

    You might also be interested by a way to make a StrapDown.js-powered document autonomous, ie. not using the script anymore. I am working on a Python program designed to do this (called, no surprise, strapdown2html.py).

    +

    You might also be interested by a way to make a StrapDown.js-powered document autonomous, ie. not using the script anymore. +For this purpose, I also wrote strapdown2html.py a Python program designed to do this (called, no surprise, strapdown2html.py).


    Future features or ideas?

    @@ -146,7 +147,8 @@ It has a perfect support for Markdown markup.

    If you are using (or have used) my StrapDown.js, you can send an email, or contact me if you want, I would love to hear any feedback from you!

    diff --git a/index.html b/index.html index 44c7bf3..2cc8813 100644 --- a/index.html +++ b/index.html @@ -76,14 +76,15 @@ And, yes, it is **as simple** as **one** HTML line at the beginning and **one**

    List of examples:

    @@ -153,14 +154,15 @@ as shown in these three examples: [example n°3](example3.html) and [example n°

    List of examples:

    @@ -201,7 +203,8 @@ It has a perfect support for Markdown markup. - [This (French) homepage of a programming project](http://perso.crans.org/besson/agreg/m/2/) on [Euler theorems on Eulerian path](https://en.wikipedia.org/wiki/Eulerian_path#Properties). I did this as an assignment for [my M.Sc. of Computer Science in 2014](http://perso.crans.org/besson/cv.en.pdf), and it was also a good training for one oral exam of the [French national competitive examination to become a prep' school professor](https://en.wikipedia.org/wiki/Agr%C3%A9gation) in Mathematics and Computer Science (for [which I have been ranked 23rd among 795](http://web.archive.org/web/20140709144720/agreg.org/ResultatsMerite2014.html) in 2014!). -> You might also be interested by a way to make a StrapDown.js-powered document autonomous, ie. not using the script anymore. [I am working](https://bitbucket.org/lbesson/bin/history-node/master/strapdown2html.py) on a Python program [designed to do this (called, no surprise, strapdown2html.py)](https://bitbucket.org/lbesson/bin/str/master/strapdown2html.py). +> You might also be interested by a way to make a StrapDown.js-powered document autonomous, ie. not using the script anymore. +> For this purpose, [I also wrote strapdown2html.py](https://bitbucket.org/lbesson/bin/history-node/master/strapdown2html.py) a Python program [designed to do this (called, no surprise, strapdown2html.py)](https://bitbucket.org/lbesson/bin/str/master/strapdown2html.py). --- @@ -221,7 +224,8 @@ It has a perfect support for Markdown markup. ### Some people are using it or talking about it! - [This question asked on Github on the 1st of May of 2014](https://github.com/arturadib/strapdown/issues/36) by [hardly](https://github.com/hardly) about the [old strapdown repository](https://github.com/arturadib/strapdown). To answer that question: the main difference is than I am still interested and eager to work on [my StrapDown.js](http://lbesson.bitbucket.org/md/), but it seems to not be the case of [the previous developper](https://github.com/arturadib/). - [These guys at Quantego](http://quantego.com/) are using my StrapDown.js for [that small and interesting page](https://slides.quantego.com/). -- I got an email (*January 2015*) from one felow working for [www.nexirius.com](http://www.nexirius.com/), and so I created the demos on tables to answer him: [example #6](example6.html) and [example #7](example7.html). +- I got an email (*January 2015*) from one fellow working for [www.nexirius.com](http://www.nexirius.com/), and so I created the demos on tables to answer him: [example #6](example6.html) and [example #7](example7.html). +- In *March 2016*, someone asked my to add more options, like ``nonavbarfixed=y`` and ``keepicon=y``, and add more themes, which I did, of course. > If you are using (or have used) my StrapDown.js, you can send an email, or [contact me if you want](http://perso.crans.org/besson/callme.en.html), I would love to hear any feedback from you! diff --git a/index.pdf b/index.pdf index aeb6b14..b0d00f4 100644 Binary files a/index.pdf and b/index.pdf differ diff --git a/strapdown.js b/strapdown.js index d78894d..1dba444 100755 --- a/strapdown.js +++ b/strapdown.js @@ -426,10 +426,15 @@ var PR=win['PR']={'createSimpleLexer':createSimpleLexer,'registerLangHandler':re document.head.appendChild(linkEl); // Favicon (730 bytes for 'favicon.png') - var linkEl = document.createElement('link'); - linkEl.rel = 'shortcut icon'; - linkEl.href = originBase + '/favicon.png'; - document.head.appendChild(linkEl); + if (queryOrigin['keepicon']) { + // Do not add a favicon, if strapdown.js was loaded with a URL query containing "&keepicon=y" somewhere. + console.log("[strapdown.js] [INFO] Keeping the default favicon (not replacing with originBase/favicon.png ..."); + } else { + var linkEl = document.createElement('link'); + linkEl.rel = 'shortcut icon'; + linkEl.href = originBase + '/favicon.png'; + document.head.appendChild(linkEl); + } ////////////////////////////////////////////////////////////////////// // @@ -446,8 +451,9 @@ var PR=win['PR']={'createSimpleLexer':createSimpleLexer,'registerLangHandler':re // Insert navbar if there's none // FIXED be sure this is good: OK var newNode = document.createElement('div'); if (queryOrigin['nonavbarfixed']) { + // Ask for a non-fixed top navbar, if strapdown.js was loaded with a URL query containing "&nonavbarfixed=y" somewhere. newNode.className = "navbar navbar-static-top"; - document.body.style = "padding-top: 0px;" /* XXX Experimental */ + document.body.style = "padding-top: 0px;" /* FIXED manual fix */ } else { newNode.className = "navbar navbar-fixed-top"; diff --git a/strapdown.min.js b/strapdown.min.js index 7c08dfd..ea11e23 100755 --- a/strapdown.min.js +++ b/strapdown.min.js @@ -1 +1 @@ -(function(){function e(e){this.tokens=[],this.tokens.links={},this.options=e||l.defaults,this.rules=o.normal,this.options.gfm&&(this.options.tables?this.rules=o.tables:this.rules=o.gfm)}function t(e,t){if(this.options=t||l.defaults,this.links=e,this.rules=h.normal,!this.links)throw new Error("Tokens array requires a `links` property.");this.options.gfm?this.options.breaks?this.rules=h.breaks:this.rules=h.gfm:this.options.pedantic&&(this.rules=h.pedantic)}function n(e){this.tokens=[],this.token=null,this.options=e||l.defaults}function s(e,t){return e.replace(t?/&/g:/&(?!#?\w+;)/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function r(e,t){return e=e.source,t=t||"",function n(s,r){return s?(r=r.source||r,r=r.replace(/(^|[^\[])\^/g,"$1"),e=e.replace(s,r),n):new RegExp(e,t)}}function i(){}function a(e){for(var t,n,s=1;s[^\n]+(\n[^\n]+)*\n*)+/,list:/^( *)(bull) [\s\S]+?(?:hr|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:/^ *(?:comment|closed|closing) *(?:\n{2,}|\s*$)/,def:/^ *\[([^\]]+)\]: *]+)>?(?: +["(]([^\n]+)[")])? *(?:\n+|$)/,table:i,paragraph:/^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def))+)\n*/,text:/^[^\n]+/};o.bullet=/(?:[*+-]|\d+\.)/,o.item=/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/,o.item=r(o.item,"gm")(/bull/g,o.bullet)(),o.list=r(o.list)(/bull/g,o.bullet)("hr",/\n+(?=(?: *[-*_]){3,} *(?:\n+|$))/)(),o._tag="(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:/|@)\\b",o.html=r(o.html)("comment",//)("closed",/<(tag)[\s\S]+?<\/\1>/)("closing",/])*?>/)(/tag/g,o._tag)(),o.paragraph=r(o.paragraph)("hr",o.hr)("heading",o.heading)("lheading",o.lheading)("blockquote",o.blockquote)("tag","<"+o._tag)("def",o.def)(),o.normal=a({},o),o.gfm=a({},o.normal,{fences:/^ *(`{3,}|~{3,}) *(\w+)? *\n([\s\S]+?)\s*\1 *(?:\n+|$)/,paragraph:/^/}),o.gfm.paragraph=r(o.paragraph)("(?!","(?!"+o.gfm.fences.source.replace("\\1","\\2")+"|")(),o.tables=a({},o.gfm,{nptable:/^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/,table:/^ *\|(.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/}),e.rules=o,e.lex=function(t,n){var s=new e(n);return s.lex(t)},e.prototype.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n"),this.token(e,!0)},e.prototype.token=function(e,t){for(var n,s,r,i,a,l,h,c,u,e=e.replace(/^ +$/gm,"");e;)if((r=this.rules.newline.exec(e))&&(e=e.substring(r[0].length),r[0].length>1&&this.tokens.push({type:"space"})),r=this.rules.code.exec(e))e=e.substring(r[0].length),r=r[0].replace(/^ {4}/gm,""),this.tokens.push({type:"code",text:this.options.pedantic?r:r.replace(/\n+$/,"")});else if(r=this.rules.fences.exec(e))e=e.substring(r[0].length),this.tokens.push({type:"code",lang:r[2],text:r[3]});else if(r=this.rules.heading.exec(e))e=e.substring(r[0].length),this.tokens.push({type:"heading",depth:r[1].length,text:r[2]});else if(t&&(r=this.rules.nptable.exec(e))){for(e=e.substring(r[0].length),l={type:"table",header:r[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:r[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:r[3].replace(/\n$/,"").split("\n")},c=0;c ?/gm,""),this.token(r,t),this.tokens.push({type:"blockquote_end"});else if(r=this.rules.list.exec(e)){for(e=e.substring(r[0].length),this.tokens.push({type:"list_start",ordered:isFinite(r[2])}),r=r[0].match(this.rules.item),this.options.smartLists&&(i=o.bullet.exec(r[0])[0]),n=!1,u=r.length,c=0;u>c;c++)l=r[c],h=l.length,l=l.replace(/^ *([*+-]|\d+\.) +/,""),~l.indexOf("\n ")&&(h-=l.length,l=this.options.pedantic?l.replace(/^ {1,4}/gm,""):l.replace(new RegExp("^ {1,"+h+"}","gm"),"")),this.options.smartLists&&c!==u-1&&(a=o.bullet.exec(r[c+1])[0],i===a||"."===i[1]&&"."===a[1]||(e=r.slice(c+1).join("\n")+e,c=u-1)),s=n||/\n\n(?!\s*$)/.test(l),c!==u-1&&(n="\n"===l[l.length-1],s||(s=n)),this.tokens.push({type:s?"loose_item_start":"list_item_start"}),this.token(l,!1),this.tokens.push({type:"list_item_end"});this.tokens.push({type:"list_end"})}else if(r=this.rules.html.exec(e))e=e.substring(r[0].length),this.tokens.push({type:this.options.sanitize?"paragraph":"html",pre:"pre"===r[1],text:r[0]});else if(t&&(r=this.rules.def.exec(e)))e=e.substring(r[0].length),this.tokens.links[r[1].toLowerCase()]={href:r[2],title:r[3]};else if(t&&(r=this.rules.table.exec(e))){for(e=e.substring(r[0].length),l={type:"table",header:r[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:r[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:r[3].replace(/(?: *\| *)?\n$/,"").split("\n")},c=0;c])/,autolink:/^<([^ >]+(@|:\/)[^ >]+)>/,url:i,tag:/^|^<\/?\w+(?:"[^"]*"|'[^']*'|[^'">])*?>/,link:/^!?\[(inside)\]\(href\)/,reflink:/^!?\[(inside)\]\s*\[([^\]]*)\]/,nolink:/^!?\[((?:\[[^\]]*\]|[^\[\]])*)\]/,strong:/^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/,em:/^\b_((?:__|[\s\S])+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/,code:/^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,br:/^ {2,}\n(?!\s*$)/,del:i,text:/^[\s\S]+?(?=[\\?(?:\s+['"]([\s\S]*?)['"])?\s*/,h.link=r(h.link)("inside",h._inside)("href",h._href)(),h.reflink=r(h.reflink)("inside",h._inside)(),h.normal=a({},h),h.pedantic=a({},h.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/}),h.gfm=a({},h.normal,{escape:r(h.escape)("])","~|])")(),url:/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,del:/^~~(?=\S)([\s\S]*?\S)~~/,text:r(h.text)("]|","~]|")("|","|https?://|")()}),h.breaks=a({},h.gfm,{br:r(h.br)("{2,}","*")(),text:r(h.gfm.text)("{2,}","*")()}),t.rules=h,t.output=function(e,n,s){var r=new t(n,s);return r.output(e)},t.prototype.output=function(e){for(var t,n,r,i,a="";e;)if(i=this.rules.escape.exec(e))e=e.substring(i[0].length),a+=i[1];else if(i=this.rules.autolink.exec(e))e=e.substring(i[0].length),"@"===i[2]?(n=":"===i[1][6]?this.mangle(i[1].substring(7)):this.mangle(i[1]),r=this.mangle("mailto:")+n):(n=s(i[1]),r=n),a+=''+n+"";else if(i=this.rules.url.exec(e))e=e.substring(i[0].length),n=s(i[1]),r=n,a+=''+n+"";else if(i=this.rules.tag.exec(e))e=e.substring(i[0].length),a+=this.options.sanitize?s(i[0]):i[0];else if(i=this.rules.link.exec(e))e=e.substring(i[0].length),a+=this.outputLink(i,{href:i[2],title:i[3]});else if((i=this.rules.reflink.exec(e))||(i=this.rules.nolink.exec(e))){if(e=e.substring(i[0].length),t=(i[2]||i[1]).replace(/\s+/g," "),t=this.links[t.toLowerCase()],!t||!t.href){a+=i[0][0],e=i[0].substring(1)+e;continue}a+=this.outputLink(i,t)}else if(i=this.rules.strong.exec(e))e=e.substring(i[0].length),a+=""+this.output(i[2]||i[1])+"";else if(i=this.rules.em.exec(e))e=e.substring(i[0].length),a+=""+this.output(i[2]||i[1])+"";else if(i=this.rules.code.exec(e))e=e.substring(i[0].length),a+=""+s(i[2],!0)+"";else if(i=this.rules.br.exec(e))e=e.substring(i[0].length),a+="
    ";else if(i=this.rules.del.exec(e))e=e.substring(i[0].length),a+=""+this.output(i[1])+"";else if(i=this.rules.text.exec(e))e=e.substring(i[0].length),a+=s(i[0]);else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0));return a},t.prototype.outputLink=function(e,t){return"!"!==e[0][0]?'"+this.output(e[1])+"":''+s(e[1])+'"},t.prototype.mangle=function(e){for(var t,n="",s=e.length,r=0;s>r;r++)t=e.charCodeAt(r),Math.random()>.5&&(t="x"+t.toString(16)),n+="&#"+t+";";return n},n.parse=function(e,t){var s=new n(t);return s.parse(e)},n.prototype.parse=function(e){this.inline=new t(e.links,this.options),this.tokens=e.reverse();for(var n="";this.next();)n+=this.tok();return n},n.prototype.next=function(){return this.token=this.tokens.pop()},n.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0},n.prototype.parseText=function(){for(var e=this.token.text;"text"===this.peek().type;)e+="\n"+this.next().text;return this.inline.output(e)},n.prototype.tok=function(){switch(this.token.type){case"space":return"";case"hr":return"
    \n";case"heading":return""+this.inline.output(this.token.text)+"\n";case"code":if(this.options.highlight){var e=this.options.highlight(this.token.text,this.token.lang);null!=e&&e!==this.token.text&&(this.token.escaped=!0,this.token.text=e)}return this.token.escaped||(this.token.text=s(this.token.text,!0)),"
    "+this.token.text+"
    \n";case"table":var t,n,r,i,a,l="";for(l+="
    \n\n",n=0;n'+t+"\n":"\n";for(l+="\n\n",l+="\n",n=0;n\n",a=0;a'+i+"\n":"\n";l+="\n"}return l+="\n","
    "+t+"
    "+i+"
    \n"+l+"
    \n";case"blockquote_start":for(var l="";"blockquote_end"!==this.next().type;)l+=this.tok();return"
    \n"+l+"
    \n";case"list_start":for(var o=this.token.ordered?"ol":"ul",l="";"list_end"!==this.next().type;)l+=this.tok();return"<"+o+">\n"+l+"\n";case"list_item_start":for(var l="";"list_item_end"!==this.next().type;)l+="text"===this.token.type?this.parseText():this.tok();return"
  • "+l+"
  • \n";case"loose_item_start":for(var l="";"list_item_end"!==this.next().type;)l+=this.tok();return"
  • "+l+"
  • \n";case"html":return this.token.pre||this.options.pedantic?this.token.text:this.inline.output(this.token.text);case"paragraph":return"

    "+this.inline.output(this.token.text)+"

    \n";case"text":return"

    "+this.parseText()+"

    \n"}},i.exec=i,l.options=l.setOptions=function(e){return a(l.defaults,e),l},l.defaults={gfm:!0,tables:!0,breaks:!1,pedantic:!1,sanitize:!1,smartLists:!1,silent:!1,highlight:null,langPrefix:"lang-"},l.Parser=n,l.parser=n.parse,l.Lexer=e,l.lexer=e.lex,l.InlineLexer=t,l.inlineLexer=t.output,l.parse=l,"object"==typeof exports?module.exports=l:"function"==typeof define&&define.amd?define(function(){return l}):this.marked=l}).call(function(){return this||("undefined"!=typeof window?window:global)}()),window.PR_SHOULD_USE_CONTINUATION=!0;var prettyPrintOne,prettyPrint;!function(){function e(e){function t(e){var t=e.charCodeAt(0);if(92!==t)return t;var n=e.charAt(1);return t=u[n],t?t:n>="0"&&"7">=n?parseInt(e.substring(1),8):"u"===n||"x"===n?parseInt(e.substring(2),16):e.charCodeAt(1)}function n(e){if(32>e)return(16>e?"\\x0":"\\x")+e.toString(16);var t=String.fromCharCode(e);return"\\"===t||"-"===t||"]"===t||"^"===t?"\\"+t:t}function s(e){var s=e.substring(1,e.length-1).match(new RegExp("\\\\u[0-9A-Fa-f]{4}|\\\\x[0-9A-Fa-f]{2}|\\\\[0-3][0-7]{0,2}|\\\\[0-7]{1,2}|\\\\[\\s\\S]|-|[^-\\\\]","g")),r=[],i="^"===s[0],a=["["];i&&a.push("^");for(var l=i?1:0,o=s.length;o>l;++l){var h=s[l];if(/\\[bdsw]/i.test(h))a.push(h);else{var c,u=t(h);o>l+2&&"-"===s[l+1]?(c=t(s[l+2]),l+=2):c=u,r.push([u,c]),65>c||u>122||(65>c||u>90||r.push([32|Math.max(65,u),32|Math.min(c,90)]),97>c||u>122||r.push([-33&Math.max(97,u),-33&Math.min(c,122)]))}}r.sort(function(e,t){return e[0]-t[0]||t[1]-e[1]});for(var p=[],d=[],l=0;lg[0]&&(g[1]+1>g[0]&&a.push("-"),a.push(n(g[1])))}return a.push("]"),a.join("")}function r(e){for(var t=e.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g")),r=t.length,l=[],o=0,h=0;r>o;++o){var c=t[o];if("("===c)++h;else if("\\"===c.charAt(0)){var u=+c.substring(1);u&&(h>=u?l[u]=-1:t[o]=n(u))}}for(var o=1;oo;++o){var c=t[o];if("("===c)++h,l[h]||(t[o]="(?:");else if("\\"===c.charAt(0)){var u=+c.substring(1);u&&h>=u&&(t[o]="\\"+l[u])}}for(var o=0;r>o;++o)"^"===t[o]&&"^"!==t[o+1]&&(t[o]="");if(e.ignoreCase&&a)for(var o=0;r>o;++o){var c=t[o],p=c.charAt(0);c.length>=2&&"["===p?t[o]=s(c):"\\"!==p&&(t[o]=c.replace(/[a-zA-Z]/g,function(e){var t=e.charCodeAt(0);return"["+String.fromCharCode(-33&t,32|t)+"]"}))}return t.join("")}for(var i=0,a=!1,l=!1,o=0,h=e.length;h>o;++o){var c=e[o];if(c.ignoreCase)l=!0;else if(/[a-z]/i.test(c.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){a=!0,l=!1;break}}for(var u={b:8,t:9,n:10,v:11,f:12,r:13},p=[],o=0,h=e.length;h>o;++o){var c=e[o];if(c.global||c.multiline)throw new Error(""+c);p.push("(?:"+r(c)+")")}return new RegExp(p.join("|"),l?"gi":"g")}function t(e,t){function n(e){switch(e.nodeType){case 1:if(s.test(e.className))return;for(var o=e.firstChild;o;o=o.nextSibling)n(o);var h=e.nodeName.toLowerCase();("br"===h||"li"===h)&&(r[l]="\n",a[l<<1]=i++,a[l++<<1|1]=e);break;case 3:case 4:var c=e.nodeValue;c.length&&(c=t?c.replace(/\r\n?/g,"\n"):c.replace(/[ \t\r\n]+/g," "),r[l]=c,a[l<<1]=i,i+=c.length,a[l++<<1|1]=e)}}var s=/(?:^|\s)nocode(?:\s|$)/,r=[],i=0,a=[],l=0;return n(e),{sourceCode:r.join("").replace(/\n$/,""),spans:a}}function n(e,t,n,s){if(t){var r={sourceCode:t,basePos:e};n(r),s.push.apply(s,r.decorations)}}function s(e){for(var t=void 0,n=e.firstChild;n;n=n.nextSibling){var s=n.nodeType;t=1===s?t?e:n:3===s&&H.test(n.nodeValue)?e:t}return t===e?void 0:t}function r(t,s){var r,i={};!function(){for(var n=t.concat(s),a=[],l={},o=0,h=n.length;h>o;++o){var c=n[o],u=c[3];if(u)for(var p=u.length;--p>=0;)i[u.charAt(p)]=c;var d=c[1],g=""+d;l.hasOwnProperty(g)||(a.push(d),l[g]=null)}a.push(/[\0-\uffff]/),r=e(a)}();var a=s.length,l=function(e){for(var t=e.sourceCode,o=e.basePos,c=[o,q],u=0,p=t.match(r)||[],d={},g=0,f=p.length;f>g;++g){var m,b=p[g],x=d[b],v=void 0;if("string"==typeof x)m=!1;else{var y=i[b.charAt(0)];if(y)v=b.match(y[1]),x=y[0];else{for(var k=0;a>k;++k)if(y=s[k],v=b.match(y[1])){x=y[0];break}v||(x=q)}m=x.length>=5&&"lang-"===x.substring(0,5),!m||v&&"string"==typeof v[1]||(m=!1,x=B),m||(d[b]=x)}var w=u;if(u+=b.length,m){var S=v[1],_=b.indexOf(S),C=_+S.length;v[2]&&(C=b.length-v[2].length,_=C-S.length);var E=x.substring(5);n(o+w,b.substring(0,_),l,c),n(o+w+_,S,h(E,S),c),n(o+w+C,b.substring(C),l,c)}else c.push(o+w,x)}e.decorations=c};return l}function i(e){var t=[],n=[];e.tripleQuotedStrings?t.push([$,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,"'\""]):e.multiLineStrings?t.push([$,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):t.push([$,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,"\"'"]),e.verbatimStrings&&n.push([$,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var s=e.hashComments;if(s&&(e.cStyleComments?(s>1?t.push([L,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):t.push([L,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),n.push([$,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):t.push([L,/^#[^\r\n]*/,null,"#"])),e.cStyleComments&&(n.push([L,/^\/\/[^\r\n]*/,null]),n.push([L,/^\/\*[\s\S]*?(?:\*\/|$)/,null])),e.regexLiterals){var i="/(?=[^/*])(?:[^/\\x5B\\x5C]|\\x5C[\\s\\S]|\\x5B(?:[^\\x5C\\x5D]|\\x5C[\\s\\S])*(?:\\x5D|$))+/";n.push(["lang-regex",new RegExp("^"+D+"("+i+")")])}var a=e.types;a&&n.push([j,a]);var l=(""+e.keywords).replace(/^ | $/g,"");l.length&&n.push([T,new RegExp("^(?:"+l.replace(/[\s,]+/g,"|")+")\\b"),null]),t.push([q,/^\s+/,null," \r\n  "]);var o=/^.[^\s\w\.$@\'\"\`\/\\]*/;return n.push([A,/^@[a-z_$][a-z_$@0-9]*/i,null],[j,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[q,/^[a-z_$][a-z_$@0-9]*/i,null],[A,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[q,/^\\[\s\S]?/,null],[P,o,null]),r(t,n)}function a(e,t,n){function s(e){switch(e.nodeType){case 1:if(i.test(e.className))break;if("br"===e.nodeName)r(e),e.parentNode&&e.parentNode.removeChild(e);else for(var t=e.firstChild;t;t=t.nextSibling)s(t);break;case 3:case 4:if(n){var o=e.nodeValue,h=o.match(a);if(h){var c=o.substring(0,h.index);e.nodeValue=c;var u=o.substring(h.index+h[0].length);if(u){var p=e.parentNode;p.insertBefore(l.createTextNode(u),e.nextSibling)}r(e),c||e.parentNode.removeChild(e)}}}}function r(e){function t(e,n){var s=n?e.cloneNode(!1):e,r=e.parentNode;if(r){var i=t(r,1),a=e.nextSibling;i.appendChild(s);for(var l=a;l;l=a)a=l.nextSibling,i.appendChild(l)}return s}for(;!e.nextSibling;)if(e=e.parentNode,!e)return;for(var n,s=t(e.nextSibling,0);(n=s.parentNode)&&1===n.nodeType;)s=n;h.push(s)}for(var i=/(?:^|\s)nocode(?:\s|$)/,a=/\r\n?|\n/,l=e.ownerDocument,o=l.createElement("li");e.firstChild;)o.appendChild(e.firstChild);for(var h=[o],c=0;cc;++c)o=h[c],o.className="L"+(c+p)%10,o.firstChild||o.appendChild(l.createTextNode(" ")),u.appendChild(o);e.appendChild(u)}function l(e){var t=/\bMSIE\s(\d+)/.exec(navigator.userAgent);t=t&&+t[1]<=8;var n=/\n/g,s=e.sourceCode,r=s.length,i=0,a=e.spans,l=a.length,o=0,h=e.decorations,c=h.length,u=0;h[c]=r;var p,d;for(d=p=0;c>d;)h[d]!==h[d+2]?(h[p++]=h[d++],h[p++]=h[d++]):d+=2;for(c=p,d=p=0;c>d;){for(var g=h[d],f=h[d+1],m=d+2;c>=m+2&&h[m+1]===f;)m+=2;h[p++]=g,h[p++]=f,d=m}c=h.length=p;var b,x=e.sourceNode;x&&(b=x.style.display,x.style.display="none");try{for(;l>o;){var v,y=(a[o],a[o+2]||r),k=h[u+2]||r,m=Math.min(y,k),w=a[o+1];if(1!==w.nodeType&&(v=s.substring(i,m))){t&&(v=v.replace(n,"\r")),w.nodeValue=v;var S=w.ownerDocument,_=S.createElement("span");_.className=h[u+1];var C=w.parentNode;C.replaceChild(_,w),_.appendChild(w),y>i&&(a[o+1]=w=S.createTextNode(s.substring(m,y)),C.insertBefore(w,_.nextSibling))}i=m,i>=y&&(o+=2),i>=k&&(u+=2)}}finally{x&&(x.style.display=b)}}function o(e,t){for(var n=t.length;--n>=0;){var s=t[n];U.hasOwnProperty(s)?d.console&&console.warn("cannot override language handler %s",s):U[s]=e}}function h(e,t){return e&&U.hasOwnProperty(e)||(e=/^\s*o;++o)i.push(r[l][o]);r=null;var u=Date;u.now||(u={now:function(){return+new Date}});var p,g=0,f=/\blang(?:uage)?-([\w.]+)(?!\S)/,m=/\bprettyprint\b/,b=/\bprettyprinted\b/,x=/pre|xmp/i,v=/^code$/i,y=/^(?:pre|code|xmp)$/i;n()}var d=window,g=["break,continue,do,else,for,if,return,while"],f=[g,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],m=[f,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],b=[m,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],x=[m,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"],v=[x,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,let,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var,virtual,where"],y="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",k=[m,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],w="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",S=[g,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],_=[g,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],C=[g,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],E=[b,v,k,w+S,_,C],N=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,$="str",T="kwd",L="com",j="typ",A="lit",P="pun",q="pln",M="tag",R="dec",B="src",I="atn",O="atv",z="nocode",D="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*",H=/\S/,F=i({keywords:E,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),U={};o(F,["default-code"]),o(r([],[[q,/^[^]*(?:>|$)/],[L,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[P,/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]),o(r([[q,/^[\s]+/,null," \r\n"],[O,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,"\"'"]],[[M,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[I,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[P,/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]),o(r([],[[O,/^[\s\S]+/]]),["uq.val"]),o(i({keywords:b,hashComments:!0,cStyleComments:!0,types:N}),["c","cc","cpp","cxx","cyc","m"]),o(i({keywords:"null,true,false"}),["json"]),o(i({keywords:v,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:N}),["cs"]),o(i({keywords:x,cStyleComments:!0}),["java"]),o(i({keywords:C,hashComments:!0,multiLineStrings:!0}),["bsh","csh","sh"]),o(i({keywords:S,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py"]),o(i({keywords:w,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["perl","pl","pm"]),o(i({keywords:_,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb"]),o(i({keywords:k,cStyleComments:!0,regexLiterals:!0}),["js"]),o(i({keywords:y,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),o(r([],[[$,/^[\s\S]+/]]),["regex"]);var V=d.PR={createSimpleLexer:r,registerLangHandler:o,sourceDecorator:i,PR_ATTRIB_NAME:I,PR_ATTRIB_VALUE:O,PR_COMMENT:L,PR_DECLARATION:R,PR_KEYWORD:T,PR_LITERAL:A,PR_NOCODE:z,PR_PLAIN:q,PR_PUNCTUATION:P,PR_SOURCE:B,PR_STRING:$,PR_TAG:M,PR_TYPE:j,prettyPrintOne:d.prettyPrintOne=u,prettyPrint:d.prettyPrint=p};"function"==typeof define&&define.amd&&define("google-code-prettify",[],function(){return V})}(),function(e,t){function n(e){var n,s,r,i=t.createElement("a"),a={};for(i.href=e,n=i.search.replace("?","&").split("&"),r=0;ri;i++)s.test(r[i].className)&&n.push(r[i]);return n}return n(t.body,e)});var s=t.getElementsByTagName("xmp")[0]||t.getElementsByTagName("pre")[0]||t.getElementsByTagName("textarea")[0],r=t.getElementsByTagName("title")[0],i=t.getElementsByTagName("script"),a=t.getElementsByClassName("navbar")[0],l=t.createElement("meta");l.name="viewport",l.content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0",t.head.firstChild?t.head.insertBefore(l,t.head.firstChild):t.head.appendChild(l);for(var o="",h=0;h'+p+", thanks to BitBucket) ",t.body.insertBefore(f,t.body.firstChild);var m=r.innerHTML,b=t.getElementById("headline");b&&(b.innerHTML=m)}marked.setOptions({gfm:!0,tables:!0,smartypants:!0,pedantic:u.pedantic||!1});var x=marked(g);t.getElementById("content").innerHTML=x;for(var v=t.getElementsByTagName("code"),h=0,y=v.length;y>h;h++){var k=v[h],w=k.className;k.className="prettyprint lang-"+w}prettyPrint();for(var S=t.getElementsByTagName("table"),h=0,y=S.length;y>h;h++){var _=S[h];_.className="table table-striped table-bordered"}t.body.style.display="";var C=t.createElement("script");if(C.type="text/x-mathjax-config",C.innerHTML="MathJax.Hub.Config({ tex2jax: { inlineMath: [['$','$']], displayMath: [ ['$$','$$']], processEscapes: true } });",t.body.appendChild(C),u.mathjax){var C=t.createElement("script");C.type="text/javascript",C.src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML&locale=fr",t.head.appendChild(C)}if(u.beacon){var d=t.createElement("img");d.alt="GA|Analytics",d.style="visibility: hidden; display: none;",d.src="http://perso.crans.org/besson/beacon/14/query/strapdown.js?pixel",t.body.appendChild(d)}}(window,document); \ No newline at end of file +(function(){function e(e){this.tokens=[],this.tokens.links={},this.options=e||l.defaults,this.rules=o.normal,this.options.gfm&&(this.options.tables?this.rules=o.tables:this.rules=o.gfm)}function t(e,t){if(this.options=t||l.defaults,this.links=e,this.rules=h.normal,!this.links)throw new Error("Tokens array requires a `links` property.");this.options.gfm?this.options.breaks?this.rules=h.breaks:this.rules=h.gfm:this.options.pedantic&&(this.rules=h.pedantic)}function n(e){this.tokens=[],this.token=null,this.options=e||l.defaults}function s(e,t){return e.replace(t?/&/g:/&(?!#?\w+;)/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function r(e,t){return e=e.source,t=t||"",function n(s,r){return s?(r=r.source||r,r=r.replace(/(^|[^\[])\^/g,"$1"),e=e.replace(s,r),n):new RegExp(e,t)}}function i(){}function a(e){for(var t,n,s=1;s[^\n]+(\n[^\n]+)*\n*)+/,list:/^( *)(bull) [\s\S]+?(?:hr|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:/^ *(?:comment|closed|closing) *(?:\n{2,}|\s*$)/,def:/^ *\[([^\]]+)\]: *]+)>?(?: +["(]([^\n]+)[")])? *(?:\n+|$)/,table:i,paragraph:/^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def))+)\n*/,text:/^[^\n]+/};o.bullet=/(?:[*+-]|\d+\.)/,o.item=/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/,o.item=r(o.item,"gm")(/bull/g,o.bullet)(),o.list=r(o.list)(/bull/g,o.bullet)("hr",/\n+(?=(?: *[-*_]){3,} *(?:\n+|$))/)(),o._tag="(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:/|@)\\b",o.html=r(o.html)("comment",//)("closed",/<(tag)[\s\S]+?<\/\1>/)("closing",/])*?>/)(/tag/g,o._tag)(),o.paragraph=r(o.paragraph)("hr",o.hr)("heading",o.heading)("lheading",o.lheading)("blockquote",o.blockquote)("tag","<"+o._tag)("def",o.def)(),o.normal=a({},o),o.gfm=a({},o.normal,{fences:/^ *(`{3,}|~{3,}) *(\w+)? *\n([\s\S]+?)\s*\1 *(?:\n+|$)/,paragraph:/^/}),o.gfm.paragraph=r(o.paragraph)("(?!","(?!"+o.gfm.fences.source.replace("\\1","\\2")+"|")(),o.tables=a({},o.gfm,{nptable:/^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/,table:/^ *\|(.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/}),e.rules=o,e.lex=function(t,n){var s=new e(n);return s.lex(t)},e.prototype.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n"),this.token(e,!0)},e.prototype.token=function(e,t){for(var n,s,r,i,a,l,h,c,u,e=e.replace(/^ +$/gm,"");e;)if((r=this.rules.newline.exec(e))&&(e=e.substring(r[0].length),r[0].length>1&&this.tokens.push({type:"space"})),r=this.rules.code.exec(e))e=e.substring(r[0].length),r=r[0].replace(/^ {4}/gm,""),this.tokens.push({type:"code",text:this.options.pedantic?r:r.replace(/\n+$/,"")});else if(r=this.rules.fences.exec(e))e=e.substring(r[0].length),this.tokens.push({type:"code",lang:r[2],text:r[3]});else if(r=this.rules.heading.exec(e))e=e.substring(r[0].length),this.tokens.push({type:"heading",depth:r[1].length,text:r[2]});else if(t&&(r=this.rules.nptable.exec(e))){for(e=e.substring(r[0].length),l={type:"table",header:r[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:r[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:r[3].replace(/\n$/,"").split("\n")},c=0;c ?/gm,""),this.token(r,t),this.tokens.push({type:"blockquote_end"});else if(r=this.rules.list.exec(e)){for(e=e.substring(r[0].length),this.tokens.push({type:"list_start",ordered:isFinite(r[2])}),r=r[0].match(this.rules.item),this.options.smartLists&&(i=o.bullet.exec(r[0])[0]),n=!1,u=r.length,c=0;u>c;c++)l=r[c],h=l.length,l=l.replace(/^ *([*+-]|\d+\.) +/,""),~l.indexOf("\n ")&&(h-=l.length,l=this.options.pedantic?l.replace(/^ {1,4}/gm,""):l.replace(new RegExp("^ {1,"+h+"}","gm"),"")),this.options.smartLists&&c!==u-1&&(a=o.bullet.exec(r[c+1])[0],i===a||"."===i[1]&&"."===a[1]||(e=r.slice(c+1).join("\n")+e,c=u-1)),s=n||/\n\n(?!\s*$)/.test(l),c!==u-1&&(n="\n"===l[l.length-1],s||(s=n)),this.tokens.push({type:s?"loose_item_start":"list_item_start"}),this.token(l,!1),this.tokens.push({type:"list_item_end"});this.tokens.push({type:"list_end"})}else if(r=this.rules.html.exec(e))e=e.substring(r[0].length),this.tokens.push({type:this.options.sanitize?"paragraph":"html",pre:"pre"===r[1],text:r[0]});else if(t&&(r=this.rules.def.exec(e)))e=e.substring(r[0].length),this.tokens.links[r[1].toLowerCase()]={href:r[2],title:r[3]};else if(t&&(r=this.rules.table.exec(e))){for(e=e.substring(r[0].length),l={type:"table",header:r[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:r[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:r[3].replace(/(?: *\| *)?\n$/,"").split("\n")},c=0;c])/,autolink:/^<([^ >]+(@|:\/)[^ >]+)>/,url:i,tag:/^|^<\/?\w+(?:"[^"]*"|'[^']*'|[^'">])*?>/,link:/^!?\[(inside)\]\(href\)/,reflink:/^!?\[(inside)\]\s*\[([^\]]*)\]/,nolink:/^!?\[((?:\[[^\]]*\]|[^\[\]])*)\]/,strong:/^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/,em:/^\b_((?:__|[\s\S])+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/,code:/^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,br:/^ {2,}\n(?!\s*$)/,del:i,text:/^[\s\S]+?(?=[\\?(?:\s+['"]([\s\S]*?)['"])?\s*/,h.link=r(h.link)("inside",h._inside)("href",h._href)(),h.reflink=r(h.reflink)("inside",h._inside)(),h.normal=a({},h),h.pedantic=a({},h.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/}),h.gfm=a({},h.normal,{escape:r(h.escape)("])","~|])")(),url:/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,del:/^~~(?=\S)([\s\S]*?\S)~~/,text:r(h.text)("]|","~]|")("|","|https?://|")()}),h.breaks=a({},h.gfm,{br:r(h.br)("{2,}","*")(),text:r(h.gfm.text)("{2,}","*")()}),t.rules=h,t.output=function(e,n,s){var r=new t(n,s);return r.output(e)},t.prototype.output=function(e){for(var t,n,r,i,a="";e;)if(i=this.rules.escape.exec(e))e=e.substring(i[0].length),a+=i[1];else if(i=this.rules.autolink.exec(e))e=e.substring(i[0].length),"@"===i[2]?(n=":"===i[1][6]?this.mangle(i[1].substring(7)):this.mangle(i[1]),r=this.mangle("mailto:")+n):(n=s(i[1]),r=n),a+=''+n+"";else if(i=this.rules.url.exec(e))e=e.substring(i[0].length),n=s(i[1]),r=n,a+=''+n+"";else if(i=this.rules.tag.exec(e))e=e.substring(i[0].length),a+=this.options.sanitize?s(i[0]):i[0];else if(i=this.rules.link.exec(e))e=e.substring(i[0].length),a+=this.outputLink(i,{href:i[2],title:i[3]});else if((i=this.rules.reflink.exec(e))||(i=this.rules.nolink.exec(e))){if(e=e.substring(i[0].length),t=(i[2]||i[1]).replace(/\s+/g," "),t=this.links[t.toLowerCase()],!t||!t.href){a+=i[0][0],e=i[0].substring(1)+e;continue}a+=this.outputLink(i,t)}else if(i=this.rules.strong.exec(e))e=e.substring(i[0].length),a+=""+this.output(i[2]||i[1])+"";else if(i=this.rules.em.exec(e))e=e.substring(i[0].length),a+=""+this.output(i[2]||i[1])+"";else if(i=this.rules.code.exec(e))e=e.substring(i[0].length),a+=""+s(i[2],!0)+"";else if(i=this.rules.br.exec(e))e=e.substring(i[0].length),a+="
    ";else if(i=this.rules.del.exec(e))e=e.substring(i[0].length),a+=""+this.output(i[1])+"";else if(i=this.rules.text.exec(e))e=e.substring(i[0].length),a+=s(i[0]);else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0));return a},t.prototype.outputLink=function(e,t){return"!"!==e[0][0]?'"+this.output(e[1])+"":''+s(e[1])+'"},t.prototype.mangle=function(e){for(var t,n="",s=e.length,r=0;s>r;r++)t=e.charCodeAt(r),Math.random()>.5&&(t="x"+t.toString(16)),n+="&#"+t+";";return n},n.parse=function(e,t){var s=new n(t);return s.parse(e)},n.prototype.parse=function(e){this.inline=new t(e.links,this.options),this.tokens=e.reverse();for(var n="";this.next();)n+=this.tok();return n},n.prototype.next=function(){return this.token=this.tokens.pop()},n.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0},n.prototype.parseText=function(){for(var e=this.token.text;"text"===this.peek().type;)e+="\n"+this.next().text;return this.inline.output(e)},n.prototype.tok=function(){switch(this.token.type){case"space":return"";case"hr":return"
    \n";case"heading":return""+this.inline.output(this.token.text)+"\n";case"code":if(this.options.highlight){var e=this.options.highlight(this.token.text,this.token.lang);null!=e&&e!==this.token.text&&(this.token.escaped=!0,this.token.text=e)}return this.token.escaped||(this.token.text=s(this.token.text,!0)),"
    "+this.token.text+"
    \n";case"table":var t,n,r,i,a,l="";for(l+="\n\n",n=0;n'+t+"\n":""+t+"\n";for(l+="\n\n",l+="\n",n=0;n\n",a=0;a'+i+"\n":""+i+"\n";l+="\n"}return l+="\n","\n"+l+"
    \n";case"blockquote_start":for(var l="";"blockquote_end"!==this.next().type;)l+=this.tok();return"
    \n"+l+"
    \n";case"list_start":for(var o=this.token.ordered?"ol":"ul",l="";"list_end"!==this.next().type;)l+=this.tok();return"<"+o+">\n"+l+"\n";case"list_item_start":for(var l="";"list_item_end"!==this.next().type;)l+="text"===this.token.type?this.parseText():this.tok();return"
  • "+l+"
  • \n";case"loose_item_start":for(var l="";"list_item_end"!==this.next().type;)l+=this.tok();return"
  • "+l+"
  • \n";case"html":return this.token.pre||this.options.pedantic?this.token.text:this.inline.output(this.token.text);case"paragraph":return"

    "+this.inline.output(this.token.text)+"

    \n";case"text":return"

    "+this.parseText()+"

    \n"}},i.exec=i,l.options=l.setOptions=function(e){return a(l.defaults,e),l},l.defaults={gfm:!0,tables:!0,breaks:!1,pedantic:!1,sanitize:!1,smartLists:!1,silent:!1,highlight:null,langPrefix:"lang-"},l.Parser=n,l.parser=n.parse,l.Lexer=e,l.lexer=e.lex,l.InlineLexer=t,l.inlineLexer=t.output,l.parse=l,"object"==typeof exports?module.exports=l:"function"==typeof define&&define.amd?define(function(){return l}):this.marked=l}).call(function(){return this||("undefined"!=typeof window?window:global)}()),window.PR_SHOULD_USE_CONTINUATION=!0;var prettyPrintOne,prettyPrint;!function(){function e(e){function t(e){var t=e.charCodeAt(0);if(92!==t)return t;var n=e.charAt(1);return t=u[n],t?t:n>="0"&&"7">=n?parseInt(e.substring(1),8):"u"===n||"x"===n?parseInt(e.substring(2),16):e.charCodeAt(1)}function n(e){if(32>e)return(16>e?"\\x0":"\\x")+e.toString(16);var t=String.fromCharCode(e);return"\\"===t||"-"===t||"]"===t||"^"===t?"\\"+t:t}function s(e){var s=e.substring(1,e.length-1).match(new RegExp("\\\\u[0-9A-Fa-f]{4}|\\\\x[0-9A-Fa-f]{2}|\\\\[0-3][0-7]{0,2}|\\\\[0-7]{1,2}|\\\\[\\s\\S]|-|[^-\\\\]","g")),r=[],i="^"===s[0],a=["["];i&&a.push("^");for(var l=i?1:0,o=s.length;o>l;++l){var h=s[l];if(/\\[bdsw]/i.test(h))a.push(h);else{var c,u=t(h);o>l+2&&"-"===s[l+1]?(c=t(s[l+2]),l+=2):c=u,r.push([u,c]),65>c||u>122||(65>c||u>90||r.push([32|Math.max(65,u),32|Math.min(c,90)]),97>c||u>122||r.push([-33&Math.max(97,u),-33&Math.min(c,122)]))}}r.sort(function(e,t){return e[0]-t[0]||t[1]-e[1]});for(var p=[],d=[],l=0;lg[0]&&(g[1]+1>g[0]&&a.push("-"),a.push(n(g[1])))}return a.push("]"),a.join("")}function r(e){for(var t=e.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g")),r=t.length,l=[],o=0,h=0;r>o;++o){var c=t[o];if("("===c)++h;else if("\\"===c.charAt(0)){var u=+c.substring(1);u&&(h>=u?l[u]=-1:t[o]=n(u))}}for(var o=1;oo;++o){var c=t[o];if("("===c)++h,l[h]||(t[o]="(?:");else if("\\"===c.charAt(0)){var u=+c.substring(1);u&&h>=u&&(t[o]="\\"+l[u])}}for(var o=0;r>o;++o)"^"===t[o]&&"^"!==t[o+1]&&(t[o]="");if(e.ignoreCase&&a)for(var o=0;r>o;++o){var c=t[o],p=c.charAt(0);c.length>=2&&"["===p?t[o]=s(c):"\\"!==p&&(t[o]=c.replace(/[a-zA-Z]/g,function(e){var t=e.charCodeAt(0);return"["+String.fromCharCode(-33&t,32|t)+"]"}))}return t.join("")}for(var i=0,a=!1,l=!1,o=0,h=e.length;h>o;++o){var c=e[o];if(c.ignoreCase)l=!0;else if(/[a-z]/i.test(c.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){a=!0,l=!1;break}}for(var u={b:8,t:9,n:10,v:11,f:12,r:13},p=[],o=0,h=e.length;h>o;++o){var c=e[o];if(c.global||c.multiline)throw new Error(""+c);p.push("(?:"+r(c)+")")}return new RegExp(p.join("|"),l?"gi":"g")}function t(e,t){function n(e){switch(e.nodeType){case 1:if(s.test(e.className))return;for(var o=e.firstChild;o;o=o.nextSibling)n(o);var h=e.nodeName.toLowerCase();("br"===h||"li"===h)&&(r[l]="\n",a[l<<1]=i++,a[l++<<1|1]=e);break;case 3:case 4:var c=e.nodeValue;c.length&&(c=t?c.replace(/\r\n?/g,"\n"):c.replace(/[ \t\r\n]+/g," "),r[l]=c,a[l<<1]=i,i+=c.length,a[l++<<1|1]=e)}}var s=/(?:^|\s)nocode(?:\s|$)/,r=[],i=0,a=[],l=0;return n(e),{sourceCode:r.join("").replace(/\n$/,""),spans:a}}function n(e,t,n,s){if(t){var r={sourceCode:t,basePos:e};n(r),s.push.apply(s,r.decorations)}}function s(e){for(var t=void 0,n=e.firstChild;n;n=n.nextSibling){var s=n.nodeType;t=1===s?t?e:n:3===s&&H.test(n.nodeValue)?e:t}return t===e?void 0:t}function r(t,s){var r,i={};!function(){for(var n=t.concat(s),a=[],l={},o=0,h=n.length;h>o;++o){var c=n[o],u=c[3];if(u)for(var p=u.length;--p>=0;)i[u.charAt(p)]=c;var d=c[1],g=""+d;l.hasOwnProperty(g)||(a.push(d),l[g]=null)}a.push(/[\0-\uffff]/),r=e(a)}();var a=s.length,l=function(e){for(var t=e.sourceCode,o=e.basePos,c=[o,q],u=0,p=t.match(r)||[],d={},g=0,f=p.length;f>g;++g){var m,b=p[g],x=d[b],v=void 0;if("string"==typeof x)m=!1;else{var y=i[b.charAt(0)];if(y)v=b.match(y[1]),x=y[0];else{for(var k=0;a>k;++k)if(y=s[k],v=b.match(y[1])){x=y[0];break}v||(x=q)}m=x.length>=5&&"lang-"===x.substring(0,5),!m||v&&"string"==typeof v[1]||(m=!1,x=B),m||(d[b]=x)}var w=u;if(u+=b.length,m){var S=v[1],_=b.indexOf(S),C=_+S.length;v[2]&&(C=b.length-v[2].length,_=C-S.length);var E=x.substring(5);n(o+w,b.substring(0,_),l,c),n(o+w+_,S,h(E,S),c),n(o+w+C,b.substring(C),l,c)}else c.push(o+w,x)}e.decorations=c};return l}function i(e){var t=[],n=[];e.tripleQuotedStrings?t.push([$,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,"'\""]):e.multiLineStrings?t.push([$,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):t.push([$,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,"\"'"]),e.verbatimStrings&&n.push([$,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var s=e.hashComments;if(s&&(e.cStyleComments?(s>1?t.push([L,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):t.push([L,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),n.push([$,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):t.push([L,/^#[^\r\n]*/,null,"#"])),e.cStyleComments&&(n.push([L,/^\/\/[^\r\n]*/,null]),n.push([L,/^\/\*[\s\S]*?(?:\*\/|$)/,null])),e.regexLiterals){var i="/(?=[^/*])(?:[^/\\x5B\\x5C]|\\x5C[\\s\\S]|\\x5B(?:[^\\x5C\\x5D]|\\x5C[\\s\\S])*(?:\\x5D|$))+/";n.push(["lang-regex",new RegExp("^"+D+"("+i+")")])}var a=e.types;a&&n.push([j,a]);var l=(""+e.keywords).replace(/^ | $/g,"");l.length&&n.push([T,new RegExp("^(?:"+l.replace(/[\s,]+/g,"|")+")\\b"),null]),t.push([q,/^\s+/,null," \r\n  "]);var o=/^.[^\s\w\.$@\'\"\`\/\\]*/;return n.push([A,/^@[a-z_$][a-z_$@0-9]*/i,null],[j,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[q,/^[a-z_$][a-z_$@0-9]*/i,null],[A,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[q,/^\\[\s\S]?/,null],[P,o,null]),r(t,n)}function a(e,t,n){function s(e){switch(e.nodeType){case 1:if(i.test(e.className))break;if("br"===e.nodeName)r(e),e.parentNode&&e.parentNode.removeChild(e);else for(var t=e.firstChild;t;t=t.nextSibling)s(t);break;case 3:case 4:if(n){var o=e.nodeValue,h=o.match(a);if(h){var c=o.substring(0,h.index);e.nodeValue=c;var u=o.substring(h.index+h[0].length);if(u){var p=e.parentNode;p.insertBefore(l.createTextNode(u),e.nextSibling)}r(e),c||e.parentNode.removeChild(e)}}}}function r(e){function t(e,n){var s=n?e.cloneNode(!1):e,r=e.parentNode;if(r){var i=t(r,1),a=e.nextSibling;i.appendChild(s);for(var l=a;l;l=a)a=l.nextSibling,i.appendChild(l)}return s}for(;!e.nextSibling;)if(e=e.parentNode,!e)return;for(var n,s=t(e.nextSibling,0);(n=s.parentNode)&&1===n.nodeType;)s=n;h.push(s)}for(var i=/(?:^|\s)nocode(?:\s|$)/,a=/\r\n?|\n/,l=e.ownerDocument,o=l.createElement("li");e.firstChild;)o.appendChild(e.firstChild);for(var h=[o],c=0;cc;++c)o=h[c],o.className="L"+(c+p)%10,o.firstChild||o.appendChild(l.createTextNode(" ")),u.appendChild(o);e.appendChild(u)}function l(e){var t=/\bMSIE\s(\d+)/.exec(navigator.userAgent);t=t&&+t[1]<=8;var n=/\n/g,s=e.sourceCode,r=s.length,i=0,a=e.spans,l=a.length,o=0,h=e.decorations,c=h.length,u=0;h[c]=r;var p,d;for(d=p=0;c>d;)h[d]!==h[d+2]?(h[p++]=h[d++],h[p++]=h[d++]):d+=2;for(c=p,d=p=0;c>d;){for(var g=h[d],f=h[d+1],m=d+2;c>=m+2&&h[m+1]===f;)m+=2;h[p++]=g,h[p++]=f,d=m}c=h.length=p;var b,x=e.sourceNode;x&&(b=x.style.display,x.style.display="none");try{for(;l>o;){var v,y=(a[o],a[o+2]||r),k=h[u+2]||r,m=Math.min(y,k),w=a[o+1];if(1!==w.nodeType&&(v=s.substring(i,m))){t&&(v=v.replace(n,"\r")),w.nodeValue=v;var S=w.ownerDocument,_=S.createElement("span");_.className=h[u+1];var C=w.parentNode;C.replaceChild(_,w),_.appendChild(w),y>i&&(a[o+1]=w=S.createTextNode(s.substring(m,y)),C.insertBefore(w,_.nextSibling))}i=m,i>=y&&(o+=2),i>=k&&(u+=2)}}finally{x&&(x.style.display=b)}}function o(e,t){for(var n=t.length;--n>=0;){var s=t[n];U.hasOwnProperty(s)?d.console&&console.warn("cannot override language handler %s",s):U[s]=e}}function h(e,t){return e&&U.hasOwnProperty(e)||(e=/^\s*o;++o)i.push(r[l][o]);r=null;var u=Date;u.now||(u={now:function(){return+new Date}});var p,g=0,f=/\blang(?:uage)?-([\w.]+)(?!\S)/,m=/\bprettyprint\b/,b=/\bprettyprinted\b/,x=/pre|xmp/i,v=/^code$/i,y=/^(?:pre|code|xmp)$/i;n()}var d=window,g=["break,continue,do,else,for,if,return,while"],f=[g,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],m=[f,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],b=[m,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],x=[m,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"],v=[x,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,let,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var,virtual,where"],y="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",k=[m,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],w="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",S=[g,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],_=[g,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],C=[g,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],E=[b,v,k,w+S,_,C],N=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,$="str",T="kwd",L="com",j="typ",A="lit",P="pun",q="pln",M="tag",R="dec",B="src",I="atn",O="atv",z="nocode",D="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*",H=/\S/,F=i({keywords:E,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),U={};o(F,["default-code"]),o(r([],[[q,/^[^]*(?:>|$)/],[L,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[P,/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]),o(r([[q,/^[\s]+/,null," \r\n"],[O,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,"\"'"]],[[M,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[I,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[P,/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]),o(r([],[[O,/^[\s\S]+/]]),["uq.val"]),o(i({keywords:b,hashComments:!0,cStyleComments:!0,types:N}),["c","cc","cpp","cxx","cyc","m"]),o(i({keywords:"null,true,false"}),["json"]),o(i({keywords:v,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:N}),["cs"]),o(i({keywords:x,cStyleComments:!0}),["java"]),o(i({keywords:C,hashComments:!0,multiLineStrings:!0}),["bsh","csh","sh"]),o(i({keywords:S,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py"]),o(i({keywords:w,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["perl","pl","pm"]),o(i({keywords:_,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb"]),o(i({keywords:k,cStyleComments:!0,regexLiterals:!0}),["js"]),o(i({keywords:y,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),o(r([],[[$,/^[\s\S]+/]]),["regex"]);var V=d.PR={createSimpleLexer:r,registerLangHandler:o,sourceDecorator:i,PR_ATTRIB_NAME:I,PR_ATTRIB_VALUE:O,PR_COMMENT:L,PR_DECLARATION:R,PR_KEYWORD:T,PR_LITERAL:A,PR_NOCODE:z,PR_PLAIN:q,PR_PUNCTUATION:P,PR_SOURCE:B,PR_STRING:$,PR_TAG:M,PR_TYPE:j,prettyPrintOne:d.prettyPrintOne=u,prettyPrint:d.prettyPrint=p};"function"==typeof define&&define.amd&&define("google-code-prettify",[],function(){return V})}(),function(e,t){function n(e){var n,s,r,i=t.createElement("a"),a={};for(i.href=e,n=i.search.replace("?","&").split("&"),r=0;ri;i++)s.test(r[i].className)&&n.push(r[i]);return n}return n(t.body,e)});var s=t.getElementsByTagName("xmp")[0]||t.getElementsByTagName("pre")[0]||t.getElementsByTagName("textarea")[0],r=t.getElementsByTagName("title")[0],i=t.getElementsByTagName("script"),a=t.getElementsByClassName("navbar")[0],l=t.createElement("meta");l.name="viewport",l.content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0",t.head.firstChild?t.head.insertBefore(l,t.head.firstChild):t.head.appendChild(l);for(var o="",h=0;h'+p+", thanks to BitBucket) ",t.body.insertBefore(f,t.body.firstChild);var m=r.innerHTML,b=t.getElementById("headline");b&&(b.innerHTML=m)}marked.setOptions({gfm:!0,tables:!0,smartypants:!0,pedantic:u.pedantic||!1});var x=marked(g);t.getElementById("content").innerHTML=x;for(var v=t.getElementsByTagName("code"),h=0,y=v.length;y>h;h++){var k=v[h],w=k.className;k.className="prettyprint lang-"+w}prettyPrint();for(var S=t.getElementsByTagName("table"),h=0,y=S.length;y>h;h++){var _=S[h];_.className="table table-striped table-bordered"}t.body.style.display="";var C=t.createElement("script");if(C.type="text/x-mathjax-config",C.innerHTML="MathJax.Hub.Config({ tex2jax: { inlineMath: [['$','$']], displayMath: [ ['$$','$$']], processEscapes: true } });",t.body.appendChild(C),u.mathjax){var C=t.createElement("script");C.type="text/javascript",C.src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML&locale=fr",t.head.appendChild(C)}if(u.beacon){var d=t.createElement("img");d.alt="GA|Analytics",d.style="visibility: hidden; display: none;",d.src="http://perso.crans.org/besson/beacon/14/query/strapdown.js?pixel",t.body.appendChild(d)}}(window,document); \ No newline at end of file diff --git a/strapdown.verbose.js b/strapdown.verbose.js index 3b67826..acf6d2c 100644 --- a/strapdown.verbose.js +++ b/strapdown.verbose.js @@ -2024,13 +2024,19 @@ var prettyPrint; /** @type {string} */ node.href = path + "/themes/bootstrap-responsive.min.css"; document.head.appendChild(node); - /** @type {Element} */ - node = document.createElement("link"); - /** @type {string} */ - node.rel = "shortcut icon"; - /** @type {string} */ - node.href = path + "/favicon.png"; - document.head.appendChild(node); + // Favicon (730 bytes for 'favicon.png') + if (fmt['keepicon']) { + // Do not add a favicon, if strapdown.js was loaded with a URL query containing "&keepicon=y" somewhere. + console.log("[strapdown.js] [INFO] Keeping the default favicon (not replacing with originBase/favicon.png ..."); + } else { + /** @type {Element} */ + node = document.createElement("link"); + /** @type {string} */ + node.rel = "shortcut icon"; + /** @type {string} */ + node.href = path + "/favicon.png"; + document.head.appendChild(node); + } var markdown = markdownEl.textContent || markdownEl.innerText; /** @type {Element} */ var newNode = document.createElement("div");