From a39bc2344ef9effd6453a73bbb36f40032daeabd Mon Sep 17 00:00:00 2001 From: Steven Hugg Date: Wed, 21 Nov 2018 11:53:33 -0500 Subject: [PATCH] added markdown platform (using showdown.js) --- css/ui.css | 10 +- index.html | 5 +- presets/markdown/hello.md | 709 +++++++++++++++++++++++++++++ presets/markdown/skeleton.markdown | 4 + src/platform/markdown.ts | 43 ++ src/ui.ts | 1 + src/views.ts | 2 + src/worker/asmjs/showdown.min.js | 3 + src/worker/workermain.ts | 32 ++ 9 files changed, 805 insertions(+), 4 deletions(-) create mode 100644 presets/markdown/hello.md create mode 100644 presets/markdown/skeleton.markdown create mode 100644 src/platform/markdown.ts create mode 100644 src/worker/asmjs/showdown.min.js diff --git a/css/ui.css b/css/ui.css index 5fcd2390..8719fecd 100644 --- a/css/ui.css +++ b/css/ui.css @@ -286,7 +286,7 @@ canvas.pixelated { border-color:#99ff99; background-color:#006600; border-style:solid; - font-family: "Andale Mono", "Menlo", "Lucida Console", monospace; + font-family: "Andale Mono", "Menlo", "Lucida Console", monospace; } .nav-tabs > li > a.tab { line-height: 1.0; @@ -297,7 +297,7 @@ canvas.pixelated { border-color:#9999ff; background-color:#333399; border-style:solid; - font-family: "Andale Mono", "Menlo", "Lucida Console", monospace; + font-family: "Andale Mono", "Menlo", "Lucida Console", monospace; color:#77aaaa; padding:6px; } @@ -335,3 +335,9 @@ div.replaydiv { background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAeCAYAAADkftS9AAAAIklEQVQoU2M4c+bMfxAGAgYYmwGrIIiDjrELjpo5aiZeMwF+yNnOs5KSvgAAAABJRU5ErkJggg=='); height:100%; } +div.markdown { + background-color: #fff; + width:94%; + margin:3%; + padding:1em; +} diff --git a/index.html b/index.html index 1d051002..a0a1760b 100644 --- a/index.html +++ b/index.html @@ -281,10 +281,11 @@ if (window.location.host.endsWith('8bitworkshop.com')) { - - + + + diff --git a/presets/markdown/hello.md b/presets/markdown/hello.md new file mode 100644 index 00000000..6a39a8c6 --- /dev/null +++ b/presets/markdown/hello.md @@ -0,0 +1,709 @@ + +# Syntax + +(from the [Showdown](https://github.com/showdownjs/showdown) docs) + +## Table of contents + +- [Introduction](#introduction) +- [Paragraphs](#paragraphs) +- [Headings](#headings) + * [Atx Style](#atx-style) + * [Setext style](#setext-style) + * [Header IDs](#header-ids) +- [Blockquotes](#blockquotes) +- [Bold and Italic](#bold-and-italic) +- [Strikethrough](#strikethrough) +- [Emojis](#emojis) +- [Code formatting](#code-formatting) + * [Inline formats](#inline-formats) + * [Multiple lines](#multiple-lines) +- [Lists](#lists) + * [Unordered lists](#unordered-lists) + * [Ordered lists](#ordered-lists) + * [TaskLists (GFM Style)](#tasklists--gfm-style-) + * [List syntax](#list-syntax) + * [Nested blocks](#nested-blocks) + * [Nested lists](#nested-lists) + * [Nested code blocks](#nested-code-blocks) +- [Links](#links) + * [Simple](#simple) + * [Inline](#inline) + * [Reference Style](#reference-style) +- [Images](#images) + * [Inline](#inline-1) + * [Reference Style](#reference-style-1) + * [Image dimensions](#image-dimensions) + * [Base64 encoded images](#base64-encoded-images) +- [Tables](#tables) +- [Mentions](#mentions) +- [Handling HTML in markdown documents](#handling-html-in-markdown-documents) +- [Escaping entities](#escaping-entities) + * [Escaping markdown entities](#escaping-markdown-entities) + * [Escaping html tags](#escaping-html-tags) +- [Known differences and Gotchas](#known-differences-and-gotchas) + +## Introduction + +Showdown was created by John Fraser as a direct port of the original parser written by markdown's creator, John Gruber. Although Showdown has evolved since its inception, in "vanilla mode", it tries to follow the [original markdown spec][md-spec] (henceforth refereed as vanilla) as much as possible. There are, however, a few important differences, mainly due to inconsistencies in the original spec, which we addressed following the author's advice as stated in the [markdown's "official" newsletter][md-newsletter]. + +Showdown also support "extra" syntax not defined in the original spec as opt-in features. This means new syntax elements are not enabled by default and require users to enable them through options. + +This document provides a quick description the syntax supported and the differences in output from the original markdown.pl implementation. + +## Paragraphs + +Paragraphs in Showdown are just **one or more lines of consecutive text** followed by one or more blank lines. + +```md +On July 2, an alien mothership entered Earth's orbit and deployed several dozen +saucer-shaped "destroyer" spacecraft, each 15 miles (24 km) wide. + +On July 3, the Black Knights, a squadron of Marine Corps F/A-18 Hornets, +participated in an assault on a destroyer near the city of Los Angeles. +``` + +The implication of the “one or more consecutive lines of text” is that Showdown supports +“hard-wrapped” text paragraphs. This means the following examples produce the same output: + +```md +A very long line of text +``` + +```md +A very +long line +of text +``` + +If you DO want to add soft line breaks (which translate to `
` in HTML) to a paragraph, +you can do so by adding 3 space characters to the end of the line (` `). + +You can also force every line break in paragraphs to translate to `
` (as Github does) by +enabling the option **`simpleLineBreaks`**. + +## Headings + +### Atx Style + +You can create a heading by adding one or more # symbols before your heading text. The number of # you use will determine the size of the heading. This is similar to [**atx style**][atx]. + +```md +# The largest heading (an

tag) +## The second largest heading (an

tag) +… +###### The 6th largest heading (an

tag) +``` + +The space between `#` and the heading text is not required but you can make that space mandatory by enabling the option **`requireSpaceBeforeHeadingText`**. + +You can wrap the headings in `#`. Both leading and trailing `#` will be removed. + +```md +## My Heading ## +``` + +If, for some reason, you need to keep a leading or trailing `#`, you can either add a space or escape it: + +```md +# # My header # # + +#\# My Header \# # +``` + +### Setext style + +You can also use [**setext style**][setext] headings, although only two levels are available. + +```md +This is an H1 +============= + +This is an H2 +------------- +``` + +**Note:** +In live preview editors, when a paragraph is followed by a list it can cause an awkward effect. + +![awkward effect][] + +You can prevent this by enabling the option **`smoothPreview`**. + +### Header IDs + +Showdown generates bookmarks anchors in titles automatically, by adding an id property to an heading. + +```md +# My cool header with ID +``` + +```html +

My cool header with ID

+``` + +This behavior can be modified with options: + + - **`noHeaderId`** disables automatic id generation; + - **`ghCompatibleHeaderId`** generates header ids compatible with github style (spaces are replaced with dashes and a bunch of non alphanumeric chars are removed) + - **`prefixHeaderId`** adds a prefix to the generated header ids (either automatic or custom). + - **`headerLevelStart`** sets the header starting level. For instance, setting this to 3 means that `# header` will be converted to `

`. + +Read the [README.md][readme] for more info + +## Blockquotes + +You can indicate blockquotes with a >. + +```md +In the words of Abraham Lincoln: + +> Pardon my french +``` + +Blockquotes can have multiple paragraphs and can have other block elements inside. + +```md +> A paragraph of text +> +> Another paragraph +> +> - A list +> - with items +``` + +## Bold and Italic + +You can make text bold or italic. + + *This text will be italic* + **This text will be bold** + +Both bold and italic can use either a \* or an \_ around the text for styling. This allows you to combine both bold and italic if needed. + + **Everyone _must_ attend the meeting at 5 o'clock today.** + +## Strikethrough + +With the option **`strikethrough`** enabled, Showdown supports strikethrough elements. +The syntax is the same as GFM, that is, by adding two tilde (`~~`) characters around +a word or groups of words. + +```md +a ~~strikethrough~~ element +``` + +a ~~strikethrough~~ element + +## Emojis + +Since version 1.8.0, showdown supports github's emojis. A complete list of available emojis can be found [here][emoji list]. + +```md +this is a :smile: smile emoji +``` + +this is a :smile: smile emoji + +## Code formatting + +### Inline formats + +Use single backticks (`) to format text in a special monospace format. Everything within the backticks appear as-is, with no other special formatting. + +```md +Here's an idea: why don't we take `SuperiorProject` and turn it into `**Reasonable**Project`. +``` + +```html +

Here's an idea: why don't we take SuperiorProject and turn it into **Reasonable**Project.

+``` + +### Multiple lines + +To create blocks of code you should indent it by four spaces. + +```md + this is a piece + of + code +``` + +If the options **`ghCodeBlocks`** is activated (which is by default), you can use triple backticks (```) to format text as its own distinct block. + + Check out this neat program I wrote: + + ``` + x = 0 + x = 2 + 2 + what is x + ``` + +## Lists + +Showdown supports ordered (numbered) and unordered (bulleted) lists. + +### Unordered lists + +You can make an unordered list by preceding list items with either a *, a - or a +. Markers are interchangeable too. + +```md +* Item ++ Item +- Item +``` + +### Ordered lists + +You can make an ordered list by preceding list items with a number. + +```md +1. Item 1 +2. Item 2 +3. Item 3 +``` + +It’s important to note that the actual numbers you use to mark the list have no effect on the HTML output Showdown produces. So you can use the same number in all items if you wish to. + +### TaskLists (GFM Style) + +Showdown also supports GFM styled takslists if the **`tasklists`** option is enabled. + +```md + - [x] checked list item + - [ ] unchecked list item +``` + + - [x] checked list item + - [ ] unchecked list item + +### List syntax + +List markers typically start at the left margin, but may be indented by up to three spaces. + +```md + * this is valid + * this is too +``` + +List markers must be followed by one or more spaces or a tab. + +To make lists look nice, you can wrap items with hanging indents: + +```md +* Lorem ipsum dolor sit amet, consectetuer adipiscing elit. + Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi, + viverra nec, fringilla in, laoreet vitae, risus. +* Donec sit amet nisl. Aliquam semper ipsum sit amet velit. + Suspendisse id sem consectetuer libero luctus adipiscing. +``` + +But if you want to be lazy, you don’t have to + +If one list item is separated by a blank line, Showdown will wrap all the list items in `

` tags in the HTML output. +So this input: + +```md +* Bird + +* Magic +* Johnson +``` + +Results in: + +```html +

+``` + +This differs from other markdown implementations such as GFM (github) or commonmark. + +### Nested blocks + +List items may consist of multiple paragraphs. Each subsequent paragraph in a list item must be indented by either 4 spaces or one tab: + +```md +1. This is a list item with two paragraphs. Lorem ipsum dolor + sit amet, consectetuer adipiscing elit. Aliquam hendrerit + mi posuere lectus. + + Vestibulum enim wisi, viverra nec, fringilla in, laoreet + vitae, risus. Donec sit amet nisl. Aliquam semper ipsum + sit amet velit. + +2. Suspendisse id sem consectetuer libero luctus adipiscing. +``` + +This is valid for other block elements such as blockquotes: + +```md +* A list item with a blockquote: + + > This is a blockquote + > inside a list item. +``` + +or event other lists. + +### Nested lists + +You can create nested lists by indenting list items by **four** spaces. + +```md +1. Item 1 + 1. A corollary to the above item. + 2. Yet another point to consider. +2. Item 2 + * A corollary that does not need to be ordered. + * This is indented four spaces + * You might want to consider making a new list. +3. Item 3 +``` + +This behavior is consistent with the original spec but differs from other implementations suck as GFM or commonmark. Prior to version 1.5, you just needed to indent two spaces for it to be considered a sublist. +You can disable the **four spaces requirement** with option **`disableForced4SpacesIndentedSublists`** + +To nest a third (or more) sublist level, you need to indent 4 extra spaces (or 1 extra tab) for each level. + +```md +1. level 1 + 1. Level 2 + * Level 3 + 2. level 2 + 1. Level 3 +1. Level 1 +``` + +### Nested code blocks + +You can nest fenced codeblocks the same way you nest other block elements, by indenting by fours spaces or a tab: + +```md +1. Some code: + + ```js + var foo = 'bar'; + console.log(foo); + ``` +``` + +To put a *indented style* code block within a list item, the code block needs to be indented twice — 8 spaces or two tabs: + +```md +1. Some code: + + var foo = 'bar'; + console.log(foo); +``` + +## Links + +### Simple + +If you wrap a valid URL or email in `<>` it will be turned into a link whose text is the link itself. + +```md +link to + +this is my email +``` + +In the case of email addreses, Showdown will also perform a bit of randomized decimal and hex entity-encoding to help obscure your address from address-harvesting spambots. +You can disable this obfuscation setting **`encodeEmails`** option to `false`. + +With the option **`simplifiedAutoLink`** enabled, Showdown will automagically turn every valid URL it finds in the text body to links for you, without the need to wrap them in `<>`. + +```md +link to http://www.google.com/ + +this is my email somedude@mail.com +``` + +### Inline + +You can create an inline link by wrapping link text in brackets ( `[ ]` ), and then wrapping the link in parentheses ( `( )` ). + +For example, to create a hyperlink to github.com/showdownjs/showdown, with a link text that says, Get Showdown!, you'd write this in Markdown: `[Get Showdown!](https://github.com/showdownjs/showdown)`. + +### Reference Style + +You can also use the reference style, like this: + +```md +this is a [link to google][1] + +[1]: www.google.com +``` + +Showdown also supports implicit link references: + +```md +this is a link to [google][] + +[google]: www.google.com +``` + +## Images + +Markdown uses an image syntax that is intended to resemble the syntax for links, also allowing for two styles: inline and reference. + +### Inline + +Inline image syntax looks like this: + +```md +![Alt text](url/to/image) + +![Alt text](url/to/image "Optional title") +``` + +That is: + + + An exclamation mark: !; + + followed by a set of square brackets, containing the alt attribute text for the image; + + followed by a set of parentheses, containing the URL or path to the image, and an optional title attribute enclosed in double or single quotes. + + +### Reference Style + +Reference-style image syntax looks like this: + +```md +![Alt text][id] +``` + +Where “id” is the name of a defined image reference. Image references are defined using syntax identical to link references: + +```md +[id]: url/to/image "Optional title attribute" +``` + +Implicit references are also supported in images, similar to what happens with links: + +```md +![showdown logo][] + +[showdown logo]: http://showdownjs.github.io/demo/img/editor.logo.white.png +``` + +### Image dimensions + +When the option **`parseImgDimension`** is activated, you can also define the image dimensions, like this: + +```md +![Alt text](url/to/image =250x250 "Optional title") +``` + +or in reference style: + +```md +![Alt text][id] + +[id]: url/to/image =250x250 +``` + +### Base64 encoded images + +Showdown also supports Base64 encoded images, both reference and inline style. +**Since version 1.7.4**, wrapping base64 strings, which are usually extremely long lines of text, is supported. +You can add newlines arbitrarily, as long as they are added after the `,` character. + +**inline style** +```md +![Alt text](data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAIAAAA7l +jmRAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAY +SURBVBhXYwCC/2AAZYEoOAMs8Z+BgQEAXdcR7/Q1gssAAAAASUVORK5CYII=) +``` + +**reference style** +```md +![Alt text][id] + +[id]: +data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAIAAAA7l +jmRAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7D +AcdvqGQAAAAYSURBVBhXYwCC/2AAZYEoOAMs8Z+BgQEAXdcR7/Q1gssAAAAASUVORK5CYII= +``` + +Please note that with reference style base64 image sources, regardless of "wrapping", a double newline is needed after the base64 string to separate them from a paragraph or other text block (but references can be adjacent). + +**wrapped reference style** +```md +![Alt text][id] +![Alt text][id2] + +[id]: +data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAIAAAA7l +jmRAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7D +AcdvqGQAAAAYSURBVBhXYwCC/2AAZYEoOAMs8Z+BgQEAXdcR7/Q1gssAAAAASUVORK5CYII= +[id2]: +data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAIAAAA7l +jmRAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7D +AcdvqGQAAAAYSURBVBhXYwCC/2AAZYEoOAMs8Z+BgQEAXdcR7/Q1gssAAAAASUVORK5CYII= + +this text needs to be separated from the references by 2 newlines +``` + + +## Tables + +Tables aren't part of the core Markdown spec, but they are part of GFM and Showdown supports them by turning on the option `tables`. + +Colons can be used to align columns. + +In the new version, the outer pipes (`|`) are optional, matching GFM spec. + +You also don't need to make the raw Markdown line up prettily. + +You can also use other markdown syntax inside them. + +```md +| Tables | Are | Cool | +| ------------- |:-------------:| -----:| +| **col 3 is** | right-aligned | $1600 | +| col 2 is | *centered* | $12 | +| zebra stripes | ~~are neat~~ | $1 | +``` + +| Tables | Are | Cool | +| ------------- |:-------------:| -----:| +| **col 3 is** | right-aligned | $1600 | +| col 2 is | *centered* | $12 | +| zebra stripes | ~~are neat~~ | $1 | + +## Mentions + +Showdown supports github mentions by enabling the option **`ghMentions`**. This will turn every `@username` into a link to their github profile. + +```md +hey @tivie, check this out +``` + +Since version 1.6.2 you can customize the generated link in mentions with the option **`ghMentionsLink`**. +For instance, setting this option to `http://mysite.com/{u}/profile`: + +```html +

hey @tivie, check this out

+``` + +## Handling HTML in markdown documents + +Showdown, in most cases, leaves HTML tags alone, leaving them untouched in the output document. + +```md +some markdown **here** +
this is *not* **parsed**
+``` + +```html +

some markdown here

+
this is *not* **parsed**
+``` + +However, there are exceptions to this. With `` and `
` tags, their contents are always escaped.
+
+```md
+some markdown **here** with foo & bar 
+```
+
+ ```html
+

some markdown here with foo & bar <baz></baz>

+``` + +If you wish to enable markdown parsing inside a specific HTML tag, you can enable it by using the html attribute **`markdown`** or **`markdown="1"`** or **`data-markdown="1"`**. + +```md +some markdown **here** +
this is *not* **parsed**
+``` + +```html +

some markdown here

+

this is not parsed

+``` + +## Escaping entities + +### Escaping markdown entities + +Showdown allows you to use backslash (`\`) escapes to generate literal characters which would otherwise have special meaning in markdown’s syntax. For example, if you wanted to surround a word with literal underscores (instead of an HTML `` tag), you can use backslashes before the unserscores, like this: + +```md +\_literal underscores\_ +``` + +Showdown provides backslash escapes for the following characters: + +``` +\ backslash +` backtick +* asterisk +_ underscore +{} curly braces +[] square brackets +() parentheses +# hash mark ++ plus sign +- minus sign (hyphen) +. dot +! exclamation mark +``` + +### Escaping HTML tags + +Since [version 1.7.2](https://github.com/showdownjs/showdown/tree/1.7.2) backslash escaping HTML tags is supported when `backslashEscapesHTMLTags` option is enabled. + +```md +\
a literal div\
+``` + +## Known differences and Gotchas + +In most cases, Showdown's output is identical to that of Perl Markdown v1.0.2b7. What follows is a list of all known deviations. Please file an issue if you find more. + +* **Since version 1.4.0, showdown supports the markdown="1" attribute**, but for older versions, this attribute is ignored. This means: + +
+ Markdown does *not* work in here. +
+ + +* You can only nest square brackets in link titles to a depth of two levels: + + [[fine]](http://www.github.com/) + [[[broken]]](http://www.github.com/) + + If you need more, you can escape them with backslashes. + + +* A list is **single paragraph** if it has only **1 line-break separating items** and it becomes **multi paragraph if ANY of its items is separated by 2 line-breaks**: + + ```md + - foo + + - bar + - baz + ``` + becomes + + ```html +
    +
  • foo

  • +
  • bar

  • +
  • baz

  • +
+ ``` + +This new ruleset is based on the comments of Markdown's author John Gruber in the [Markdown discussion list][md-newsletter]. + +[md-spec]: http://daringfireball.net/projects/markdown/ +[md-newsletter]: https://pairlist6.pair.net/mailman/listinfo/markdown-discuss +[atx]: http://www.aaronsw.com/2002/atx/intro +[setext]: https://en.wikipedia.org/wiki/Setext +[readme]: https://github.com/showdownjs/showdown/blob/master/README.md +[awkward effect]: http://i.imgur.com/YQ9iHTL.gif +[emoji list]: https://github.com/showdownjs/showdown/wiki/emojis \ No newline at end of file diff --git a/presets/markdown/skeleton.markdown b/presets/markdown/skeleton.markdown new file mode 100644 index 00000000..7096de8a --- /dev/null +++ b/presets/markdown/skeleton.markdown @@ -0,0 +1,4 @@ + +### Heading + +(see [Showdown syntax](https://github.com/showdownjs/showdown/wiki/Showdown%27s-Markdown-syntax)) diff --git a/src/platform/markdown.ts b/src/platform/markdown.ts new file mode 100644 index 00000000..a6e2c553 --- /dev/null +++ b/src/platform/markdown.ts @@ -0,0 +1,43 @@ +"use strict"; + +import { PLATFORMS } from "../emu"; +import { Platform } from "../baseplatform"; + +class MarkdownPlatform implements Platform { + mainElement; + htmlDiv; + + constructor(mainElement:HTMLElement) { + this.mainElement = mainElement; + this.htmlDiv = $('
').appendTo(mainElement); + $(mainElement).css('overflowY', 'auto'); + } + start() { + } + reset() { + } + pause() { + } + resume() { + } + loadROM(title, data) { + this.htmlDiv.html(data); + } + isRunning() { + return false; + } + getToolForFilename(fn : string) : string { + return "markdown"; + } + getDefaultExtension() : string { + return ".md"; + } + getPresets() { + return [ + {id:'hello.md', name:'Hello'}, + ]; + } + +} + +PLATFORMS['markdown'] = MarkdownPlatform; diff --git a/src/ui.ts b/src/ui.ts index 5c3b05e5..74b49dea 100644 --- a/src/ui.ts +++ b/src/ui.ts @@ -48,6 +48,7 @@ var TOOL_TO_SOURCE_STYLE = { 'jsasm': 'z80', 'zmac': 'z80', 'bataribasic': 'bataribasic', + 'markdown': 'markdown', } function newWorker() : Worker { diff --git a/src/views.ts b/src/views.ts index 5e5c635c..27fd1808 100644 --- a/src/views.ts +++ b/src/views.ts @@ -71,12 +71,14 @@ export class SourceEditor implements ProjectView { newEditor(parent:HTMLElement) { var isAsm = this.mode=='6502' || this.mode =='z80' || this.mode=='verilog' || this.mode=='gas'; // TODO + var lineWrap = this.mode=='markdown'; this.editor = CodeMirror(parent, { theme: 'mbo', lineNumbers: true, matchBrackets: true, tabSize: 8, indentAuto: true, + lineWrapping: lineWrap, gutters: isAsm ? ["CodeMirror-linenumbers", "gutter-offset", "gutter-bytes", "gutter-clock", "gutter-info"] : ["CodeMirror-linenumbers", "gutter-offset", "gutter-info"], }); diff --git a/src/worker/asmjs/showdown.min.js b/src/worker/asmjs/showdown.min.js new file mode 100644 index 00000000..a298817d --- /dev/null +++ b/src/worker/asmjs/showdown.min.js @@ -0,0 +1,3 @@ +/*! showdown v 2.0.0-alpha1 - 24-10-2018 */ +(function(){function a(e){"use strict";var r={omitExtraWLInCodeBlocks:{defaultValue:!1,describe:"Omit the default extra whiteline added to code blocks",type:"boolean"},noHeaderId:{defaultValue:!1,describe:"Turn on/off generated header id",type:"boolean"},prefixHeaderId:{defaultValue:!1,describe:"Add a prefix to the generated header ids. Passing a string will prefix that string to the header id. Setting to true will add a generic 'section-' prefix",type:"string"},rawPrefixHeaderId:{defaultValue:!1,describe:'Setting this option to true will prevent showdown from modifying the prefix. This might result in malformed IDs (if, for instance, the " char is used in the prefix)',type:"boolean"},ghCompatibleHeaderId:{defaultValue:!1,describe:"Generate header ids compatible with github style (spaces are replaced with dashes, a bunch of non alphanumeric chars are removed)",type:"boolean"},rawHeaderId:{defaultValue:!1,describe:"Remove only spaces, ' and \" from generated header ids (including prefixes), replacing them with dashes (-). WARNING: This might result in malformed ids",type:"boolean"},headerLevelStart:{defaultValue:!1,describe:"The header blocks level start",type:"integer"},parseImgDimensions:{defaultValue:!1,describe:"Turn on/off image dimension parsing",type:"boolean"},simplifiedAutoLink:{defaultValue:!1,describe:"Turn on/off GFM autolink style",type:"boolean"},literalMidWordUnderscores:{defaultValue:!1,describe:"Parse midword underscores as literal underscores",type:"boolean"},literalMidWordAsterisks:{defaultValue:!1,describe:"Parse midword asterisks as literal asterisks",type:"boolean"},strikethrough:{defaultValue:!1,describe:"Turn on/off strikethrough support",type:"boolean"},tables:{defaultValue:!1,describe:"Turn on/off tables support",type:"boolean"},tablesHeaderId:{defaultValue:!1,describe:"Add an id to table headers",type:"boolean"},ghCodeBlocks:{defaultValue:!0,describe:"Turn on/off GFM fenced code blocks support",type:"boolean"},tasklists:{defaultValue:!1,describe:"Turn on/off GFM tasklist support",type:"boolean"},smoothLivePreview:{defaultValue:!1,describe:"Prevents weird effects in live previews due to incomplete input",type:"boolean"},smartIndentationFix:{defaultValue:!1,description:"Tries to smartly fix indentation in es6 strings",type:"boolean"},disableForced4SpacesIndentedSublists:{defaultValue:!1,description:"Disables the requirement of indenting nested sublists by 4 spaces",type:"boolean"},simpleLineBreaks:{defaultValue:!1,description:"Parses simple line breaks as
(GFM Style)",type:"boolean"},requireSpaceBeforeHeadingText:{defaultValue:!1,description:"Makes adding a space between `#` and the header text mandatory (GFM Style)",type:"boolean"},ghMentions:{defaultValue:!1,description:"Enables github @mentions",type:"boolean"},ghMentionsLink:{defaultValue:"https://github.com/{u}",description:"Changes the link generated by @mentions. Only applies if ghMentions option is enabled.",type:"string"},encodeEmails:{defaultValue:!0,description:"Encode e-mail addresses through the use of Character Entities, transforming ASCII e-mail addresses into its equivalent decimal entities",type:"boolean"},openLinksInNewWindow:{defaultValue:!1,description:"Open all links in new windows",type:"boolean"},backslashEscapesHTMLTags:{defaultValue:!1,description:"Support for HTML Tag escaping. ex:
foo
",type:"boolean"},emoji:{defaultValue:!1,description:"Enable emoji support. Ex: `this is a :smile: emoji`",type:"boolean"},underline:{defaultValue:!1,description:"Enable support for underline. Syntax is double or triple underscores: `__underline word__`. With this option enabled, underscores no longer parses into `` and ``",type:"boolean"},completeHTMLDocument:{defaultValue:!1,description:"Outputs a complete html document, including ``, `` and `` tags",type:"boolean"},metadata:{defaultValue:!1,description:"Enable support for document metadata (defined at the top of the document between `«««` and `»»»` or between `---` and `---`).",type:"boolean"},splitAdjacentBlockquotes:{defaultValue:!1,description:"Split adjacent blockquote blocks",type:"boolean"}};if(!1===e)return JSON.parse(JSON.stringify(r));var t={};for(var a in r)r.hasOwnProperty(a)&&(t[a]=r[a].defaultValue);return t}var b={},t={},h={},m=a(!0),d="vanilla",p={github:{omitExtraWLInCodeBlocks:!0,simplifiedAutoLink:!0,literalMidWordUnderscores:!0,strikethrough:!0,tables:!0,tablesHeaderId:!0,ghCodeBlocks:!0,tasklists:!0,disableForced4SpacesIndentedSublists:!0,simpleLineBreaks:!0,requireSpaceBeforeHeadingText:!0,ghCompatibleHeaderId:!0,ghMentions:!0,backslashEscapesHTMLTags:!0,emoji:!0,splitAdjacentBlockquotes:!0},original:{noHeaderId:!0,ghCodeBlocks:!1},ghost:{omitExtraWLInCodeBlocks:!0,parseImgDimensions:!0,simplifiedAutoLink:!0,literalMidWordUnderscores:!0,strikethrough:!0,tables:!0,tablesHeaderId:!0,ghCodeBlocks:!0,tasklists:!0,smoothLivePreview:!0,simpleLineBreaks:!0,requireSpaceBeforeHeadingText:!0,ghMentions:!1,encodeEmails:!0},vanilla:a(!0),allOn:function(){"use strict";var e=a(!0),r={};for(var t in e)e.hasOwnProperty(t)&&(r[t]=!0);return r}()};function g(e,r){"use strict";var t=r?"Error in "+r+" extension->":"Error in unnamed extension",a={valid:!0,error:""};b.helper.isArray(e)||(e=[e]);for(var n=0;n>=0,t=String(t||" "),e.length>r?String(e):((r-=e.length)>t.length&&(t+=t.repeat(r/t.length)),String(e)+t.slice(0,r))},b.helper.unescapeHTMLEntities=function(e){"use strict";return e.replace(/"/g,'"').replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&")},b.helper._hashHTMLSpan=function(e,r){return"¨C"+(r.gHtmlSpans.push(e)-1)+"C"},b.helper.Event=function(e,r,t){"use strict";var a=t.regexp||null,n=t.matches||{},s=t.options||{},o=t.converter||null,i=t.globals||{};this.getName=function(){return e},this.getEventName=function(){return e},this._stopExecution=!1,this.parsedText=t.parsedText||null,this.getRegexp=function(){return a},this.getOptions=function(){return s},this.getConverter=function(){return o},this.getGlobals=function(){return i},this.getCapturedText=function(){return r},this.getText=function(){return r},this.setText=function(e){r=e},this.getMatches=function(){return n},this.setMatches=function(e){n=e},this.preventDefault=function(e){this._stopExecution=!e}},"undefined"==typeof console&&(console={warn:function(e){"use strict";alert(e)},log:function(e){"use strict";alert(e)},error:function(e){"use strict";throw e}}),b.helper.regexes={asteriskDashTildeAndColon:/([*_:~])/g,asteriskDashAndTilde:/([*_~])/g},b.helper.emojis={"+1":"👍","-1":"👎",100:"💯",1234:"🔢","1st_place_medal":"🥇","2nd_place_medal":"🥈","3rd_place_medal":"🥉","8ball":"🎱",a:"🅰️",ab:"🆎",abc:"🔤",abcd:"🔡",accept:"🉑",aerial_tramway:"🚡",airplane:"✈️",alarm_clock:"⏰",alembic:"⚗️",alien:"👽",ambulance:"🚑",amphora:"🏺",anchor:"⚓️",angel:"👼",anger:"💢",angry:"😠",anguished:"😧",ant:"🐜",apple:"🍎",aquarius:"♒️",aries:"♈️",arrow_backward:"◀️",arrow_double_down:"⏬",arrow_double_up:"⏫",arrow_down:"⬇️",arrow_down_small:"🔽",arrow_forward:"▶️",arrow_heading_down:"⤵️",arrow_heading_up:"⤴️",arrow_left:"⬅️",arrow_lower_left:"↙️",arrow_lower_right:"↘️",arrow_right:"➡️",arrow_right_hook:"↪️",arrow_up:"⬆️",arrow_up_down:"↕️",arrow_up_small:"🔼",arrow_upper_left:"↖️",arrow_upper_right:"↗️",arrows_clockwise:"🔃",arrows_counterclockwise:"🔄",art:"🎨",articulated_lorry:"🚛",artificial_satellite:"🛰",astonished:"😲",athletic_shoe:"👟",atm:"🏧",atom_symbol:"⚛️",avocado:"🥑",b:"🅱️",baby:"👶",baby_bottle:"🍼",baby_chick:"🐤",baby_symbol:"🚼",back:"🔙",bacon:"🥓",badminton:"🏸",baggage_claim:"🛄",baguette_bread:"🥖",balance_scale:"⚖️",balloon:"🎈",ballot_box:"🗳",ballot_box_with_check:"☑️",bamboo:"🎍",banana:"🍌",bangbang:"‼️",bank:"🏦",bar_chart:"📊",barber:"💈",baseball:"⚾️",basketball:"🏀",basketball_man:"⛹️",basketball_woman:"⛹️‍♀️",bat:"🦇",bath:"🛀",bathtub:"🛁",battery:"🔋",beach_umbrella:"🏖",bear:"🐻",bed:"🛏",bee:"🐝",beer:"🍺",beers:"🍻",beetle:"🐞",beginner:"🔰",bell:"🔔",bellhop_bell:"🛎",bento:"🍱",biking_man:"🚴",bike:"🚲",biking_woman:"🚴‍♀️",bikini:"👙",biohazard:"☣️",bird:"🐦",birthday:"🎂",black_circle:"⚫️",black_flag:"🏴",black_heart:"🖤",black_joker:"🃏",black_large_square:"⬛️",black_medium_small_square:"◾️",black_medium_square:"◼️",black_nib:"✒️",black_small_square:"▪️",black_square_button:"🔲",blonde_man:"👱",blonde_woman:"👱‍♀️",blossom:"🌼",blowfish:"🐡",blue_book:"📘",blue_car:"🚙",blue_heart:"💙",blush:"😊",boar:"🐗",boat:"⛵️",bomb:"💣",book:"📖",bookmark:"🔖",bookmark_tabs:"📑",books:"📚",boom:"💥",boot:"👢",bouquet:"💐",bowing_man:"🙇",bow_and_arrow:"🏹",bowing_woman:"🙇‍♀️",bowling:"🎳",boxing_glove:"🥊",boy:"👦",bread:"🍞",bride_with_veil:"👰",bridge_at_night:"🌉",briefcase:"💼",broken_heart:"💔",bug:"🐛",building_construction:"🏗",bulb:"💡",bullettrain_front:"🚅",bullettrain_side:"🚄",burrito:"🌯",bus:"🚌",business_suit_levitating:"🕴",busstop:"🚏",bust_in_silhouette:"👤",busts_in_silhouette:"👥",butterfly:"🦋",cactus:"🌵",cake:"🍰",calendar:"📆",call_me_hand:"🤙",calling:"📲",camel:"🐫",camera:"📷",camera_flash:"📸",camping:"🏕",cancer:"♋️",candle:"🕯",candy:"🍬",canoe:"🛶",capital_abcd:"🔠",capricorn:"♑️",car:"🚗",card_file_box:"🗃",card_index:"📇",card_index_dividers:"🗂",carousel_horse:"🎠",carrot:"🥕",cat:"🐱",cat2:"🐈",cd:"💿",chains:"⛓",champagne:"🍾",chart:"💹",chart_with_downwards_trend:"📉",chart_with_upwards_trend:"📈",checkered_flag:"🏁",cheese:"🧀",cherries:"🍒",cherry_blossom:"🌸",chestnut:"🌰",chicken:"🐔",children_crossing:"🚸",chipmunk:"🐿",chocolate_bar:"🍫",christmas_tree:"🎄",church:"⛪️",cinema:"🎦",circus_tent:"🎪",city_sunrise:"🌇",city_sunset:"🌆",cityscape:"🏙",cl:"🆑",clamp:"🗜",clap:"👏",clapper:"🎬",classical_building:"🏛",clinking_glasses:"🥂",clipboard:"📋",clock1:"🕐",clock10:"🕙",clock1030:"🕥",clock11:"🕚",clock1130:"🕦",clock12:"🕛",clock1230:"🕧",clock130:"🕜",clock2:"🕑",clock230:"🕝",clock3:"🕒",clock330:"🕞",clock4:"🕓",clock430:"🕟",clock5:"🕔",clock530:"🕠",clock6:"🕕",clock630:"🕡",clock7:"🕖",clock730:"🕢",clock8:"🕗",clock830:"🕣",clock9:"🕘",clock930:"🕤",closed_book:"📕",closed_lock_with_key:"🔐",closed_umbrella:"🌂",cloud:"☁️",cloud_with_lightning:"🌩",cloud_with_lightning_and_rain:"⛈",cloud_with_rain:"🌧",cloud_with_snow:"🌨",clown_face:"🤡",clubs:"♣️",cocktail:"🍸",coffee:"☕️",coffin:"⚰️",cold_sweat:"😰",comet:"☄️",computer:"💻",computer_mouse:"🖱",confetti_ball:"🎊",confounded:"😖",confused:"😕",congratulations:"㊗️",construction:"🚧",construction_worker_man:"👷",construction_worker_woman:"👷‍♀️",control_knobs:"🎛",convenience_store:"🏪",cookie:"🍪",cool:"🆒",policeman:"👮",copyright:"©️",corn:"🌽",couch_and_lamp:"🛋",couple:"👫",couple_with_heart_woman_man:"💑",couple_with_heart_man_man:"👨‍❤️‍👨",couple_with_heart_woman_woman:"👩‍❤️‍👩",couplekiss_man_man:"👨‍❤️‍💋‍👨",couplekiss_man_woman:"💏",couplekiss_woman_woman:"👩‍❤️‍💋‍👩",cow:"🐮",cow2:"🐄",cowboy_hat_face:"🤠",crab:"🦀",crayon:"🖍",credit_card:"💳",crescent_moon:"🌙",cricket:"🏏",crocodile:"🐊",croissant:"🥐",crossed_fingers:"🤞",crossed_flags:"🎌",crossed_swords:"⚔️",crown:"👑",cry:"😢",crying_cat_face:"😿",crystal_ball:"🔮",cucumber:"🥒",cupid:"💘",curly_loop:"➰",currency_exchange:"💱",curry:"🍛",custard:"🍮",customs:"🛃",cyclone:"🌀",dagger:"🗡",dancer:"💃",dancing_women:"👯",dancing_men:"👯‍♂️",dango:"🍡",dark_sunglasses:"🕶",dart:"🎯",dash:"💨",date:"📅",deciduous_tree:"🌳",deer:"🦌",department_store:"🏬",derelict_house:"🏚",desert:"🏜",desert_island:"🏝",desktop_computer:"🖥",male_detective:"🕵️",diamond_shape_with_a_dot_inside:"💠",diamonds:"♦️",disappointed:"😞",disappointed_relieved:"😥",dizzy:"💫",dizzy_face:"😵",do_not_litter:"🚯",dog:"🐶",dog2:"🐕",dollar:"💵",dolls:"🎎",dolphin:"🐬",door:"🚪",doughnut:"🍩",dove:"🕊",dragon:"🐉",dragon_face:"🐲",dress:"👗",dromedary_camel:"🐪",drooling_face:"🤤",droplet:"💧",drum:"🥁",duck:"🦆",dvd:"📀","e-mail":"📧",eagle:"🦅",ear:"👂",ear_of_rice:"🌾",earth_africa:"🌍",earth_americas:"🌎",earth_asia:"🌏",egg:"🥚",eggplant:"🍆",eight_pointed_black_star:"✴️",eight_spoked_asterisk:"✳️",electric_plug:"🔌",elephant:"🐘",email:"✉️",end:"🔚",envelope_with_arrow:"📩",euro:"💶",european_castle:"🏰",european_post_office:"🏤",evergreen_tree:"🌲",exclamation:"❗️",expressionless:"😑",eye:"👁",eye_speech_bubble:"👁‍🗨",eyeglasses:"👓",eyes:"👀",face_with_head_bandage:"🤕",face_with_thermometer:"🤒",fist_oncoming:"👊",factory:"🏭",fallen_leaf:"🍂",family_man_woman_boy:"👪",family_man_boy:"👨‍👦",family_man_boy_boy:"👨‍👦‍👦",family_man_girl:"👨‍👧",family_man_girl_boy:"👨‍👧‍👦",family_man_girl_girl:"👨‍👧‍👧",family_man_man_boy:"👨‍👨‍👦",family_man_man_boy_boy:"👨‍👨‍👦‍👦",family_man_man_girl:"👨‍👨‍👧",family_man_man_girl_boy:"👨‍👨‍👧‍👦",family_man_man_girl_girl:"👨‍👨‍👧‍👧",family_man_woman_boy_boy:"👨‍👩‍👦‍👦",family_man_woman_girl:"👨‍👩‍👧",family_man_woman_girl_boy:"👨‍👩‍👧‍👦",family_man_woman_girl_girl:"👨‍👩‍👧‍👧",family_woman_boy:"👩‍👦",family_woman_boy_boy:"👩‍👦‍👦",family_woman_girl:"👩‍👧",family_woman_girl_boy:"👩‍👧‍👦",family_woman_girl_girl:"👩‍👧‍👧",family_woman_woman_boy:"👩‍👩‍👦",family_woman_woman_boy_boy:"👩‍👩‍👦‍👦",family_woman_woman_girl:"👩‍👩‍👧",family_woman_woman_girl_boy:"👩‍👩‍👧‍👦",family_woman_woman_girl_girl:"👩‍👩‍👧‍👧",fast_forward:"⏩",fax:"📠",fearful:"😨",feet:"🐾",female_detective:"🕵️‍♀️",ferris_wheel:"🎡",ferry:"⛴",field_hockey:"🏑",file_cabinet:"🗄",file_folder:"📁",film_projector:"📽",film_strip:"🎞",fire:"🔥",fire_engine:"🚒",fireworks:"🎆",first_quarter_moon:"🌓",first_quarter_moon_with_face:"🌛",fish:"🐟",fish_cake:"🍥",fishing_pole_and_fish:"🎣",fist_raised:"✊",fist_left:"🤛",fist_right:"🤜",flags:"🎏",flashlight:"🔦",fleur_de_lis:"⚜️",flight_arrival:"🛬",flight_departure:"🛫",floppy_disk:"💾",flower_playing_cards:"🎴",flushed:"😳",fog:"🌫",foggy:"🌁",football:"🏈",footprints:"👣",fork_and_knife:"🍴",fountain:"⛲️",fountain_pen:"🖋",four_leaf_clover:"🍀",fox_face:"🦊",framed_picture:"🖼",free:"🆓",fried_egg:"🍳",fried_shrimp:"🍤",fries:"🍟",frog:"🐸",frowning:"😦",frowning_face:"☹️",frowning_man:"🙍‍♂️",frowning_woman:"🙍",middle_finger:"🖕",fuelpump:"⛽️",full_moon:"🌕",full_moon_with_face:"🌝",funeral_urn:"⚱️",game_die:"🎲",gear:"⚙️",gem:"💎",gemini:"♊️",ghost:"👻",gift:"🎁",gift_heart:"💝",girl:"👧",globe_with_meridians:"🌐",goal_net:"🥅",goat:"🐐",golf:"⛳️",golfing_man:"🏌️",golfing_woman:"🏌️‍♀️",gorilla:"🦍",grapes:"🍇",green_apple:"🍏",green_book:"📗",green_heart:"💚",green_salad:"🥗",grey_exclamation:"❕",grey_question:"❔",grimacing:"😬",grin:"😁",grinning:"😀",guardsman:"💂",guardswoman:"💂‍♀️",guitar:"🎸",gun:"🔫",haircut_woman:"💇",haircut_man:"💇‍♂️",hamburger:"🍔",hammer:"🔨",hammer_and_pick:"⚒",hammer_and_wrench:"🛠",hamster:"🐹",hand:"✋",handbag:"👜",handshake:"🤝",hankey:"💩",hatched_chick:"🐥",hatching_chick:"🐣",headphones:"🎧",hear_no_evil:"🙉",heart:"❤️",heart_decoration:"💟",heart_eyes:"😍",heart_eyes_cat:"😻",heartbeat:"💓",heartpulse:"💗",hearts:"♥️",heavy_check_mark:"✔️",heavy_division_sign:"➗",heavy_dollar_sign:"💲",heavy_heart_exclamation:"❣️",heavy_minus_sign:"➖",heavy_multiplication_x:"✖️",heavy_plus_sign:"➕",helicopter:"🚁",herb:"🌿",hibiscus:"🌺",high_brightness:"🔆",high_heel:"👠",hocho:"🔪",hole:"🕳",honey_pot:"🍯",horse:"🐴",horse_racing:"🏇",hospital:"🏥",hot_pepper:"🌶",hotdog:"🌭",hotel:"🏨",hotsprings:"♨️",hourglass:"⌛️",hourglass_flowing_sand:"⏳",house:"🏠",house_with_garden:"🏡",houses:"🏘",hugs:"🤗",hushed:"😯",ice_cream:"🍨",ice_hockey:"🏒",ice_skate:"⛸",icecream:"🍦",id:"🆔",ideograph_advantage:"🉐",imp:"👿",inbox_tray:"📥",incoming_envelope:"📨",tipping_hand_woman:"💁",information_source:"ℹ️",innocent:"😇",interrobang:"⁉️",iphone:"📱",izakaya_lantern:"🏮",jack_o_lantern:"🎃",japan:"🗾",japanese_castle:"🏯",japanese_goblin:"👺",japanese_ogre:"👹",jeans:"👖",joy:"😂",joy_cat:"😹",joystick:"🕹",kaaba:"🕋",key:"🔑",keyboard:"⌨️",keycap_ten:"🔟",kick_scooter:"🛴",kimono:"👘",kiss:"💋",kissing:"😗",kissing_cat:"😽",kissing_closed_eyes:"😚",kissing_heart:"😘",kissing_smiling_eyes:"😙",kiwi_fruit:"🥝",koala:"🐨",koko:"🈁",label:"🏷",large_blue_circle:"🔵",large_blue_diamond:"🔷",large_orange_diamond:"🔶",last_quarter_moon:"🌗",last_quarter_moon_with_face:"🌜",latin_cross:"✝️",laughing:"😆",leaves:"🍃",ledger:"📒",left_luggage:"🛅",left_right_arrow:"↔️",leftwards_arrow_with_hook:"↩️",lemon:"🍋",leo:"♌️",leopard:"🐆",level_slider:"🎚",libra:"♎️",light_rail:"🚈",link:"🔗",lion:"🦁",lips:"👄",lipstick:"💄",lizard:"🦎",lock:"🔒",lock_with_ink_pen:"🔏",lollipop:"🍭",loop:"➿",loud_sound:"🔊",loudspeaker:"📢",love_hotel:"🏩",love_letter:"💌",low_brightness:"🔅",lying_face:"🤥",m:"Ⓜ️",mag:"🔍",mag_right:"🔎",mahjong:"🀄️",mailbox:"📫",mailbox_closed:"📪",mailbox_with_mail:"📬",mailbox_with_no_mail:"📭",man:"👨",man_artist:"👨‍🎨",man_astronaut:"👨‍🚀",man_cartwheeling:"🤸‍♂️",man_cook:"👨‍🍳",man_dancing:"🕺",man_facepalming:"🤦‍♂️",man_factory_worker:"👨‍🏭",man_farmer:"👨‍🌾",man_firefighter:"👨‍🚒",man_health_worker:"👨‍⚕️",man_in_tuxedo:"🤵",man_judge:"👨‍⚖️",man_juggling:"🤹‍♂️",man_mechanic:"👨‍🔧",man_office_worker:"👨‍💼",man_pilot:"👨‍✈️",man_playing_handball:"🤾‍♂️",man_playing_water_polo:"🤽‍♂️",man_scientist:"👨‍🔬",man_shrugging:"🤷‍♂️",man_singer:"👨‍🎤",man_student:"👨‍🎓",man_teacher:"👨‍🏫",man_technologist:"👨‍💻",man_with_gua_pi_mao:"👲",man_with_turban:"👳",tangerine:"🍊",mans_shoe:"👞",mantelpiece_clock:"🕰",maple_leaf:"🍁",martial_arts_uniform:"🥋",mask:"😷",massage_woman:"💆",massage_man:"💆‍♂️",meat_on_bone:"🍖",medal_military:"🎖",medal_sports:"🏅",mega:"📣",melon:"🍈",memo:"📝",men_wrestling:"🤼‍♂️",menorah:"🕎",mens:"🚹",metal:"🤘",metro:"🚇",microphone:"🎤",microscope:"🔬",milk_glass:"🥛",milky_way:"🌌",minibus:"🚐",minidisc:"💽",mobile_phone_off:"📴",money_mouth_face:"🤑",money_with_wings:"💸",moneybag:"💰",monkey:"🐒",monkey_face:"🐵",monorail:"🚝",moon:"🌔",mortar_board:"🎓",mosque:"🕌",motor_boat:"🛥",motor_scooter:"🛵",motorcycle:"🏍",motorway:"🛣",mount_fuji:"🗻",mountain:"⛰",mountain_biking_man:"🚵",mountain_biking_woman:"🚵‍♀️",mountain_cableway:"🚠",mountain_railway:"🚞",mountain_snow:"🏔",mouse:"🐭",mouse2:"🐁",movie_camera:"🎥",moyai:"🗿",mrs_claus:"🤶",muscle:"💪",mushroom:"🍄",musical_keyboard:"🎹",musical_note:"🎵",musical_score:"🎼",mute:"🔇",nail_care:"💅",name_badge:"📛",national_park:"🏞",nauseated_face:"🤢",necktie:"👔",negative_squared_cross_mark:"❎",nerd_face:"🤓",neutral_face:"😐",new:"🆕",new_moon:"🌑",new_moon_with_face:"🌚",newspaper:"📰",newspaper_roll:"🗞",next_track_button:"⏭",ng:"🆖",no_good_man:"🙅‍♂️",no_good_woman:"🙅",night_with_stars:"🌃",no_bell:"🔕",no_bicycles:"🚳",no_entry:"⛔️",no_entry_sign:"🚫",no_mobile_phones:"📵",no_mouth:"😶",no_pedestrians:"🚷",no_smoking:"🚭","non-potable_water":"🚱",nose:"👃",notebook:"📓",notebook_with_decorative_cover:"📔",notes:"🎶",nut_and_bolt:"🔩",o:"⭕️",o2:"🅾️",ocean:"🌊",octopus:"🐙",oden:"🍢",office:"🏢",oil_drum:"🛢",ok:"🆗",ok_hand:"👌",ok_man:"🙆‍♂️",ok_woman:"🙆",old_key:"🗝",older_man:"👴",older_woman:"👵",om:"🕉",on:"🔛",oncoming_automobile:"🚘",oncoming_bus:"🚍",oncoming_police_car:"🚔",oncoming_taxi:"🚖",open_file_folder:"📂",open_hands:"👐",open_mouth:"😮",open_umbrella:"☂️",ophiuchus:"⛎",orange_book:"📙",orthodox_cross:"☦️",outbox_tray:"📤",owl:"🦉",ox:"🐂",package:"📦",page_facing_up:"📄",page_with_curl:"📃",pager:"📟",paintbrush:"🖌",palm_tree:"🌴",pancakes:"🥞",panda_face:"🐼",paperclip:"📎",paperclips:"🖇",parasol_on_ground:"⛱",parking:"🅿️",part_alternation_mark:"〽️",partly_sunny:"⛅️",passenger_ship:"🛳",passport_control:"🛂",pause_button:"⏸",peace_symbol:"☮️",peach:"🍑",peanuts:"🥜",pear:"🍐",pen:"🖊",pencil2:"✏️",penguin:"🐧",pensive:"😔",performing_arts:"🎭",persevere:"😣",person_fencing:"🤺",pouting_woman:"🙎",phone:"☎️",pick:"⛏",pig:"🐷",pig2:"🐖",pig_nose:"🐽",pill:"💊",pineapple:"🍍",ping_pong:"🏓",pisces:"♓️",pizza:"🍕",place_of_worship:"🛐",plate_with_cutlery:"🍽",play_or_pause_button:"⏯",point_down:"👇",point_left:"👈",point_right:"👉",point_up:"☝️",point_up_2:"👆",police_car:"🚓",policewoman:"👮‍♀️",poodle:"🐩",popcorn:"🍿",post_office:"🏣",postal_horn:"📯",postbox:"📮",potable_water:"🚰",potato:"🥔",pouch:"👝",poultry_leg:"🍗",pound:"💷",rage:"😡",pouting_cat:"😾",pouting_man:"🙎‍♂️",pray:"🙏",prayer_beads:"📿",pregnant_woman:"🤰",previous_track_button:"⏮",prince:"🤴",princess:"👸",printer:"🖨",purple_heart:"💜",purse:"👛",pushpin:"📌",put_litter_in_its_place:"🚮",question:"❓",rabbit:"🐰",rabbit2:"🐇",racehorse:"🐎",racing_car:"🏎",radio:"📻",radio_button:"🔘",radioactive:"☢️",railway_car:"🚃",railway_track:"🛤",rainbow:"🌈",rainbow_flag:"🏳️‍🌈",raised_back_of_hand:"🤚",raised_hand_with_fingers_splayed:"🖐",raised_hands:"🙌",raising_hand_woman:"🙋",raising_hand_man:"🙋‍♂️",ram:"🐏",ramen:"🍜",rat:"🐀",record_button:"⏺",recycle:"♻️",red_circle:"🔴",registered:"®️",relaxed:"☺️",relieved:"😌",reminder_ribbon:"🎗",repeat:"🔁",repeat_one:"🔂",rescue_worker_helmet:"⛑",restroom:"🚻",revolving_hearts:"💞",rewind:"⏪",rhinoceros:"🦏",ribbon:"🎀",rice:"🍚",rice_ball:"🍙",rice_cracker:"🍘",rice_scene:"🎑",right_anger_bubble:"🗯",ring:"💍",robot:"🤖",rocket:"🚀",rofl:"🤣",roll_eyes:"🙄",roller_coaster:"🎢",rooster:"🐓",rose:"🌹",rosette:"🏵",rotating_light:"🚨",round_pushpin:"📍",rowing_man:"🚣",rowing_woman:"🚣‍♀️",rugby_football:"🏉",running_man:"🏃",running_shirt_with_sash:"🎽",running_woman:"🏃‍♀️",sa:"🈂️",sagittarius:"♐️",sake:"🍶",sandal:"👡",santa:"🎅",satellite:"📡",saxophone:"🎷",school:"🏫",school_satchel:"🎒",scissors:"✂️",scorpion:"🦂",scorpius:"♏️",scream:"😱",scream_cat:"🙀",scroll:"📜",seat:"💺",secret:"㊙️",see_no_evil:"🙈",seedling:"🌱",selfie:"🤳",shallow_pan_of_food:"🥘",shamrock:"☘️",shark:"🦈",shaved_ice:"🍧",sheep:"🐑",shell:"🐚",shield:"🛡",shinto_shrine:"⛩",ship:"🚢",shirt:"👕",shopping:"🛍",shopping_cart:"🛒",shower:"🚿",shrimp:"🦐",signal_strength:"📶",six_pointed_star:"🔯",ski:"🎿",skier:"⛷",skull:"💀",skull_and_crossbones:"☠️",sleeping:"😴",sleeping_bed:"🛌",sleepy:"😪",slightly_frowning_face:"🙁",slightly_smiling_face:"🙂",slot_machine:"🎰",small_airplane:"🛩",small_blue_diamond:"🔹",small_orange_diamond:"🔸",small_red_triangle:"🔺",small_red_triangle_down:"🔻",smile:"😄",smile_cat:"😸",smiley:"😃",smiley_cat:"😺",smiling_imp:"😈",smirk:"😏",smirk_cat:"😼",smoking:"🚬",snail:"🐌",snake:"🐍",sneezing_face:"🤧",snowboarder:"🏂",snowflake:"❄️",snowman:"⛄️",snowman_with_snow:"☃️",sob:"😭",soccer:"⚽️",soon:"🔜",sos:"🆘",sound:"🔉",space_invader:"👾",spades:"♠️",spaghetti:"🍝",sparkle:"❇️",sparkler:"🎇",sparkles:"✨",sparkling_heart:"💖",speak_no_evil:"🙊",speaker:"🔈",speaking_head:"🗣",speech_balloon:"💬",speedboat:"🚤",spider:"🕷",spider_web:"🕸",spiral_calendar:"🗓",spiral_notepad:"🗒",spoon:"🥄",squid:"🦑",stadium:"🏟",star:"⭐️",star2:"🌟",star_and_crescent:"☪️",star_of_david:"✡️",stars:"🌠",station:"🚉",statue_of_liberty:"🗽",steam_locomotive:"🚂",stew:"🍲",stop_button:"⏹",stop_sign:"🛑",stopwatch:"⏱",straight_ruler:"📏",strawberry:"🍓",stuck_out_tongue:"😛",stuck_out_tongue_closed_eyes:"😝",stuck_out_tongue_winking_eye:"😜",studio_microphone:"🎙",stuffed_flatbread:"🥙",sun_behind_large_cloud:"🌥",sun_behind_rain_cloud:"🌦",sun_behind_small_cloud:"🌤",sun_with_face:"🌞",sunflower:"🌻",sunglasses:"😎",sunny:"☀️",sunrise:"🌅",sunrise_over_mountains:"🌄",surfing_man:"🏄",surfing_woman:"🏄‍♀️",sushi:"🍣",suspension_railway:"🚟",sweat:"😓",sweat_drops:"💦",sweat_smile:"😅",sweet_potato:"🍠",swimming_man:"🏊",swimming_woman:"🏊‍♀️",symbols:"🔣",synagogue:"🕍",syringe:"💉",taco:"🌮",tada:"🎉",tanabata_tree:"🎋",taurus:"♉️",taxi:"🚕",tea:"🍵",telephone_receiver:"📞",telescope:"🔭",tennis:"🎾",tent:"⛺️",thermometer:"🌡",thinking:"🤔",thought_balloon:"💭",ticket:"🎫",tickets:"🎟",tiger:"🐯",tiger2:"🐅",timer_clock:"⏲",tipping_hand_man:"💁‍♂️",tired_face:"😫",tm:"™️",toilet:"🚽",tokyo_tower:"🗼",tomato:"🍅",tongue:"👅",top:"🔝",tophat:"🎩",tornado:"🌪",trackball:"🖲",tractor:"🚜",traffic_light:"🚥",train:"🚋",train2:"🚆",tram:"🚊",triangular_flag_on_post:"🚩",triangular_ruler:"📐",trident:"🔱",triumph:"😤",trolleybus:"🚎",trophy:"🏆",tropical_drink:"🍹",tropical_fish:"🐠",truck:"🚚",trumpet:"🎺",tulip:"🌷",tumbler_glass:"🥃",turkey:"🦃",turtle:"🐢",tv:"📺",twisted_rightwards_arrows:"🔀",two_hearts:"💕",two_men_holding_hands:"👬",two_women_holding_hands:"👭",u5272:"🈹",u5408:"🈴",u55b6:"🈺",u6307:"🈯️",u6708:"🈷️",u6709:"🈶",u6e80:"🈵",u7121:"🈚️",u7533:"🈸",u7981:"🈲",u7a7a:"🈳",umbrella:"☔️",unamused:"😒",underage:"🔞",unicorn:"🦄",unlock:"🔓",up:"🆙",upside_down_face:"🙃",v:"✌️",vertical_traffic_light:"🚦",vhs:"📼",vibration_mode:"📳",video_camera:"📹",video_game:"🎮",violin:"🎻",virgo:"♍️",volcano:"🌋",volleyball:"🏐",vs:"🆚",vulcan_salute:"🖖",walking_man:"🚶",walking_woman:"🚶‍♀️",waning_crescent_moon:"🌘",waning_gibbous_moon:"🌖",warning:"⚠️",wastebasket:"🗑",watch:"⌚️",water_buffalo:"🐃",watermelon:"🍉",wave:"👋",wavy_dash:"〰️",waxing_crescent_moon:"🌒",wc:"🚾",weary:"😩",wedding:"💒",weight_lifting_man:"🏋️",weight_lifting_woman:"🏋️‍♀️",whale:"🐳",whale2:"🐋",wheel_of_dharma:"☸️",wheelchair:"♿️",white_check_mark:"✅",white_circle:"⚪️",white_flag:"🏳️",white_flower:"💮",white_large_square:"⬜️",white_medium_small_square:"◽️",white_medium_square:"◻️",white_small_square:"▫️",white_square_button:"🔳",wilted_flower:"🥀",wind_chime:"🎐",wind_face:"🌬",wine_glass:"🍷",wink:"😉",wolf:"🐺",woman:"👩",woman_artist:"👩‍🎨",woman_astronaut:"👩‍🚀",woman_cartwheeling:"🤸‍♀️",woman_cook:"👩‍🍳",woman_facepalming:"🤦‍♀️",woman_factory_worker:"👩‍🏭",woman_farmer:"👩‍🌾",woman_firefighter:"👩‍🚒",woman_health_worker:"👩‍⚕️",woman_judge:"👩‍⚖️",woman_juggling:"🤹‍♀️",woman_mechanic:"👩‍🔧",woman_office_worker:"👩‍💼",woman_pilot:"👩‍✈️",woman_playing_handball:"🤾‍♀️",woman_playing_water_polo:"🤽‍♀️",woman_scientist:"👩‍🔬",woman_shrugging:"🤷‍♀️",woman_singer:"👩‍🎤",woman_student:"👩‍🎓",woman_teacher:"👩‍🏫",woman_technologist:"👩‍💻",woman_with_turban:"👳‍♀️",womans_clothes:"👚",womans_hat:"👒",women_wrestling:"🤼‍♀️",womens:"🚺",world_map:"🗺",worried:"😟",wrench:"🔧",writing_hand:"✍️",x:"❌",yellow_heart:"💛",yen:"💴",yin_yang:"☯️",yum:"😋",zap:"⚡️",zipper_mouth_face:"🤐",zzz:"💤",octocat:'',showdown:''},b.subParser("makehtml.blockGamut",function(e,r,t){"use strict";return e=t.converter._dispatch("makehtml.blockGamut.before",e,r,t).getText(),e=b.subParser("makehtml.blockQuotes")(e,r,t),e=b.subParser("makehtml.headers")(e,r,t),e=b.subParser("makehtml.horizontalRule")(e,r,t),e=b.subParser("makehtml.lists")(e,r,t),e=b.subParser("makehtml.codeBlocks")(e,r,t),e=b.subParser("makehtml.tables")(e,r,t),e=b.subParser("makehtml.hashHTMLBlocks")(e,r,t),e=b.subParser("makehtml.paragraphs")(e,r,t),e=t.converter._dispatch("makehtml.blockGamut.after",e,r,t).getText()}),b.subParser("makehtml.blockQuotes",function(e,r,t){"use strict";e=t.converter._dispatch("makehtml.blockQuotes.before",e,r,t).getText(),e+="\n\n";var a=/(^ {0,3}>[ \t]?.+\n(.+\n)*\n*)+/gm;return r.splitAdjacentBlockquotes&&(a=/^ {0,3}>[\s\S]*?(?:\n\n)/gm),e=e.replace(a,function(e){return e=(e=(e=e.replace(/^[ \t]*>[ \t]?/gm,"")).replace(/¨0/g,"")).replace(/^[ \t]+$/gm,""),e=b.subParser("makehtml.githubCodeBlocks")(e,r,t),e=(e=(e=b.subParser("makehtml.blockGamut")(e,r,t)).replace(/(^|\n)/g,"$1 ")).replace(/(\s*
[^\r]+?<\/pre>)/gm,function(e,r){var t=r;return t=(t=t.replace(/^  /gm,"¨0")).replace(/¨0/g,"")}),b.subParser("makehtml.hashBlock")("
\n"+e+"\n
",r,t)}),e=t.converter._dispatch("makehtml.blockQuotes.after",e,r,t).getText()}),b.subParser("makehtml.codeBlocks",function(e,o,i){"use strict";e=i.converter._dispatch("makehtml.codeBlocks.before",e,o,i).getText();return e=(e=(e+="¨0").replace(/(?:\n\n|^)((?:(?:[ ]{4}|\t).*\n+)+)(\n*[ ]{0,3}[^ \t\n]|(?=¨0))/g,function(e,r,t){var a=r,n=t,s="\n";return a=b.subParser("makehtml.outdent")(a,o,i),a=b.subParser("makehtml.encodeCode")(a,o,i),a=(a=(a=b.subParser("makehtml.detab")(a,o,i)).replace(/^\n+/g,"")).replace(/\n+$/g,""),o.omitExtraWLInCodeBlocks&&(s=""),a="
"+a+s+"
",b.subParser("makehtml.hashBlock")(a,o,i)+n})).replace(/¨0/,""),e=i.converter._dispatch("makehtml.codeBlocks.after",e,o,i).getText()}),b.subParser("makehtml.codeSpans",function(e,s,o){"use strict";return void 0===(e=o.converter._dispatch("makehtml.codeSpans.before",e,s,o).getText())&&(e=""),e=e.replace(/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm,function(e,r,t,a){var n=a;return n=(n=n.replace(/^([ \t]*)/g,"")).replace(/[ \t]*$/g,""),n=r+""+(n=b.subParser("makehtml.encodeCode")(n,s,o))+"",n=b.subParser("makehtml.hashHTMLSpans")(n,s,o)}),e=o.converter._dispatch("makehtml.codeSpans.after",e,s,o).getText()}),b.subParser("makehtml.completeHTMLDocument",function(e,r,t){"use strict";if(!r.completeHTMLDocument)return e;e=t.converter._dispatch("makehtml.completeHTMLDocument.before",e,r,t).getText();var a="html",n="\n",s="",o='\n',i="",l="";for(var c in void 0!==t.metadata.parsed.doctype&&(n="\n","html"!==(a=t.metadata.parsed.doctype.toString().toLowerCase())&&"html5"!==a||(o='')),t.metadata.parsed)if(t.metadata.parsed.hasOwnProperty(c))switch(c.toLowerCase()){case"doctype":break;case"title":s=""+t.metadata.parsed.title+"\n";break;case"charset":o="html"===a||"html5"===a?'\n':'\n';break;case"language":case"lang":i=' lang="'+t.metadata.parsed[c]+'"',l+='\n';break;default:l+='\n'}return e=n+"\n\n"+s+o+l+"\n\n"+e.trim()+"\n\n",e=t.converter._dispatch("makehtml.completeHTMLDocument.after",e,r,t).getText()}),b.subParser("makehtml.detab",function(e,r,t){"use strict";return e=(e=(e=(e=(e=(e=t.converter._dispatch("makehtml.detab.before",e,r,t).getText()).replace(/\t(?=\t)/g," ")).replace(/\t/g,"¨A¨B")).replace(/¨B(.+?)¨A/g,function(e,r){for(var t=r,a=4-t.length%4,n=0;n/g,">"),e=t.converter._dispatch("makehtml.encodeAmpsAndAngles.after",e,r,t).getText()}),b.subParser("makehtml.encodeBackslashEscapes",function(e,r,t){"use strict";return e=(e=(e=t.converter._dispatch("makehtml.encodeBackslashEscapes.before",e,r,t).getText()).replace(/\\(\\)/g,b.helper.escapeCharactersCallback)).replace(/\\([`*_{}\[\]()>#+.!~=|:-])/g,b.helper.escapeCharactersCallback),e=t.converter._dispatch("makehtml.encodeBackslashEscapes.after",e,r,t).getText()}),b.subParser("makehtml.encodeCode",function(e,r,t){"use strict";return e=(e=t.converter._dispatch("makehtml.encodeCode.before",e,r,t).getText()).replace(/&/g,"&").replace(//g,">").replace(/([*_{}\[\]\\=~-])/g,b.helper.escapeCharactersCallback),e=t.converter._dispatch("makehtml.encodeCode.after",e,r,t).getText()}),b.subParser("makehtml.escapeSpecialCharsWithinTagAttributes",function(e,r,t){"use strict";return e=(e=(e=t.converter._dispatch("makehtml.escapeSpecialCharsWithinTagAttributes.before",e,r,t).getText()).replace(/<\/?[a-z\d_:-]+(?:[\s]+[\s\S]+?)?>/gi,function(e){return e.replace(/(.)<\/?code>(?=.)/g,"$1`").replace(/([\\`*_~=|])/g,b.helper.escapeCharactersCallback)})).replace(/-]|-[^>])(?:[^-]|-[^-])*)--)>/gi,function(e){return e.replace(/([\\`*_~=|])/g,b.helper.escapeCharactersCallback)}),e=t.converter._dispatch("makehtml.escapeSpecialCharsWithinTagAttributes.after",e,r,t).getText()}),b.subParser("makehtml.githubCodeBlocks",function(e,s,o){"use strict";return s.ghCodeBlocks?(e=o.converter._dispatch("makehtml.githubCodeBlocks.before",e,s,o).getText(),e=(e=(e+="¨0").replace(/(?:^|\n)(?: {0,3})(```+|~~~+)(?: *)([^\s`~]*)\n([\s\S]*?)\n(?: {0,3})\1/g,function(e,r,t,a){var n=s.omitExtraWLInCodeBlocks?"":"\n";return a=b.subParser("makehtml.encodeCode")(a,s,o),a="
"+(a=(a=(a=b.subParser("makehtml.detab")(a,s,o)).replace(/^\n+/g,"")).replace(/\n+$/g,""))+n+"
",a=b.subParser("makehtml.hashBlock")(a,s,o),"\n\n¨G"+(o.ghCodeBlocks.push({text:e,codeblock:a})-1)+"G\n\n"})).replace(/¨0/,""),o.converter._dispatch("makehtml.githubCodeBlocks.after",e,s,o).getText()):e}),b.subParser("makehtml.hashBlock",function(e,r,t){"use strict";return e=(e=t.converter._dispatch("makehtml.hashBlock.before",e,r,t).getText()).replace(/(^\n+|\n+$)/g,""),e="\n\n¨K"+(t.gHtmlBlocks.push(e)-1)+"K\n\n",e=t.converter._dispatch("makehtml.hashBlock.after",e,r,t).getText()}),b.subParser("makehtml.hashCodeTags",function(e,s,o){"use strict";e=o.converter._dispatch("makehtml.hashCodeTags.before",e,s,o).getText();return e=b.helper.replaceRecursiveRegExp(e,function(e,r,t,a){var n=t+b.subParser("makehtml.encodeCode")(r,s,o)+a;return"¨C"+(o.gHtmlSpans.push(n)-1)+"C"},"]*>","
","gim"),e=o.converter._dispatch("makehtml.hashCodeTags.after",e,s,o).getText()}),b.subParser("makehtml.hashElement",function(e,r,a){"use strict";return function(e,r){var t=r;return t=(t=(t=t.replace(/\n\n/g,"\n")).replace(/^\n/,"")).replace(/\n+$/g,""),t="\n\n¨K"+(a.gHtmlBlocks.push(t)-1)+"K\n\n"}}),b.subParser("makehtml.hashHTMLBlocks",function(e,r,s){"use strict";e=s.converter._dispatch("makehtml.hashHTMLBlocks.before",e,r,s).getText();var t=["pre","div","h1","h2","h3","h4","h5","h6","blockquote","table","dl","ol","ul","script","noscript","form","fieldset","iframe","math","style","section","header","footer","nav","article","aside","address","audio","canvas","figure","hgroup","output","video","p"],a=function(e,r,t,a){var n=e;return-1!==t.search(/\bmarkdown\b/)&&(n=t+s.converter.makeHtml(r)+a),"\n\n¨K"+(s.gHtmlBlocks.push(n)-1)+"K\n\n"};r.backslashEscapesHTMLTags&&(e=e.replace(/\\<(\/?[^>]+?)>/g,function(e,r){return"<"+r+">"}));for(var n=0;n]*>)","im"),l="<"+t[n]+"\\b[^>]*>",c="";-1!==(o=b.helper.regexIndexOf(e,i));){var u=b.helper.splitAtIndex(e,o),h=b.helper.replaceRecursiveRegExp(u[1],a,l,c,"im");if(h===u[1])break;e=u[0].concat(h)}return e=e.replace(/(\n {0,3}(<(hr)\b([^<>])*?\/?>)[ \t]*(?=\n{2,}))/g,b.subParser("makehtml.hashElement")(e,r,s)),e=(e=b.helper.replaceRecursiveRegExp(e,function(e){return"\n\n¨K"+(s.gHtmlBlocks.push(e)-1)+"K\n\n"},"^ {0,3}\x3c!--","--\x3e","gm")).replace(/(?:\n\n)( {0,3}(?:<([?%])[^\r]*?\2>)[ \t]*(?=\n{2,}))/g,b.subParser("makehtml.hashElement")(e,r,s)),e=s.converter._dispatch("makehtml.hashHTMLBlocks.after",e,r,s).getText()}),b.subParser("makehtml.hashHTMLSpans",function(e,r,t){"use strict";return e=(e=(e=(e=(e=t.converter._dispatch("makehtml.hashHTMLSpans.before",e,r,t).getText()).replace(/<[^>]+?\/>/gi,function(e){return b.helper._hashHTMLSpan(e,t)})).replace(/<([^>]+?)>[\s\S]*?<\/\1>/g,function(e){return b.helper._hashHTMLSpan(e,t)})).replace(/<([^>]+?)\s[^>]+?>[\s\S]*?<\/\1>/g,function(e){return b.helper._hashHTMLSpan(e,t)})).replace(/<[^>]+?>/gi,function(e){return b.helper._hashHTMLSpan(e,t)}),e=t.converter._dispatch("makehtml.hashHTMLSpans.after",e,r,t).getText()}),b.subParser("makehtml.unhashHTMLSpans",function(e,r,t){"use strict";e=t.converter._dispatch("makehtml.unhashHTMLSpans.before",e,r,t).getText();for(var a=0;a]*>\\s*]*>","^ {0,3}\\s*
","gim"),e=o.converter._dispatch("makehtml.hashPreCodeTags.after",e,s,o).getText()}),b.subParser("makehtml.headers",function(e,l,c){"use strict";e=c.converter._dispatch("makehtml.headers.before",e,l,c).getText();var u=isNaN(parseInt(l.headerLevelStart))?1:parseInt(l.headerLevelStart),r=l.smoothLivePreview?/^(.+)[ \t]*\n={2,}[ \t]*\n+/gm:/^(.+)[ \t]*\n=+[ \t]*\n+/gm,t=l.smoothLivePreview?/^(.+)[ \t]*\n-{2,}[ \t]*\n+/gm:/^(.+)[ \t]*\n-+[ \t]*\n+/gm;e=(e=e.replace(r,function(e,r){var t=b.subParser("makehtml.spanGamut")(r,l,c),a=l.noHeaderId?"":' id="'+h(r)+'"',n=""+t+"";return b.subParser("makehtml.hashBlock")(n,l,c)})).replace(t,function(e,r){var t=b.subParser("makehtml.spanGamut")(r,l,c),a=l.noHeaderId?"":' id="'+h(r)+'"',n=u+1,s=""+t+"";return b.subParser("makehtml.hashBlock")(s,l,c)});var a=l.requireSpaceBeforeHeadingText?/^(#{1,6})[ \t]+(.+?)[ \t]*#*\n+/gm:/^(#{1,6})[ \t]*(.+?)[ \t]*#*\n+/gm;function h(e){var r,t;if(l.customizedHeaderId){var a=e.match(/\{([^{]+?)}\s*$/);a&&a[1]&&(e=a[1])}return r=e,t=b.helper.isString(l.prefixHeaderId)?l.prefixHeaderId:!0===l.prefixHeaderId?"section-":"",l.rawPrefixHeaderId||(r=t+r),r=l.ghCompatibleHeaderId?r.replace(/ /g,"-").replace(/&/g,"").replace(/¨T/g,"").replace(/¨D/g,"").replace(/[&+$,\/:;=?@"#{}|^¨~\[\]`\\*)(%.!'<>]/g,"").toLowerCase():l.rawHeaderId?r.replace(/ /g,"-").replace(/&/g,"&").replace(/¨T/g,"¨").replace(/¨D/g,"$").replace(/["']/g,"-").toLowerCase():r.replace(/[^\w]/g,"").toLowerCase(),l.rawPrefixHeaderId&&(r=t+r),c.hashLinkCounts[r]?r=r+"-"+c.hashLinkCounts[r]++:c.hashLinkCounts[r]=1,r}return e=e.replace(a,function(e,r,t){var a=t;l.customizedHeaderId&&(a=t.replace(/\s?\{([^{]+?)}\s*$/,""));var n=b.subParser("makehtml.spanGamut")(a,l,c),s=l.noHeaderId?"":' id="'+h(t)+'"',o=u-1+r.length,i=""+n+"";return b.subParser("makehtml.hashBlock")(i,l,c)}),e=c.converter._dispatch("makehtml.headers.after",e,l,c).getText()}),b.subParser("makehtml.horizontalRule",function(e,r,t){"use strict";e=t.converter._dispatch("makehtml.horizontalRule.before",e,r,t).getText();var a=b.subParser("makehtml.hashBlock")("
",r,t);return e=(e=(e=e.replace(/^ {0,2}( ?-){3,}[ \t]*$/gm,a)).replace(/^ {0,2}( ?\*){3,}[ \t]*$/gm,a)).replace(/^ {0,2}( ?_){3,}[ \t]*$/gm,a),e=t.converter._dispatch("makehtml.horizontalRule.after",e,r,t).getText()}),b.subParser("makehtml.images",function(e,r,m){"use strict";function l(e,r,t,a,n,s,o,i){var l=m.gUrls,c=m.gTitles,u=m.gDimensions;if(t=t.toLowerCase(),i||(i=""),-1? ?(['"].*['"])?\)$/m))a="";else if(""===a||null===a){if(""!==t&&null!==t||(t=r.toLowerCase().replace(/ ?\n/g," ")),a="#"+t,b.helper.isUndefined(l[t]))return e;a=l[t],b.helper.isUndefined(c[t])||(i=c[t]),b.helper.isUndefined(u[t])||(n=u[t].width,s=u[t].height)}r=r.replace(/"/g,""").replace(b.helper.regexes.asteriskDashTildeAndColon,b.helper.escapeCharactersCallback);var h=''+r+'"}return e=(e=(e=(e=(e=(e=m.converter._dispatch("makehtml.images.before",e,r,m).getText()).replace(/!\[([^\]]*?)] ?(?:\n *)?\[([\s\S]*?)]()()()()()/g,l)).replace(/!\[([^\]]*?)][ \t]*()\([ \t]??(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(["'])([^"]*?)\6)?[ \t]?\)/g,function(e,r,t,a,n,s,o,i){return l(e,r,t,a=a.replace(/\s/g,""),n,s,0,i)})).replace(/!\[([^\]]*?)][ \t]*()\([ \t]?<([^>]*)>(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(?:(["'])([^"]*?)\6))?[ \t]?\)/g,l)).replace(/!\[([^\]]*?)][ \t]*()\([ \t]??(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(["'])([^"]*?)\6)?[ \t]?\)/g,l)).replace(/!\[([^\[\]]+)]()()()()()/g,l),e=m.converter._dispatch("makehtml.images.after",e,r,m).getText()}),b.subParser("makehtml.italicsAndBold",function(e,r,t){"use strict";function a(e,r,t){return r+e+t}return e=t.converter._dispatch("makehtml.italicsAndBold.before",e,r,t).getText(),e=(e=(e=(e=r.literalMidWordUnderscores?(e=(e=e.replace(/\b___(\S[\s\S]*?)___\b/g,function(e,r){return a(r,"","")})).replace(/\b__(\S[\s\S]*?)__\b/g,function(e,r){return a(r,"","")})).replace(/\b_(\S[\s\S]*?)_\b/g,function(e,r){return a(r,"","")}):(e=(e=e.replace(/___(\S[\s\S]*?)___/g,function(e,r){return/\S$/.test(r)?a(r,"",""):e})).replace(/__(\S[\s\S]*?)__/g,function(e,r){return/\S$/.test(r)?a(r,"",""):e})).replace(/_([^\s_][\s\S]*?)_/g,function(e,r){return/\S$/.test(r)?a(r,"",""):e})).replace(/\*\*\*(\S[\s\S]*?)\*\*\*/g,function(e,r){return/\S$/.test(r)?a(r,"",""):e})).replace(/\*\*(\S[\s\S]*?)\*\*/g,function(e,r){return/\S$/.test(r)?a(r,"",""):e})).replace(/\*([^\s*][\s\S]*?)\*/g,function(e,r){return/\S$/.test(r)?a(r,"",""):e}),e=t.converter._dispatch("makehtml.italicsAndBold.after",e,r,t).getText()}),function(){function l(i,l,c,u,h){return h=!!h,function(e,r,t,a,n,s,o){return/\n\n/.test(e)?e:f(_(i,l+".captureStart",e,r,t,a,o,c,u),c,u,h)}}function _(e,r,t,a,n,s,o,i,l){return l.converter._dispatch(r,t,i,l,{regexp:e,matches:{wholeMatch:t,text:a,id:n,url:s,title:o}})}function f(e,r,t,a){var n=e.getMatches().wholeMatch,s=e.getMatches().text,o=e.getMatches().id,i=e.getMatches().url,l=e.getMatches().title,c="";if(l||(l=""),o=o?o.toLowerCase():"",a)i="";else if(!i){if(o||(o=s.toLowerCase().replace(/ ?\n/g," ")),i="#"+o,b.helper.isUndefined(t.gUrls[o]))return n;i=t.gUrls[o],b.helper.isUndefined(t.gTitles[o])||(l=t.gTitles[o])}i=i.replace(b.helper.regexes.asteriskDashTildeAndColon,b.helper.escapeCharactersCallback),""!==l&&null!==l&&(l=' title="'+(l=(l=l.replace(/"/g,""")).replace(b.helper.regexes.asteriskDashTildeAndColon,b.helper.escapeCharactersCallback))+'"'),r.openLinksInNewWindow&&!/^#/.test(i)&&(c=' target="¨E95Eblank"'),s=b.subParser("makehtml.codeSpans")(s,r,t),s=b.subParser("makehtml.emoji")(s,r,t),s=b.subParser("makehtml.underline")(s,r,t),s=b.subParser("makehtml.italicsAndBold")(s,r,t),s=b.subParser("makehtml.strikethrough")(s,r,t),s=b.subParser("makehtml.ellipsis")(s,r,t);var u='"+(s=b.subParser("makehtml.hashHTMLSpans")(s,r,t))+"";return u=b.subParser("makehtml.hashHTMLSpans")(u,r,t)}var a="makehtml.links";b.subParser("makehtml.links",function(e,r,t){return e=t.converter._dispatch(a+".start",e,r,t).getText(),e=b.subParser("makehtml.links.reference")(e,r,t),e=b.subParser("makehtml.links.inline")(e,r,t),e=b.subParser("makehtml.links.referenceShortcut")(e,r,t),e=b.subParser("makehtml.links.angleBrackets")(e,r,t),e=(e=(e=b.subParser("makehtml.links.ghMentions")(e,r,t)).replace(/]*>[\s\S]*<\/a>/g,function(e){return b.helper._hashHTMLSpan(e,t)})).replace(/]*\/?>/g,function(e){return b.helper._hashHTMLSpan(e,t)}),e=b.subParser("makehtml.links.naked")(e,r,t),e=t.converter._dispatch(a+".end",e,r,t).getText()}),b.subParser("makehtml.links.inline",function(e,r,t){var a=a+".inline",n=/\[(.*?)]()()()()\(? ?(?:["'](.*)["'])?\)/g,s=/\[((?:\[[^\]]*]|[^\[\]])*)]()\s?\([ \t]?<([^>]*)>(?:[ \t]*((["'])([^"]*?)\5))?[ \t]?\)/g,o=/\[([\S ]*?)]\s?()\( *?\s*(?:()(['"])(.*?)\5)? *\)/g,i=/\[([\S ]*?)]\s?()\( *?\s+()()\((.*?)\) *\)/g;return e=(e=(e=(e=(e=t.converter._dispatch(a+".start",e,r,t).getText()).replace(n,l(n,a,r,t,!0))).replace(s,l(s,a,r,t))).replace(o,l(o,a,r,t))).replace(i,l(i,a,r,t)),e=t.converter._dispatch(a+".end",e,r,t).getText()}),b.subParser("makehtml.links.reference",function(e,r,t){var a=a+".reference",n=/\[((?:\[[^\]]*]|[^\[\]])*)] ?(?:\n *)?\[(.*?)]()()()()/g;return e=(e=t.converter._dispatch(a+".start",e,r,t).getText()).replace(n,l(n,a,r,t)),e=t.converter._dispatch(a+".end",e,r,t).getText()}),b.subParser("makehtml.links.referenceShortcut",function(e,r,t){var a=a+".referenceShortcut",n=/\[([^\[\]]+)]()()()()()/g;return e=(e=t.converter._dispatch(a+".start",e,r,t).getText()).replace(n,l(n,a,r,t)),e=t.converter._dispatch(a+".end",e,r,t).getText()}),b.subParser("makehtml.links.ghMentions",function(e,o,i){var l=l+"ghMentions";if(!o.ghMentions)return e;e=i.converter._dispatch(l+".start",e,o,i).getText();var c=/(^|\s)(\\)?(@([a-z\d]+(?:[a-z\d._-]+?[a-z\d]+)*))/gi;return e=e.replace(c,function(e,r,t,a,n){if("\\"===t)return r+a;if(!b.helper.isString(o.ghMentionsLink))throw new Error("ghMentionsLink option must be a string");var s=o.ghMentionsLink.replace(/{u}/g,n);return r+f(_(c,l+".captureStart",e,a,null,s,null,o,i),o,i)}),e=i.converter._dispatch(l+".end",e,o,i).getText()}),b.subParser("makehtml.links.angleBrackets",function(e,a,n){var s="makehtml.links.angleBrackets";e=n.converter._dispatch(s+".start",e,a,n).getText();var o=/<(((?:https?|ftp):\/\/|www\.)[^'">\s]+)>/gi;e=e.replace(o,function(e,r,t){return f(_(o,s+".captureStart",e,r,null,r="www."===t?"http://"+r:r,null,a,n),a,n)});var i=/<(?:mailto:)?([-.\w]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)>/gi;return e=e.replace(i,function(e,r){var t="mailto:";return r=b.subParser("makehtml.unescapeSpecialChars")(r,a,n),a.encodeEmails?(t=b.helper.encodeEmailAddress(t+r),r=b.helper.encodeEmailAddress(r)):t+=r,f(_(i,s+".captureStart",e,r,null,t,null,a,n),a,n)}),e=n.converter._dispatch(s+".end",e,a,n).getText()}),b.subParser("makehtml.links.naked",function(e,m,d){if(!m.simplifiedAutoLink)return e;var p="makehtml.links.naked";e=d.converter._dispatch(p+".start",e,m,d).getText();var g=/([_*~]*?)(((?:https?|ftp):\/\/|www\.)[^\s<>"'`´.-][^\s<>"'`´]*?\.[a-z\d.]+[^\s<>"']*)\1/gi;e=e.replace(g,function(e,r,t,a){for(var n="",s=t.length-1;0<=s;--s){var o=t.charAt(s);if(/[_*~,;:.!?]/.test(o))t=t.slice(0,-1),n=o+n;else if(/\)/.test(o)){var i=t.match(/\(/g)||[],l=t.match(/\)/g);if(!(i.length"+(i=i.replace("¨A",""))+"\n"})).replace(/¨0/g,""),u.gListLevel--,r&&(e=e.replace(/\s+$/,"")),e}function d(e,r){if("ol"===r){var t=e.match(/^ *(\d+)\./);if(t&&"1"!==t[1])return' start="'+t[1]+'"'}return""}function n(n,s,o){var i=h.disableForced4SpacesIndentedSublists?/^ ?\d+\.[ \t]/gm:/^ {0,3}\d+\.[ \t]/gm,l=h.disableForced4SpacesIndentedSublists?/^ ?[*+-][ \t]/gm:/^ {0,3}[*+-][ \t]/gm,c="ul"===s?i:l,u="";if(-1!==n.search(c))!function e(r){var t=r.search(c),a=d(n,s);-1!==t?(u+="\n\n<"+s+a+">\n"+m(r.slice(0,t),!!o)+"\n",c="ul"===(s="ul"===s?"ol":"ul")?i:l,e(r.slice(t))):u+="\n\n<"+s+a+">\n"+m(r,!!o)+"\n"}(n);else{var e=d(n,s);u="\n\n<"+s+e+">\n"+m(n,!!o)+"\n"}return u}return e=u.converter._dispatch("lists.before",e,h,u).getText(),e+="¨0",e=(e=u.gListLevel?e.replace(/^(( {0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(¨0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm,function(e,r,t){return n(r,-1"),i+="

",n.push(i))}for(s=n.length,o=0;o]*>\s*]*>/.test(c)&&(u=!0)}n[o]=c}return e=(e=(e=n.join("\n")).replace(/^\n+/g,"")).replace(/\n+$/g,""),t.converter._dispatch("makehtml.paragraphs.after",e,r,t).getText()}),b.subParser("makehtml.runExtension",function(e,r,t,a){"use strict";if(e.filter)r=e.filter(r,a.converter,t);else if(e.regex){var n=e.regex;n instanceof RegExp||(n=new RegExp(n,"g")),r=r.replace(n,e.replace)}return r}),b.subParser("makehtml.spanGamut",function(e,r,t){"use strict";return e=t.converter._dispatch("makehtml.span.before",e,r,t).getText(),e=b.subParser("makehtml.codeSpans")(e,r,t),e=b.subParser("makehtml.escapeSpecialCharsWithinTagAttributes")(e,r,t),e=b.subParser("makehtml.encodeBackslashEscapes")(e,r,t),e=b.subParser("makehtml.images")(e,r,t),e=t.converter._dispatch("smakehtml.links.before",e,r,t).getText(),e=b.subParser("makehtml.links")(e,r,t),e=t.converter._dispatch("smakehtml.links.after",e,r,t).getText(),e=b.subParser("makehtml.emoji")(e,r,t),e=b.subParser("makehtml.underline")(e,r,t),e=b.subParser("makehtml.italicsAndBold")(e,r,t),e=b.subParser("makehtml.strikethrough")(e,r,t),e=b.subParser("makehtml.ellipsis")(e,r,t),e=b.subParser("makehtml.hashHTMLSpans")(e,r,t),e=b.subParser("makehtml.encodeAmpsAndAngles")(e,r,t),r.simpleLineBreaks?/\n\n¨K/.test(e)||(e=e.replace(/\n+/g,"
\n")):e=e.replace(/ +\n/g,"
\n"),e=t.converter._dispatch("makehtml.spanGamut.after",e,r,t).getText()}),b.subParser("makehtml.strikethrough",function(e,r,t){"use strict";return r.strikethrough&&(e=(e=t.converter._dispatch("makehtml.strikethrough.before",e,r,t).getText()).replace(/(?:~){2}([\s\S]+?)(?:~){2}/g,function(e,r){return""+r+""}),e=t.converter._dispatch("makehtml.strikethrough.after",e,r,t).getText()),e}),b.subParser("makehtml.stripLinkDefinitions",function(e,i,l){"use strict";var r=function(e,r,t,a,n,s,o){return r=r.toLowerCase(),t.match(/^data:.+?\/.+?;base64,/)?l.gUrls[r]=t.replace(/\s/g,""):l.gUrls[r]=b.subParser("makehtml.encodeAmpsAndAngles")(t,i,l),s?s+o:(o&&(l.gTitles[r]=o.replace(/"|'/g,""")),i.parseImgDimensions&&a&&n&&(l.gDimensions[r]={width:a,height:n}),"")};return e=(e=(e=(e+="¨0").replace(/^ {0,3}\[(.+)]:[ \t]*\n?[ \t]*?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n\n|(?=¨0)|(?=\n\[))/gm,r)).replace(/^ {0,3}\[(.+)]:[ \t]*\n?[ \t]*\s]+)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n+|(?=¨0))/gm,r)).replace(/¨0/,"")}),b.subParser("makehtml.tables",function(e,_,f){"use strict";if(!_.tables)return e;function r(e){var r,t=e.split("\n");for(r=0;r"+(n=b.subParser("makehtml.spanGamut")(n,_,f))+"\n"));for(r=0;r"+b.subParser("makehtml.spanGamut")(i,_,f)+"\n"));d.push(p)}return function(e,r){for(var t="\n\n\n",a=e.length,n=0;n\n\n\n",n=0;n\n";for(var s=0;s\n"}return t+="\n
\n"}(h,d)}return e=(e=(e=(e=f.converter._dispatch("makehtml.tables.before",e,_,f).getText()).replace(/\\(\|)/g,b.helper.escapeCharactersCallback)).replace(/^ {0,3}\|?.+\|.+\n {0,3}\|?[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*:?[ \t]*(?:[-=]){2,}[\s\S]+?(?:\n\n|¨0)/gm,r)).replace(/^ {0,3}\|.+\|[ \t]*\n {0,3}\|[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*\n( {0,3}\|.+\|[ \t]*\n)*(?:\n|¨0)/gm,r),e=f.converter._dispatch("makehtml.tables.after",e,_,f).getText()}),b.subParser("makehtml.underline",function(e,r,t){"use strict";return r.underline?(e=t.converter._dispatch("makehtml.underline.before",e,r,t).getText(),e=(e=r.literalMidWordUnderscores?(e=e.replace(/\b___(\S[\s\S]*?)___\b/g,function(e,r){return""+r+""})).replace(/\b__(\S[\s\S]*?)__\b/g,function(e,r){return""+r+""}):(e=e.replace(/___(\S[\s\S]*?)___/g,function(e,r){return/\S$/.test(r)?""+r+"":e})).replace(/__(\S[\s\S]*?)__/g,function(e,r){return/\S$/.test(r)?""+r+"":e})).replace(/(_)/g,b.helper.escapeCharactersCallback),e=t.converter._dispatch("makehtml.underline.after",e,r,t).getText()):e}),b.subParser("makehtml.unescapeSpecialChars",function(e,r,t){"use strict";return e=(e=t.converter._dispatch("makehtml.unescapeSpecialChars.before",e,r,t).getText()).replace(/¨E(\d+)E/g,function(e,r){var t=parseInt(r);return String.fromCharCode(t)}),e=t.converter._dispatch("makehtml.unescapeSpecialChars.after",e,r,t).getText()}),b.subParser("makeMarkdown.blockquote",function(e,r){"use strict";var t="";if(e.hasChildNodes())for(var a=e.childNodes,n=a.length,s=0;s ")}),b.subParser("makeMarkdown.codeBlock",function(e,r){"use strict";var t=e.getAttribute("language"),a=e.getAttribute("precodenum");return"```"+t+"\n"+r.preList[a]+"\n```"}),b.subParser("makeMarkdown.codeSpan",function(e){"use strict";return"`"+e.innerHTML+"`"}),b.subParser("makeMarkdown.emphasis",function(e,r){"use strict";var t="";if(e.hasChildNodes()){t+="*";for(var a=e.childNodes,n=a.length,s=0;s",e.hasAttribute("width")&&e.hasAttribute("height")&&(r+=" ="+e.getAttribute("width")+"x"+e.getAttribute("height")),e.hasAttribute("title")&&(r+=' "'+e.getAttribute("title")+'"'),r+=")"),r}),b.subParser("makeMarkdown.links",function(e,r){"use strict";var t="";if(e.hasChildNodes()&&e.hasAttribute("href")){var a=e.childNodes,n=a.length;t="[";for(var s=0;s",e.hasAttribute("title")&&(t+=' "'+e.getAttribute("title")+'"'),t+=")"}return t}),b.subParser("makeMarkdown.list",function(e,r,t){"use strict";var a="";if(!e.hasChildNodes())return"";for(var n=e.childNodes,s=n.length,o=e.getAttribute("start")||1,i=0;i"+r.preList[t]+"
"}),b.subParser("makeMarkdown.strikethrough",function(e,r){"use strict";var t="";if(e.hasChildNodes()){t+="~~";for(var a=e.childNodes,n=a.length,s=0;str>th"),i=e.querySelectorAll("tbody>tr");for(t=0;t/g,"\\$1>")).replace(/^#/gm,"\\#")).replace(/^(\s*)([-=]{3,})(\s*)$/,"$1\\$2$3")).replace(/^( {0,3}\d+)\./gm,"$1\\.")).replace(/^( {0,3})([+-])/gm,"$1\\$2")).replace(/]([\s]*)\(/g,"\\]$1\\(")).replace(/^ {0,3}\[([\S \t]*?)]:/gm,"\\[$1]:")}),b.Converter=function(t){"use strict";var s={},o=[],i=[],c={},a=d,l={parsed:{},raw:"",format:""};function n(e,r){if(r=r||null,b.helper.isString(e)){if(r=e=b.helper.stdExtName(e),b.extensions[e])return console.warn("DEPRECATION WARNING: "+e+" is an old extension that uses a deprecated loading method.Please inform the developer that the extension should be updated!"),void function(e,r){"function"==typeof e&&(e=e(new b.Converter));b.helper.isArray(e)||(e=[e]);var t=g(e,r);if(!t.valid)throw Error(t.error);for(var a=0;a[ \t]+¨NBSP;<");var r=b.helper.document.createElement("div");r.innerHTML=e;var t={preList:function(e){for(var r=e.querySelectorAll("pre"),t=[],a=0;a'}else t.push(r[a].innerHTML),r[a].innerHTML="",r[a].setAttribute("prenum",a.toString());return t}(r)};!function e(r){for(var t=0;t { + console.log('require',modname); + return exports[modname]; + } +} + +function translateShowdown(step:BuildStep) { + setupRequireFunction(); + load("showdown.min"); + var showdown = emglobal['showdown']; + var converter = new showdown.Converter({ + tables:'true', + smoothLivePreview:'true', + requireSpaceBeforeHeadingText:'true', + emoji:'true', + }); + var code = workfs[step.path].data as string; // TODO + var html = converter.makeHtml(code); + delete emglobal['require']; + return { + output:html + }; +} + //////////////////////////// var TOOLS = { @@ -1622,6 +1653,7 @@ var TOOLS = { 'jsasm': compileJSASMStep, 'zmac': assembleZMAC, 'bataribasic': compileBatariBasic, + 'markdown': translateShowdown, } var TOOL_PRELOADFS = {