showdown.js 164 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294
  1. ;/*! showdown v 1.7.6 - 24-10-2017 */
  2. (function(){
  3. /**
  4. * Created by Tivie on 13-07-2015.
  5. */
  6. function getDefaultOpts (simple) {
  7. 'use strict';
  8. var defaultOptions = {
  9. omitExtraWLInCodeBlocks: {
  10. defaultValue: false,
  11. describe: 'Omit the default extra whiteline added to code blocks',
  12. type: 'boolean'
  13. },
  14. noHeaderId: {
  15. defaultValue: false,
  16. describe: 'Turn on/off generated header id',
  17. type: 'boolean'
  18. },
  19. prefixHeaderId: {
  20. defaultValue: false,
  21. 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',
  22. type: 'string'
  23. },
  24. rawPrefixHeaderId: {
  25. defaultValue: false,
  26. 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)',
  27. type: 'boolean'
  28. },
  29. ghCompatibleHeaderId: {
  30. defaultValue: false,
  31. describe: 'Generate header ids compatible with github style (spaces are replaced with dashes, a bunch of non alphanumeric chars are removed)',
  32. type: 'boolean'
  33. },
  34. rawHeaderId: {
  35. defaultValue: false,
  36. describe: 'Remove only spaces, \' and " from generated header ids (including prefixes), replacing them with dashes (-). WARNING: This might result in malformed ids',
  37. type: 'boolean'
  38. },
  39. headerLevelStart: {
  40. defaultValue: false,
  41. describe: 'The header blocks level start',
  42. type: 'integer'
  43. },
  44. parseImgDimensions: {
  45. defaultValue: false,
  46. describe: 'Turn on/off image dimension parsing',
  47. type: 'boolean'
  48. },
  49. simplifiedAutoLink: {
  50. defaultValue: false,
  51. describe: 'Turn on/off GFM autolink style',
  52. type: 'boolean'
  53. },
  54. excludeTrailingPunctuationFromURLs: {
  55. defaultValue: false,
  56. describe: 'Excludes trailing punctuation from links generated with autoLinking',
  57. type: 'boolean'
  58. },
  59. literalMidWordUnderscores: {
  60. defaultValue: false,
  61. describe: 'Parse midword underscores as literal underscores',
  62. type: 'boolean'
  63. },
  64. literalMidWordAsterisks: {
  65. defaultValue: false,
  66. describe: 'Parse midword asterisks as literal asterisks',
  67. type: 'boolean'
  68. },
  69. strikethrough: {
  70. defaultValue: false,
  71. describe: 'Turn on/off strikethrough support',
  72. type: 'boolean'
  73. },
  74. tables: {
  75. defaultValue: false,
  76. describe: 'Turn on/off tables support',
  77. type: 'boolean'
  78. },
  79. tablesHeaderId: {
  80. defaultValue: false,
  81. describe: 'Add an id to table headers',
  82. type: 'boolean'
  83. },
  84. ghCodeBlocks: {
  85. defaultValue: true,
  86. describe: 'Turn on/off GFM fenced code blocks support',
  87. type: 'boolean'
  88. },
  89. tasklists: {
  90. defaultValue: false,
  91. describe: 'Turn on/off GFM tasklist support',
  92. type: 'boolean'
  93. },
  94. smoothLivePreview: {
  95. defaultValue: false,
  96. describe: 'Prevents weird effects in live previews due to incomplete input',
  97. type: 'boolean'
  98. },
  99. smartIndentationFix: {
  100. defaultValue: false,
  101. description: 'Tries to smartly fix indentation in es6 strings',
  102. type: 'boolean'
  103. },
  104. disableForced4SpacesIndentedSublists: {
  105. defaultValue: false,
  106. description: 'Disables the requirement of indenting nested sublists by 4 spaces',
  107. type: 'boolean'
  108. },
  109. simpleLineBreaks: {
  110. defaultValue: false,
  111. description: 'Parses simple line breaks as <br> (GFM Style)',
  112. type: 'boolean'
  113. },
  114. requireSpaceBeforeHeadingText: {
  115. defaultValue: false,
  116. description: 'Makes adding a space between `#` and the header text mandatory (GFM Style)',
  117. type: 'boolean'
  118. },
  119. ghMentions: {
  120. defaultValue: false,
  121. description: 'Enables github @mentions',
  122. type: 'boolean'
  123. },
  124. ghMentionsLink: {
  125. defaultValue: 'https://github.com/{u}',
  126. description: 'Changes the link generated by @mentions. Only applies if ghMentions option is enabled.',
  127. type: 'string'
  128. },
  129. encodeEmails: {
  130. defaultValue: true,
  131. description: 'Encode e-mail addresses through the use of Character Entities, transforming ASCII e-mail addresses into its equivalent decimal entities',
  132. type: 'boolean'
  133. },
  134. openLinksInNewWindow: {
  135. defaultValue: false,
  136. description: 'Open all links in new windows',
  137. type: 'boolean'
  138. },
  139. backslashEscapesHTMLTags: {
  140. defaultValue: false,
  141. description: 'Support for HTML Tag escaping. ex: \<div>foo\</div>',
  142. type: 'boolean'
  143. },
  144. emoji: {
  145. defaultValue: false,
  146. description: 'Enable emoji support. Ex: `this is a :smile: emoji`',
  147. type: 'boolean'
  148. },
  149. underline: {
  150. defaultValue: false,
  151. description: 'Enable support for underline. Syntax is double or triple underscores: `__underline word__`. With this option enabled, underscores no longer parses into `<em>` and `<strong>`',
  152. type: 'boolean'
  153. }
  154. };
  155. if (simple === false) {
  156. return JSON.parse(JSON.stringify(defaultOptions));
  157. }
  158. var ret = {};
  159. for (var opt in defaultOptions) {
  160. if (defaultOptions.hasOwnProperty(opt)) {
  161. ret[opt] = defaultOptions[opt].defaultValue;
  162. }
  163. }
  164. return ret;
  165. }
  166. function allOptionsOn () {
  167. 'use strict';
  168. var options = getDefaultOpts(true),
  169. ret = {};
  170. for (var opt in options) {
  171. if (options.hasOwnProperty(opt)) {
  172. ret[opt] = true;
  173. }
  174. }
  175. return ret;
  176. }
  177. /**
  178. * Created by Tivie on 06-01-2015.
  179. */
  180. // Private properties
  181. var showdown = {},
  182. parsers = {},
  183. extensions = {},
  184. globalOptions = getDefaultOpts(true),
  185. setFlavor = 'vanilla',
  186. flavor = {
  187. github: {
  188. omitExtraWLInCodeBlocks: true,
  189. simplifiedAutoLink: true,
  190. excludeTrailingPunctuationFromURLs: true,
  191. literalMidWordUnderscores: true,
  192. strikethrough: true,
  193. tables: true,
  194. tablesHeaderId: true,
  195. ghCodeBlocks: true,
  196. tasklists: true,
  197. disableForced4SpacesIndentedSublists: true,
  198. simpleLineBreaks: true,
  199. requireSpaceBeforeHeadingText: true,
  200. ghCompatibleHeaderId: true,
  201. ghMentions: true,
  202. backslashEscapesHTMLTags: true,
  203. emoji: true
  204. },
  205. original: {
  206. noHeaderId: true,
  207. ghCodeBlocks: false
  208. },
  209. ghost: {
  210. omitExtraWLInCodeBlocks: true,
  211. parseImgDimensions: true,
  212. simplifiedAutoLink: true,
  213. excludeTrailingPunctuationFromURLs: true,
  214. literalMidWordUnderscores: true,
  215. strikethrough: true,
  216. tables: true,
  217. tablesHeaderId: true,
  218. ghCodeBlocks: true,
  219. tasklists: true,
  220. smoothLivePreview: true,
  221. simpleLineBreaks: true,
  222. requireSpaceBeforeHeadingText: true,
  223. ghMentions: false,
  224. encodeEmails: true
  225. },
  226. vanilla: getDefaultOpts(true),
  227. allOn: allOptionsOn()
  228. };
  229. /**
  230. * helper namespace
  231. * @type {{}}
  232. */
  233. showdown.helper = {};
  234. /**
  235. * TODO LEGACY SUPPORT CODE
  236. * @type {{}}
  237. */
  238. showdown.extensions = {};
  239. /**
  240. * Set a global option
  241. * @static
  242. * @param {string} key
  243. * @param {*} value
  244. * @returns {showdown}
  245. */
  246. showdown.setOption = function (key, value) {
  247. 'use strict';
  248. globalOptions[key] = value;
  249. return this;
  250. };
  251. /**
  252. * Get a global option
  253. * @static
  254. * @param {string} key
  255. * @returns {*}
  256. */
  257. showdown.getOption = function (key) {
  258. 'use strict';
  259. return globalOptions[key];
  260. };
  261. /**
  262. * Get the global options
  263. * @static
  264. * @returns {{}}
  265. */
  266. showdown.getOptions = function () {
  267. 'use strict';
  268. return globalOptions;
  269. };
  270. /**
  271. * Reset global options to the default values
  272. * @static
  273. */
  274. showdown.resetOptions = function () {
  275. 'use strict';
  276. globalOptions = getDefaultOpts(true);
  277. };
  278. /**
  279. * Set the flavor showdown should use as default
  280. * @param {string} name
  281. */
  282. showdown.setFlavor = function (name) {
  283. 'use strict';
  284. if (!flavor.hasOwnProperty(name)) {
  285. throw Error(name + ' flavor was not found');
  286. }
  287. showdown.resetOptions();
  288. var preset = flavor[name];
  289. setFlavor = name;
  290. for (var option in preset) {
  291. if (preset.hasOwnProperty(option)) {
  292. globalOptions[option] = preset[option];
  293. }
  294. }
  295. };
  296. /**
  297. * Get the currently set flavor
  298. * @returns {string}
  299. */
  300. showdown.getFlavor = function () {
  301. 'use strict';
  302. return setFlavor;
  303. };
  304. /**
  305. * Get the options of a specified flavor. Returns undefined if the flavor was not found
  306. * @param {string} name Name of the flavor
  307. * @returns {{}|undefined}
  308. */
  309. showdown.getFlavorOptions = function (name) {
  310. 'use strict';
  311. if (flavor.hasOwnProperty(name)) {
  312. return flavor[name];
  313. }
  314. };
  315. /**
  316. * Get the default options
  317. * @static
  318. * @param {boolean} [simple=true]
  319. * @returns {{}}
  320. */
  321. showdown.getDefaultOptions = function (simple) {
  322. 'use strict';
  323. return getDefaultOpts(simple);
  324. };
  325. /**
  326. * Get or set a subParser
  327. *
  328. * subParser(name) - Get a registered subParser
  329. * subParser(name, func) - Register a subParser
  330. * @static
  331. * @param {string} name
  332. * @param {function} [func]
  333. * @returns {*}
  334. */
  335. showdown.subParser = function (name, func) {
  336. 'use strict';
  337. if (showdown.helper.isString(name)) {
  338. if (typeof func !== 'undefined') {
  339. parsers[name] = func;
  340. } else {
  341. if (parsers.hasOwnProperty(name)) {
  342. return parsers[name];
  343. } else {
  344. throw Error('SubParser named ' + name + ' not registered!');
  345. }
  346. }
  347. }
  348. };
  349. /**
  350. * Gets or registers an extension
  351. * @static
  352. * @param {string} name
  353. * @param {object|function=} ext
  354. * @returns {*}
  355. */
  356. showdown.extension = function (name, ext) {
  357. 'use strict';
  358. if (!showdown.helper.isString(name)) {
  359. throw Error('Extension \'name\' must be a string');
  360. }
  361. name = showdown.helper.stdExtName(name);
  362. // Getter
  363. if (showdown.helper.isUndefined(ext)) {
  364. if (!extensions.hasOwnProperty(name)) {
  365. throw Error('Extension named ' + name + ' is not registered!');
  366. }
  367. return extensions[name];
  368. // Setter
  369. } else {
  370. // Expand extension if it's wrapped in a function
  371. if (typeof ext === 'function') {
  372. ext = ext();
  373. }
  374. // Ensure extension is an array
  375. if (!showdown.helper.isArray(ext)) {
  376. ext = [ext];
  377. }
  378. var validExtension = validate(ext, name);
  379. if (validExtension.valid) {
  380. extensions[name] = ext;
  381. } else {
  382. throw Error(validExtension.error);
  383. }
  384. }
  385. };
  386. /**
  387. * Gets all extensions registered
  388. * @returns {{}}
  389. */
  390. showdown.getAllExtensions = function () {
  391. 'use strict';
  392. return extensions;
  393. };
  394. /**
  395. * Remove an extension
  396. * @param {string} name
  397. */
  398. showdown.removeExtension = function (name) {
  399. 'use strict';
  400. delete extensions[name];
  401. };
  402. /**
  403. * Removes all extensions
  404. */
  405. showdown.resetExtensions = function () {
  406. 'use strict';
  407. extensions = {};
  408. };
  409. /**
  410. * Validate extension
  411. * @param {array} extension
  412. * @param {string} name
  413. * @returns {{valid: boolean, error: string}}
  414. */
  415. function validate (extension, name) {
  416. 'use strict';
  417. var errMsg = (name) ? 'Error in ' + name + ' extension->' : 'Error in unnamed extension',
  418. ret = {
  419. valid: true,
  420. error: ''
  421. };
  422. if (!showdown.helper.isArray(extension)) {
  423. extension = [extension];
  424. }
  425. for (var i = 0; i < extension.length; ++i) {
  426. var baseMsg = errMsg + ' sub-extension ' + i + ': ',
  427. ext = extension[i];
  428. if (typeof ext !== 'object') {
  429. ret.valid = false;
  430. ret.error = baseMsg + 'must be an object, but ' + typeof ext + ' given';
  431. return ret;
  432. }
  433. if (!showdown.helper.isString(ext.type)) {
  434. ret.valid = false;
  435. ret.error = baseMsg + 'property "type" must be a string, but ' + typeof ext.type + ' given';
  436. return ret;
  437. }
  438. var type = ext.type = ext.type.toLowerCase();
  439. // normalize extension type
  440. if (type === 'language') {
  441. type = ext.type = 'lang';
  442. }
  443. if (type === 'html') {
  444. type = ext.type = 'output';
  445. }
  446. if (type !== 'lang' && type !== 'output' && type !== 'listener') {
  447. ret.valid = false;
  448. ret.error = baseMsg + 'type ' + type + ' is not recognized. Valid values: "lang/language", "output/html" or "listener"';
  449. return ret;
  450. }
  451. if (type === 'listener') {
  452. if (showdown.helper.isUndefined(ext.listeners)) {
  453. ret.valid = false;
  454. ret.error = baseMsg + '. Extensions of type "listener" must have a property called "listeners"';
  455. return ret;
  456. }
  457. } else {
  458. if (showdown.helper.isUndefined(ext.filter) && showdown.helper.isUndefined(ext.regex)) {
  459. ret.valid = false;
  460. ret.error = baseMsg + type + ' extensions must define either a "regex" property or a "filter" method';
  461. return ret;
  462. }
  463. }
  464. if (ext.listeners) {
  465. if (typeof ext.listeners !== 'object') {
  466. ret.valid = false;
  467. ret.error = baseMsg + '"listeners" property must be an object but ' + typeof ext.listeners + ' given';
  468. return ret;
  469. }
  470. for (var ln in ext.listeners) {
  471. if (ext.listeners.hasOwnProperty(ln)) {
  472. if (typeof ext.listeners[ln] !== 'function') {
  473. ret.valid = false;
  474. ret.error = baseMsg + '"listeners" property must be an hash of [event name]: [callback]. listeners.' + ln +
  475. ' must be a function but ' + typeof ext.listeners[ln] + ' given';
  476. return ret;
  477. }
  478. }
  479. }
  480. }
  481. if (ext.filter) {
  482. if (typeof ext.filter !== 'function') {
  483. ret.valid = false;
  484. ret.error = baseMsg + '"filter" must be a function, but ' + typeof ext.filter + ' given';
  485. return ret;
  486. }
  487. } else if (ext.regex) {
  488. if (showdown.helper.isString(ext.regex)) {
  489. ext.regex = new RegExp(ext.regex, 'g');
  490. }
  491. if (!(ext.regex instanceof RegExp)) {
  492. ret.valid = false;
  493. ret.error = baseMsg + '"regex" property must either be a string or a RegExp object, but ' + typeof ext.regex + ' given';
  494. return ret;
  495. }
  496. if (showdown.helper.isUndefined(ext.replace)) {
  497. ret.valid = false;
  498. ret.error = baseMsg + '"regex" extensions must implement a replace string or function';
  499. return ret;
  500. }
  501. }
  502. }
  503. return ret;
  504. }
  505. /**
  506. * Validate extension
  507. * @param {object} ext
  508. * @returns {boolean}
  509. */
  510. showdown.validateExtension = function (ext) {
  511. 'use strict';
  512. var validateExtension = validate(ext, null);
  513. if (!validateExtension.valid) {
  514. console.warn(validateExtension.error);
  515. return false;
  516. }
  517. return true;
  518. };
  519. /**
  520. * showdownjs helper functions
  521. */
  522. if (!showdown.hasOwnProperty('helper')) {
  523. showdown.helper = {};
  524. }
  525. /**
  526. * Check if var is string
  527. * @static
  528. * @param {string} a
  529. * @returns {boolean}
  530. */
  531. showdown.helper.isString = function (a) {
  532. 'use strict';
  533. return (typeof a === 'string' || a instanceof String);
  534. };
  535. /**
  536. * Check if var is a function
  537. * @static
  538. * @param {*} a
  539. * @returns {boolean}
  540. */
  541. showdown.helper.isFunction = function (a) {
  542. 'use strict';
  543. var getType = {};
  544. return a && getType.toString.call(a) === '[object Function]';
  545. };
  546. /**
  547. * isArray helper function
  548. * @static
  549. * @param {*} a
  550. * @returns {boolean}
  551. */
  552. showdown.helper.isArray = function (a) {
  553. 'use strict';
  554. return Array.isArray(a);
  555. };
  556. /**
  557. * Check if value is undefined
  558. * @static
  559. * @param {*} value The value to check.
  560. * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.
  561. */
  562. showdown.helper.isUndefined = function (value) {
  563. 'use strict';
  564. return typeof value === 'undefined';
  565. };
  566. /**
  567. * ForEach helper function
  568. * Iterates over Arrays and Objects (own properties only)
  569. * @static
  570. * @param {*} obj
  571. * @param {function} callback Accepts 3 params: 1. value, 2. key, 3. the original array/object
  572. */
  573. showdown.helper.forEach = function (obj, callback) {
  574. 'use strict';
  575. // check if obj is defined
  576. if (showdown.helper.isUndefined(obj)) {
  577. throw new Error('obj param is required');
  578. }
  579. if (showdown.helper.isUndefined(callback)) {
  580. throw new Error('callback param is required');
  581. }
  582. if (!showdown.helper.isFunction(callback)) {
  583. throw new Error('callback param must be a function/closure');
  584. }
  585. if (typeof obj.forEach === 'function') {
  586. obj.forEach(callback);
  587. } else if (showdown.helper.isArray(obj)) {
  588. for (var i = 0; i < obj.length; i++) {
  589. callback(obj[i], i, obj);
  590. }
  591. } else if (typeof (obj) === 'object') {
  592. for (var prop in obj) {
  593. if (obj.hasOwnProperty(prop)) {
  594. callback(obj[prop], prop, obj);
  595. }
  596. }
  597. } else {
  598. throw new Error('obj does not seem to be an array or an iterable object');
  599. }
  600. };
  601. /**
  602. * Standardidize extension name
  603. * @static
  604. * @param {string} s extension name
  605. * @returns {string}
  606. */
  607. showdown.helper.stdExtName = function (s) {
  608. 'use strict';
  609. return s.replace(/[_?*+\/\\.^-]/g, '').replace(/\s/g, '').toLowerCase();
  610. };
  611. function escapeCharactersCallback (wholeMatch, m1) {
  612. 'use strict';
  613. var charCodeToEscape = m1.charCodeAt(0);
  614. return '¨E' + charCodeToEscape + 'E';
  615. }
  616. /**
  617. * Callback used to escape characters when passing through String.replace
  618. * @static
  619. * @param {string} wholeMatch
  620. * @param {string} m1
  621. * @returns {string}
  622. */
  623. showdown.helper.escapeCharactersCallback = escapeCharactersCallback;
  624. /**
  625. * Escape characters in a string
  626. * @static
  627. * @param {string} text
  628. * @param {string} charsToEscape
  629. * @param {boolean} afterBackslash
  630. * @returns {XML|string|void|*}
  631. */
  632. showdown.helper.escapeCharacters = function (text, charsToEscape, afterBackslash) {
  633. 'use strict';
  634. // First we have to escape the escape characters so that
  635. // we can build a character class out of them
  636. var regexString = '([' + charsToEscape.replace(/([\[\]\\])/g, '\\$1') + '])';
  637. if (afterBackslash) {
  638. regexString = '\\\\' + regexString;
  639. }
  640. var regex = new RegExp(regexString, 'g');
  641. text = text.replace(regex, escapeCharactersCallback);
  642. return text;
  643. };
  644. var rgxFindMatchPos = function (str, left, right, flags) {
  645. 'use strict';
  646. var f = flags || '',
  647. g = f.indexOf('g') > -1,
  648. x = new RegExp(left + '|' + right, 'g' + f.replace(/g/g, '')),
  649. l = new RegExp(left, f.replace(/g/g, '')),
  650. pos = [],
  651. t, s, m, start, end;
  652. do {
  653. t = 0;
  654. while ((m = x.exec(str))) {
  655. if (l.test(m[0])) {
  656. if (!(t++)) {
  657. s = x.lastIndex;
  658. start = s - m[0].length;
  659. }
  660. } else if (t) {
  661. if (!--t) {
  662. end = m.index + m[0].length;
  663. var obj = {
  664. left: {start: start, end: s},
  665. match: {start: s, end: m.index},
  666. right: {start: m.index, end: end},
  667. wholeMatch: {start: start, end: end}
  668. };
  669. pos.push(obj);
  670. if (!g) {
  671. return pos;
  672. }
  673. }
  674. }
  675. }
  676. } while (t && (x.lastIndex = s));
  677. return pos;
  678. };
  679. /**
  680. * matchRecursiveRegExp
  681. *
  682. * (c) 2007 Steven Levithan <stevenlevithan.com>
  683. * MIT License
  684. *
  685. * Accepts a string to search, a left and right format delimiter
  686. * as regex patterns, and optional regex flags. Returns an array
  687. * of matches, allowing nested instances of left/right delimiters.
  688. * Use the "g" flag to return all matches, otherwise only the
  689. * first is returned. Be careful to ensure that the left and
  690. * right format delimiters produce mutually exclusive matches.
  691. * Backreferences are not supported within the right delimiter
  692. * due to how it is internally combined with the left delimiter.
  693. * When matching strings whose format delimiters are unbalanced
  694. * to the left or right, the output is intentionally as a
  695. * conventional regex library with recursion support would
  696. * produce, e.g. "<<x>" and "<x>>" both produce ["x"] when using
  697. * "<" and ">" as the delimiters (both strings contain a single,
  698. * balanced instance of "<x>").
  699. *
  700. * examples:
  701. * matchRecursiveRegExp("test", "\\(", "\\)")
  702. * returns: []
  703. * matchRecursiveRegExp("<t<<e>><s>>t<>", "<", ">", "g")
  704. * returns: ["t<<e>><s>", ""]
  705. * matchRecursiveRegExp("<div id=\"x\">test</div>", "<div\\b[^>]*>", "</div>", "gi")
  706. * returns: ["test"]
  707. */
  708. showdown.helper.matchRecursiveRegExp = function (str, left, right, flags) {
  709. 'use strict';
  710. var matchPos = rgxFindMatchPos (str, left, right, flags),
  711. results = [];
  712. for (var i = 0; i < matchPos.length; ++i) {
  713. results.push([
  714. str.slice(matchPos[i].wholeMatch.start, matchPos[i].wholeMatch.end),
  715. str.slice(matchPos[i].match.start, matchPos[i].match.end),
  716. str.slice(matchPos[i].left.start, matchPos[i].left.end),
  717. str.slice(matchPos[i].right.start, matchPos[i].right.end)
  718. ]);
  719. }
  720. return results;
  721. };
  722. /**
  723. *
  724. * @param {string} str
  725. * @param {string|function} replacement
  726. * @param {string} left
  727. * @param {string} right
  728. * @param {string} flags
  729. * @returns {string}
  730. */
  731. showdown.helper.replaceRecursiveRegExp = function (str, replacement, left, right, flags) {
  732. 'use strict';
  733. if (!showdown.helper.isFunction(replacement)) {
  734. var repStr = replacement;
  735. replacement = function () {
  736. return repStr;
  737. };
  738. }
  739. var matchPos = rgxFindMatchPos(str, left, right, flags),
  740. finalStr = str,
  741. lng = matchPos.length;
  742. if (lng > 0) {
  743. var bits = [];
  744. if (matchPos[0].wholeMatch.start !== 0) {
  745. bits.push(str.slice(0, matchPos[0].wholeMatch.start));
  746. }
  747. for (var i = 0; i < lng; ++i) {
  748. bits.push(
  749. replacement(
  750. str.slice(matchPos[i].wholeMatch.start, matchPos[i].wholeMatch.end),
  751. str.slice(matchPos[i].match.start, matchPos[i].match.end),
  752. str.slice(matchPos[i].left.start, matchPos[i].left.end),
  753. str.slice(matchPos[i].right.start, matchPos[i].right.end)
  754. )
  755. );
  756. if (i < lng - 1) {
  757. bits.push(str.slice(matchPos[i].wholeMatch.end, matchPos[i + 1].wholeMatch.start));
  758. }
  759. }
  760. if (matchPos[lng - 1].wholeMatch.end < str.length) {
  761. bits.push(str.slice(matchPos[lng - 1].wholeMatch.end));
  762. }
  763. finalStr = bits.join('');
  764. }
  765. return finalStr;
  766. };
  767. /**
  768. * Returns the index within the passed String object of the first occurrence of the specified regex,
  769. * starting the search at fromIndex. Returns -1 if the value is not found.
  770. *
  771. * @param {string} str string to search
  772. * @param {RegExp} regex Regular expression to search
  773. * @param {int} [fromIndex = 0] Index to start the search
  774. * @returns {Number}
  775. * @throws InvalidArgumentError
  776. */
  777. showdown.helper.regexIndexOf = function (str, regex, fromIndex) {
  778. 'use strict';
  779. if (!showdown.helper.isString(str)) {
  780. throw 'InvalidArgumentError: first parameter of showdown.helper.regexIndexOf function must be a string';
  781. }
  782. if (regex instanceof RegExp === false) {
  783. throw 'InvalidArgumentError: second parameter of showdown.helper.regexIndexOf function must be an instance of RegExp';
  784. }
  785. var indexOf = str.substring(fromIndex || 0).search(regex);
  786. return (indexOf >= 0) ? (indexOf + (fromIndex || 0)) : indexOf;
  787. };
  788. /**
  789. * Splits the passed string object at the defined index, and returns an array composed of the two substrings
  790. * @param {string} str string to split
  791. * @param {int} index index to split string at
  792. * @returns {[string,string]}
  793. * @throws InvalidArgumentError
  794. */
  795. showdown.helper.splitAtIndex = function (str, index) {
  796. 'use strict';
  797. if (!showdown.helper.isString(str)) {
  798. throw 'InvalidArgumentError: first parameter of showdown.helper.regexIndexOf function must be a string';
  799. }
  800. return [str.substring(0, index), str.substring(index)];
  801. };
  802. /**
  803. * Obfuscate an e-mail address through the use of Character Entities,
  804. * transforming ASCII characters into their equivalent decimal or hex entities.
  805. *
  806. * Since it has a random component, subsequent calls to this function produce different results
  807. *
  808. * @param {string} mail
  809. * @returns {string}
  810. */
  811. showdown.helper.encodeEmailAddress = function (mail) {
  812. 'use strict';
  813. var encode = [
  814. function (ch) {
  815. return '&#' + ch.charCodeAt(0) + ';';
  816. },
  817. function (ch) {
  818. return '&#x' + ch.charCodeAt(0).toString(16) + ';';
  819. },
  820. function (ch) {
  821. return ch;
  822. }
  823. ];
  824. mail = mail.replace(/./g, function (ch) {
  825. if (ch === '@') {
  826. // this *must* be encoded. I insist.
  827. ch = encode[Math.floor(Math.random() * 2)](ch);
  828. } else {
  829. var r = Math.random();
  830. // roughly 10% raw, 45% hex, 45% dec
  831. ch = (
  832. r > 0.9 ? encode[2](ch) : r > 0.45 ? encode[1](ch) : encode[0](ch)
  833. );
  834. }
  835. return ch;
  836. });
  837. return mail;
  838. };
  839. /**
  840. * POLYFILLS
  841. */
  842. // use this instead of builtin is undefined for IE8 compatibility
  843. if (typeof(console) === 'undefined') {
  844. console = {
  845. warn: function (msg) {
  846. 'use strict';
  847. alert(msg);
  848. },
  849. log: function (msg) {
  850. 'use strict';
  851. alert(msg);
  852. },
  853. error: function (msg) {
  854. 'use strict';
  855. throw msg;
  856. }
  857. };
  858. }
  859. /**
  860. * Common regexes.
  861. * We declare some common regexes to improve performance
  862. */
  863. showdown.helper.regexes = {
  864. asteriskDashAndColon: /([*_:~])/g
  865. };
  866. /**
  867. * EMOJIS LIST
  868. */
  869. showdown.helper.emojis = {
  870. '+1':'\ud83d\udc4d',
  871. '-1':'\ud83d\udc4e',
  872. '100':'\ud83d\udcaf',
  873. '1234':'\ud83d\udd22',
  874. '1st_place_medal':'\ud83e\udd47',
  875. '2nd_place_medal':'\ud83e\udd48',
  876. '3rd_place_medal':'\ud83e\udd49',
  877. '8ball':'\ud83c\udfb1',
  878. 'a':'\ud83c\udd70\ufe0f',
  879. 'ab':'\ud83c\udd8e',
  880. 'abc':'\ud83d\udd24',
  881. 'abcd':'\ud83d\udd21',
  882. 'accept':'\ud83c\ude51',
  883. 'aerial_tramway':'\ud83d\udea1',
  884. 'airplane':'\u2708\ufe0f',
  885. 'alarm_clock':'\u23f0',
  886. 'alembic':'\u2697\ufe0f',
  887. 'alien':'\ud83d\udc7d',
  888. 'ambulance':'\ud83d\ude91',
  889. 'amphora':'\ud83c\udffa',
  890. 'anchor':'\u2693\ufe0f',
  891. 'angel':'\ud83d\udc7c',
  892. 'anger':'\ud83d\udca2',
  893. 'angry':'\ud83d\ude20',
  894. 'anguished':'\ud83d\ude27',
  895. 'ant':'\ud83d\udc1c',
  896. 'apple':'\ud83c\udf4e',
  897. 'aquarius':'\u2652\ufe0f',
  898. 'aries':'\u2648\ufe0f',
  899. 'arrow_backward':'\u25c0\ufe0f',
  900. 'arrow_double_down':'\u23ec',
  901. 'arrow_double_up':'\u23eb',
  902. 'arrow_down':'\u2b07\ufe0f',
  903. 'arrow_down_small':'\ud83d\udd3d',
  904. 'arrow_forward':'\u25b6\ufe0f',
  905. 'arrow_heading_down':'\u2935\ufe0f',
  906. 'arrow_heading_up':'\u2934\ufe0f',
  907. 'arrow_left':'\u2b05\ufe0f',
  908. 'arrow_lower_left':'\u2199\ufe0f',
  909. 'arrow_lower_right':'\u2198\ufe0f',
  910. 'arrow_right':'\u27a1\ufe0f',
  911. 'arrow_right_hook':'\u21aa\ufe0f',
  912. 'arrow_up':'\u2b06\ufe0f',
  913. 'arrow_up_down':'\u2195\ufe0f',
  914. 'arrow_up_small':'\ud83d\udd3c',
  915. 'arrow_upper_left':'\u2196\ufe0f',
  916. 'arrow_upper_right':'\u2197\ufe0f',
  917. 'arrows_clockwise':'\ud83d\udd03',
  918. 'arrows_counterclockwise':'\ud83d\udd04',
  919. 'art':'\ud83c\udfa8',
  920. 'articulated_lorry':'\ud83d\ude9b',
  921. 'artificial_satellite':'\ud83d\udef0',
  922. 'astonished':'\ud83d\ude32',
  923. 'athletic_shoe':'\ud83d\udc5f',
  924. 'atm':'\ud83c\udfe7',
  925. 'atom_symbol':'\u269b\ufe0f',
  926. 'avocado':'\ud83e\udd51',
  927. 'b':'\ud83c\udd71\ufe0f',
  928. 'baby':'\ud83d\udc76',
  929. 'baby_bottle':'\ud83c\udf7c',
  930. 'baby_chick':'\ud83d\udc24',
  931. 'baby_symbol':'\ud83d\udebc',
  932. 'back':'\ud83d\udd19',
  933. 'bacon':'\ud83e\udd53',
  934. 'badminton':'\ud83c\udff8',
  935. 'baggage_claim':'\ud83d\udec4',
  936. 'baguette_bread':'\ud83e\udd56',
  937. 'balance_scale':'\u2696\ufe0f',
  938. 'balloon':'\ud83c\udf88',
  939. 'ballot_box':'\ud83d\uddf3',
  940. 'ballot_box_with_check':'\u2611\ufe0f',
  941. 'bamboo':'\ud83c\udf8d',
  942. 'banana':'\ud83c\udf4c',
  943. 'bangbang':'\u203c\ufe0f',
  944. 'bank':'\ud83c\udfe6',
  945. 'bar_chart':'\ud83d\udcca',
  946. 'barber':'\ud83d\udc88',
  947. 'baseball':'\u26be\ufe0f',
  948. 'basketball':'\ud83c\udfc0',
  949. 'basketball_man':'\u26f9\ufe0f',
  950. 'basketball_woman':'\u26f9\ufe0f&zwj;\u2640\ufe0f',
  951. 'bat':'\ud83e\udd87',
  952. 'bath':'\ud83d\udec0',
  953. 'bathtub':'\ud83d\udec1',
  954. 'battery':'\ud83d\udd0b',
  955. 'beach_umbrella':'\ud83c\udfd6',
  956. 'bear':'\ud83d\udc3b',
  957. 'bed':'\ud83d\udecf',
  958. 'bee':'\ud83d\udc1d',
  959. 'beer':'\ud83c\udf7a',
  960. 'beers':'\ud83c\udf7b',
  961. 'beetle':'\ud83d\udc1e',
  962. 'beginner':'\ud83d\udd30',
  963. 'bell':'\ud83d\udd14',
  964. 'bellhop_bell':'\ud83d\udece',
  965. 'bento':'\ud83c\udf71',
  966. 'biking_man':'\ud83d\udeb4',
  967. 'bike':'\ud83d\udeb2',
  968. 'biking_woman':'\ud83d\udeb4&zwj;\u2640\ufe0f',
  969. 'bikini':'\ud83d\udc59',
  970. 'biohazard':'\u2623\ufe0f',
  971. 'bird':'\ud83d\udc26',
  972. 'birthday':'\ud83c\udf82',
  973. 'black_circle':'\u26ab\ufe0f',
  974. 'black_flag':'\ud83c\udff4',
  975. 'black_heart':'\ud83d\udda4',
  976. 'black_joker':'\ud83c\udccf',
  977. 'black_large_square':'\u2b1b\ufe0f',
  978. 'black_medium_small_square':'\u25fe\ufe0f',
  979. 'black_medium_square':'\u25fc\ufe0f',
  980. 'black_nib':'\u2712\ufe0f',
  981. 'black_small_square':'\u25aa\ufe0f',
  982. 'black_square_button':'\ud83d\udd32',
  983. 'blonde_man':'\ud83d\udc71',
  984. 'blonde_woman':'\ud83d\udc71&zwj;\u2640\ufe0f',
  985. 'blossom':'\ud83c\udf3c',
  986. 'blowfish':'\ud83d\udc21',
  987. 'blue_book':'\ud83d\udcd8',
  988. 'blue_car':'\ud83d\ude99',
  989. 'blue_heart':'\ud83d\udc99',
  990. 'blush':'\ud83d\ude0a',
  991. 'boar':'\ud83d\udc17',
  992. 'boat':'\u26f5\ufe0f',
  993. 'bomb':'\ud83d\udca3',
  994. 'book':'\ud83d\udcd6',
  995. 'bookmark':'\ud83d\udd16',
  996. 'bookmark_tabs':'\ud83d\udcd1',
  997. 'books':'\ud83d\udcda',
  998. 'boom':'\ud83d\udca5',
  999. 'boot':'\ud83d\udc62',
  1000. 'bouquet':'\ud83d\udc90',
  1001. 'bowing_man':'\ud83d\ude47',
  1002. 'bow_and_arrow':'\ud83c\udff9',
  1003. 'bowing_woman':'\ud83d\ude47&zwj;\u2640\ufe0f',
  1004. 'bowling':'\ud83c\udfb3',
  1005. 'boxing_glove':'\ud83e\udd4a',
  1006. 'boy':'\ud83d\udc66',
  1007. 'bread':'\ud83c\udf5e',
  1008. 'bride_with_veil':'\ud83d\udc70',
  1009. 'bridge_at_night':'\ud83c\udf09',
  1010. 'briefcase':'\ud83d\udcbc',
  1011. 'broken_heart':'\ud83d\udc94',
  1012. 'bug':'\ud83d\udc1b',
  1013. 'building_construction':'\ud83c\udfd7',
  1014. 'bulb':'\ud83d\udca1',
  1015. 'bullettrain_front':'\ud83d\ude85',
  1016. 'bullettrain_side':'\ud83d\ude84',
  1017. 'burrito':'\ud83c\udf2f',
  1018. 'bus':'\ud83d\ude8c',
  1019. 'business_suit_levitating':'\ud83d\udd74',
  1020. 'busstop':'\ud83d\ude8f',
  1021. 'bust_in_silhouette':'\ud83d\udc64',
  1022. 'busts_in_silhouette':'\ud83d\udc65',
  1023. 'butterfly':'\ud83e\udd8b',
  1024. 'cactus':'\ud83c\udf35',
  1025. 'cake':'\ud83c\udf70',
  1026. 'calendar':'\ud83d\udcc6',
  1027. 'call_me_hand':'\ud83e\udd19',
  1028. 'calling':'\ud83d\udcf2',
  1029. 'camel':'\ud83d\udc2b',
  1030. 'camera':'\ud83d\udcf7',
  1031. 'camera_flash':'\ud83d\udcf8',
  1032. 'camping':'\ud83c\udfd5',
  1033. 'cancer':'\u264b\ufe0f',
  1034. 'candle':'\ud83d\udd6f',
  1035. 'candy':'\ud83c\udf6c',
  1036. 'canoe':'\ud83d\udef6',
  1037. 'capital_abcd':'\ud83d\udd20',
  1038. 'capricorn':'\u2651\ufe0f',
  1039. 'car':'\ud83d\ude97',
  1040. 'card_file_box':'\ud83d\uddc3',
  1041. 'card_index':'\ud83d\udcc7',
  1042. 'card_index_dividers':'\ud83d\uddc2',
  1043. 'carousel_horse':'\ud83c\udfa0',
  1044. 'carrot':'\ud83e\udd55',
  1045. 'cat':'\ud83d\udc31',
  1046. 'cat2':'\ud83d\udc08',
  1047. 'cd':'\ud83d\udcbf',
  1048. 'chains':'\u26d3',
  1049. 'champagne':'\ud83c\udf7e',
  1050. 'chart':'\ud83d\udcb9',
  1051. 'chart_with_downwards_trend':'\ud83d\udcc9',
  1052. 'chart_with_upwards_trend':'\ud83d\udcc8',
  1053. 'checkered_flag':'\ud83c\udfc1',
  1054. 'cheese':'\ud83e\uddc0',
  1055. 'cherries':'\ud83c\udf52',
  1056. 'cherry_blossom':'\ud83c\udf38',
  1057. 'chestnut':'\ud83c\udf30',
  1058. 'chicken':'\ud83d\udc14',
  1059. 'children_crossing':'\ud83d\udeb8',
  1060. 'chipmunk':'\ud83d\udc3f',
  1061. 'chocolate_bar':'\ud83c\udf6b',
  1062. 'christmas_tree':'\ud83c\udf84',
  1063. 'church':'\u26ea\ufe0f',
  1064. 'cinema':'\ud83c\udfa6',
  1065. 'circus_tent':'\ud83c\udfaa',
  1066. 'city_sunrise':'\ud83c\udf07',
  1067. 'city_sunset':'\ud83c\udf06',
  1068. 'cityscape':'\ud83c\udfd9',
  1069. 'cl':'\ud83c\udd91',
  1070. 'clamp':'\ud83d\udddc',
  1071. 'clap':'\ud83d\udc4f',
  1072. 'clapper':'\ud83c\udfac',
  1073. 'classical_building':'\ud83c\udfdb',
  1074. 'clinking_glasses':'\ud83e\udd42',
  1075. 'clipboard':'\ud83d\udccb',
  1076. 'clock1':'\ud83d\udd50',
  1077. 'clock10':'\ud83d\udd59',
  1078. 'clock1030':'\ud83d\udd65',
  1079. 'clock11':'\ud83d\udd5a',
  1080. 'clock1130':'\ud83d\udd66',
  1081. 'clock12':'\ud83d\udd5b',
  1082. 'clock1230':'\ud83d\udd67',
  1083. 'clock130':'\ud83d\udd5c',
  1084. 'clock2':'\ud83d\udd51',
  1085. 'clock230':'\ud83d\udd5d',
  1086. 'clock3':'\ud83d\udd52',
  1087. 'clock330':'\ud83d\udd5e',
  1088. 'clock4':'\ud83d\udd53',
  1089. 'clock430':'\ud83d\udd5f',
  1090. 'clock5':'\ud83d\udd54',
  1091. 'clock530':'\ud83d\udd60',
  1092. 'clock6':'\ud83d\udd55',
  1093. 'clock630':'\ud83d\udd61',
  1094. 'clock7':'\ud83d\udd56',
  1095. 'clock730':'\ud83d\udd62',
  1096. 'clock8':'\ud83d\udd57',
  1097. 'clock830':'\ud83d\udd63',
  1098. 'clock9':'\ud83d\udd58',
  1099. 'clock930':'\ud83d\udd64',
  1100. 'closed_book':'\ud83d\udcd5',
  1101. 'closed_lock_with_key':'\ud83d\udd10',
  1102. 'closed_umbrella':'\ud83c\udf02',
  1103. 'cloud':'\u2601\ufe0f',
  1104. 'cloud_with_lightning':'\ud83c\udf29',
  1105. 'cloud_with_lightning_and_rain':'\u26c8',
  1106. 'cloud_with_rain':'\ud83c\udf27',
  1107. 'cloud_with_snow':'\ud83c\udf28',
  1108. 'clown_face':'\ud83e\udd21',
  1109. 'clubs':'\u2663\ufe0f',
  1110. 'cocktail':'\ud83c\udf78',
  1111. 'coffee':'\u2615\ufe0f',
  1112. 'coffin':'\u26b0\ufe0f',
  1113. 'cold_sweat':'\ud83d\ude30',
  1114. 'comet':'\u2604\ufe0f',
  1115. 'computer':'\ud83d\udcbb',
  1116. 'computer_mouse':'\ud83d\uddb1',
  1117. 'confetti_ball':'\ud83c\udf8a',
  1118. 'confounded':'\ud83d\ude16',
  1119. 'confused':'\ud83d\ude15',
  1120. 'congratulations':'\u3297\ufe0f',
  1121. 'construction':'\ud83d\udea7',
  1122. 'construction_worker_man':'\ud83d\udc77',
  1123. 'construction_worker_woman':'\ud83d\udc77&zwj;\u2640\ufe0f',
  1124. 'control_knobs':'\ud83c\udf9b',
  1125. 'convenience_store':'\ud83c\udfea',
  1126. 'cookie':'\ud83c\udf6a',
  1127. 'cool':'\ud83c\udd92',
  1128. 'policeman':'\ud83d\udc6e',
  1129. 'copyright':'\u00a9\ufe0f',
  1130. 'corn':'\ud83c\udf3d',
  1131. 'couch_and_lamp':'\ud83d\udecb',
  1132. 'couple':'\ud83d\udc6b',
  1133. 'couple_with_heart_woman_man':'\ud83d\udc91',
  1134. 'couple_with_heart_man_man':'\ud83d\udc68&zwj;\u2764\ufe0f&zwj;\ud83d\udc68',
  1135. 'couple_with_heart_woman_woman':'\ud83d\udc69&zwj;\u2764\ufe0f&zwj;\ud83d\udc69',
  1136. 'couplekiss_man_man':'\ud83d\udc68&zwj;\u2764\ufe0f&zwj;\ud83d\udc8b&zwj;\ud83d\udc68',
  1137. 'couplekiss_man_woman':'\ud83d\udc8f',
  1138. 'couplekiss_woman_woman':'\ud83d\udc69&zwj;\u2764\ufe0f&zwj;\ud83d\udc8b&zwj;\ud83d\udc69',
  1139. 'cow':'\ud83d\udc2e',
  1140. 'cow2':'\ud83d\udc04',
  1141. 'cowboy_hat_face':'\ud83e\udd20',
  1142. 'crab':'\ud83e\udd80',
  1143. 'crayon':'\ud83d\udd8d',
  1144. 'credit_card':'\ud83d\udcb3',
  1145. 'crescent_moon':'\ud83c\udf19',
  1146. 'cricket':'\ud83c\udfcf',
  1147. 'crocodile':'\ud83d\udc0a',
  1148. 'croissant':'\ud83e\udd50',
  1149. 'crossed_fingers':'\ud83e\udd1e',
  1150. 'crossed_flags':'\ud83c\udf8c',
  1151. 'crossed_swords':'\u2694\ufe0f',
  1152. 'crown':'\ud83d\udc51',
  1153. 'cry':'\ud83d\ude22',
  1154. 'crying_cat_face':'\ud83d\ude3f',
  1155. 'crystal_ball':'\ud83d\udd2e',
  1156. 'cucumber':'\ud83e\udd52',
  1157. 'cupid':'\ud83d\udc98',
  1158. 'curly_loop':'\u27b0',
  1159. 'currency_exchange':'\ud83d\udcb1',
  1160. 'curry':'\ud83c\udf5b',
  1161. 'custard':'\ud83c\udf6e',
  1162. 'customs':'\ud83d\udec3',
  1163. 'cyclone':'\ud83c\udf00',
  1164. 'dagger':'\ud83d\udde1',
  1165. 'dancer':'\ud83d\udc83',
  1166. 'dancing_women':'\ud83d\udc6f',
  1167. 'dancing_men':'\ud83d\udc6f&zwj;\u2642\ufe0f',
  1168. 'dango':'\ud83c\udf61',
  1169. 'dark_sunglasses':'\ud83d\udd76',
  1170. 'dart':'\ud83c\udfaf',
  1171. 'dash':'\ud83d\udca8',
  1172. 'date':'\ud83d\udcc5',
  1173. 'deciduous_tree':'\ud83c\udf33',
  1174. 'deer':'\ud83e\udd8c',
  1175. 'department_store':'\ud83c\udfec',
  1176. 'derelict_house':'\ud83c\udfda',
  1177. 'desert':'\ud83c\udfdc',
  1178. 'desert_island':'\ud83c\udfdd',
  1179. 'desktop_computer':'\ud83d\udda5',
  1180. 'male_detective':'\ud83d\udd75\ufe0f',
  1181. 'diamond_shape_with_a_dot_inside':'\ud83d\udca0',
  1182. 'diamonds':'\u2666\ufe0f',
  1183. 'disappointed':'\ud83d\ude1e',
  1184. 'disappointed_relieved':'\ud83d\ude25',
  1185. 'dizzy':'\ud83d\udcab',
  1186. 'dizzy_face':'\ud83d\ude35',
  1187. 'do_not_litter':'\ud83d\udeaf',
  1188. 'dog':'\ud83d\udc36',
  1189. 'dog2':'\ud83d\udc15',
  1190. 'dollar':'\ud83d\udcb5',
  1191. 'dolls':'\ud83c\udf8e',
  1192. 'dolphin':'\ud83d\udc2c',
  1193. 'door':'\ud83d\udeaa',
  1194. 'doughnut':'\ud83c\udf69',
  1195. 'dove':'\ud83d\udd4a',
  1196. 'dragon':'\ud83d\udc09',
  1197. 'dragon_face':'\ud83d\udc32',
  1198. 'dress':'\ud83d\udc57',
  1199. 'dromedary_camel':'\ud83d\udc2a',
  1200. 'drooling_face':'\ud83e\udd24',
  1201. 'droplet':'\ud83d\udca7',
  1202. 'drum':'\ud83e\udd41',
  1203. 'duck':'\ud83e\udd86',
  1204. 'dvd':'\ud83d\udcc0',
  1205. 'e-mail':'\ud83d\udce7',
  1206. 'eagle':'\ud83e\udd85',
  1207. 'ear':'\ud83d\udc42',
  1208. 'ear_of_rice':'\ud83c\udf3e',
  1209. 'earth_africa':'\ud83c\udf0d',
  1210. 'earth_americas':'\ud83c\udf0e',
  1211. 'earth_asia':'\ud83c\udf0f',
  1212. 'egg':'\ud83e\udd5a',
  1213. 'eggplant':'\ud83c\udf46',
  1214. 'eight_pointed_black_star':'\u2734\ufe0f',
  1215. 'eight_spoked_asterisk':'\u2733\ufe0f',
  1216. 'electric_plug':'\ud83d\udd0c',
  1217. 'elephant':'\ud83d\udc18',
  1218. 'email':'\u2709\ufe0f',
  1219. 'end':'\ud83d\udd1a',
  1220. 'envelope_with_arrow':'\ud83d\udce9',
  1221. 'euro':'\ud83d\udcb6',
  1222. 'european_castle':'\ud83c\udff0',
  1223. 'european_post_office':'\ud83c\udfe4',
  1224. 'evergreen_tree':'\ud83c\udf32',
  1225. 'exclamation':'\u2757\ufe0f',
  1226. 'expressionless':'\ud83d\ude11',
  1227. 'eye':'\ud83d\udc41',
  1228. 'eye_speech_bubble':'\ud83d\udc41&zwj;\ud83d\udde8',
  1229. 'eyeglasses':'\ud83d\udc53',
  1230. 'eyes':'\ud83d\udc40',
  1231. 'face_with_head_bandage':'\ud83e\udd15',
  1232. 'face_with_thermometer':'\ud83e\udd12',
  1233. 'fist_oncoming':'\ud83d\udc4a',
  1234. 'factory':'\ud83c\udfed',
  1235. 'fallen_leaf':'\ud83c\udf42',
  1236. 'family_man_woman_boy':'\ud83d\udc6a',
  1237. 'family_man_boy':'\ud83d\udc68&zwj;\ud83d\udc66',
  1238. 'family_man_boy_boy':'\ud83d\udc68&zwj;\ud83d\udc66&zwj;\ud83d\udc66',
  1239. 'family_man_girl':'\ud83d\udc68&zwj;\ud83d\udc67',
  1240. 'family_man_girl_boy':'\ud83d\udc68&zwj;\ud83d\udc67&zwj;\ud83d\udc66',
  1241. 'family_man_girl_girl':'\ud83d\udc68&zwj;\ud83d\udc67&zwj;\ud83d\udc67',
  1242. 'family_man_man_boy':'\ud83d\udc68&zwj;\ud83d\udc68&zwj;\ud83d\udc66',
  1243. 'family_man_man_boy_boy':'\ud83d\udc68&zwj;\ud83d\udc68&zwj;\ud83d\udc66&zwj;\ud83d\udc66',
  1244. 'family_man_man_girl':'\ud83d\udc68&zwj;\ud83d\udc68&zwj;\ud83d\udc67',
  1245. 'family_man_man_girl_boy':'\ud83d\udc68&zwj;\ud83d\udc68&zwj;\ud83d\udc67&zwj;\ud83d\udc66',
  1246. 'family_man_man_girl_girl':'\ud83d\udc68&zwj;\ud83d\udc68&zwj;\ud83d\udc67&zwj;\ud83d\udc67',
  1247. 'family_man_woman_boy_boy':'\ud83d\udc68&zwj;\ud83d\udc69&zwj;\ud83d\udc66&zwj;\ud83d\udc66',
  1248. 'family_man_woman_girl':'\ud83d\udc68&zwj;\ud83d\udc69&zwj;\ud83d\udc67',
  1249. 'family_man_woman_girl_boy':'\ud83d\udc68&zwj;\ud83d\udc69&zwj;\ud83d\udc67&zwj;\ud83d\udc66',
  1250. 'family_man_woman_girl_girl':'\ud83d\udc68&zwj;\ud83d\udc69&zwj;\ud83d\udc67&zwj;\ud83d\udc67',
  1251. 'family_woman_boy':'\ud83d\udc69&zwj;\ud83d\udc66',
  1252. 'family_woman_boy_boy':'\ud83d\udc69&zwj;\ud83d\udc66&zwj;\ud83d\udc66',
  1253. 'family_woman_girl':'\ud83d\udc69&zwj;\ud83d\udc67',
  1254. 'family_woman_girl_boy':'\ud83d\udc69&zwj;\ud83d\udc67&zwj;\ud83d\udc66',
  1255. 'family_woman_girl_girl':'\ud83d\udc69&zwj;\ud83d\udc67&zwj;\ud83d\udc67',
  1256. 'family_woman_woman_boy':'\ud83d\udc69&zwj;\ud83d\udc69&zwj;\ud83d\udc66',
  1257. 'family_woman_woman_boy_boy':'\ud83d\udc69&zwj;\ud83d\udc69&zwj;\ud83d\udc66&zwj;\ud83d\udc66',
  1258. 'family_woman_woman_girl':'\ud83d\udc69&zwj;\ud83d\udc69&zwj;\ud83d\udc67',
  1259. 'family_woman_woman_girl_boy':'\ud83d\udc69&zwj;\ud83d\udc69&zwj;\ud83d\udc67&zwj;\ud83d\udc66',
  1260. 'family_woman_woman_girl_girl':'\ud83d\udc69&zwj;\ud83d\udc69&zwj;\ud83d\udc67&zwj;\ud83d\udc67',
  1261. 'fast_forward':'\u23e9',
  1262. 'fax':'\ud83d\udce0',
  1263. 'fearful':'\ud83d\ude28',
  1264. 'feet':'\ud83d\udc3e',
  1265. 'female_detective':'\ud83d\udd75\ufe0f&zwj;\u2640\ufe0f',
  1266. 'ferris_wheel':'\ud83c\udfa1',
  1267. 'ferry':'\u26f4',
  1268. 'field_hockey':'\ud83c\udfd1',
  1269. 'file_cabinet':'\ud83d\uddc4',
  1270. 'file_folder':'\ud83d\udcc1',
  1271. 'film_projector':'\ud83d\udcfd',
  1272. 'film_strip':'\ud83c\udf9e',
  1273. 'fire':'\ud83d\udd25',
  1274. 'fire_engine':'\ud83d\ude92',
  1275. 'fireworks':'\ud83c\udf86',
  1276. 'first_quarter_moon':'\ud83c\udf13',
  1277. 'first_quarter_moon_with_face':'\ud83c\udf1b',
  1278. 'fish':'\ud83d\udc1f',
  1279. 'fish_cake':'\ud83c\udf65',
  1280. 'fishing_pole_and_fish':'\ud83c\udfa3',
  1281. 'fist_raised':'\u270a',
  1282. 'fist_left':'\ud83e\udd1b',
  1283. 'fist_right':'\ud83e\udd1c',
  1284. 'flags':'\ud83c\udf8f',
  1285. 'flashlight':'\ud83d\udd26',
  1286. 'fleur_de_lis':'\u269c\ufe0f',
  1287. 'flight_arrival':'\ud83d\udeec',
  1288. 'flight_departure':'\ud83d\udeeb',
  1289. 'floppy_disk':'\ud83d\udcbe',
  1290. 'flower_playing_cards':'\ud83c\udfb4',
  1291. 'flushed':'\ud83d\ude33',
  1292. 'fog':'\ud83c\udf2b',
  1293. 'foggy':'\ud83c\udf01',
  1294. 'football':'\ud83c\udfc8',
  1295. 'footprints':'\ud83d\udc63',
  1296. 'fork_and_knife':'\ud83c\udf74',
  1297. 'fountain':'\u26f2\ufe0f',
  1298. 'fountain_pen':'\ud83d\udd8b',
  1299. 'four_leaf_clover':'\ud83c\udf40',
  1300. 'fox_face':'\ud83e\udd8a',
  1301. 'framed_picture':'\ud83d\uddbc',
  1302. 'free':'\ud83c\udd93',
  1303. 'fried_egg':'\ud83c\udf73',
  1304. 'fried_shrimp':'\ud83c\udf64',
  1305. 'fries':'\ud83c\udf5f',
  1306. 'frog':'\ud83d\udc38',
  1307. 'frowning':'\ud83d\ude26',
  1308. 'frowning_face':'\u2639\ufe0f',
  1309. 'frowning_man':'\ud83d\ude4d&zwj;\u2642\ufe0f',
  1310. 'frowning_woman':'\ud83d\ude4d',
  1311. 'middle_finger':'\ud83d\udd95',
  1312. 'fuelpump':'\u26fd\ufe0f',
  1313. 'full_moon':'\ud83c\udf15',
  1314. 'full_moon_with_face':'\ud83c\udf1d',
  1315. 'funeral_urn':'\u26b1\ufe0f',
  1316. 'game_die':'\ud83c\udfb2',
  1317. 'gear':'\u2699\ufe0f',
  1318. 'gem':'\ud83d\udc8e',
  1319. 'gemini':'\u264a\ufe0f',
  1320. 'ghost':'\ud83d\udc7b',
  1321. 'gift':'\ud83c\udf81',
  1322. 'gift_heart':'\ud83d\udc9d',
  1323. 'girl':'\ud83d\udc67',
  1324. 'globe_with_meridians':'\ud83c\udf10',
  1325. 'goal_net':'\ud83e\udd45',
  1326. 'goat':'\ud83d\udc10',
  1327. 'golf':'\u26f3\ufe0f',
  1328. 'golfing_man':'\ud83c\udfcc\ufe0f',
  1329. 'golfing_woman':'\ud83c\udfcc\ufe0f&zwj;\u2640\ufe0f',
  1330. 'gorilla':'\ud83e\udd8d',
  1331. 'grapes':'\ud83c\udf47',
  1332. 'green_apple':'\ud83c\udf4f',
  1333. 'green_book':'\ud83d\udcd7',
  1334. 'green_heart':'\ud83d\udc9a',
  1335. 'green_salad':'\ud83e\udd57',
  1336. 'grey_exclamation':'\u2755',
  1337. 'grey_question':'\u2754',
  1338. 'grimacing':'\ud83d\ude2c',
  1339. 'grin':'\ud83d\ude01',
  1340. 'grinning':'\ud83d\ude00',
  1341. 'guardsman':'\ud83d\udc82',
  1342. 'guardswoman':'\ud83d\udc82&zwj;\u2640\ufe0f',
  1343. 'guitar':'\ud83c\udfb8',
  1344. 'gun':'\ud83d\udd2b',
  1345. 'haircut_woman':'\ud83d\udc87',
  1346. 'haircut_man':'\ud83d\udc87&zwj;\u2642\ufe0f',
  1347. 'hamburger':'\ud83c\udf54',
  1348. 'hammer':'\ud83d\udd28',
  1349. 'hammer_and_pick':'\u2692',
  1350. 'hammer_and_wrench':'\ud83d\udee0',
  1351. 'hamster':'\ud83d\udc39',
  1352. 'hand':'\u270b',
  1353. 'handbag':'\ud83d\udc5c',
  1354. 'handshake':'\ud83e\udd1d',
  1355. 'hankey':'\ud83d\udca9',
  1356. 'hatched_chick':'\ud83d\udc25',
  1357. 'hatching_chick':'\ud83d\udc23',
  1358. 'headphones':'\ud83c\udfa7',
  1359. 'hear_no_evil':'\ud83d\ude49',
  1360. 'heart':'\u2764\ufe0f',
  1361. 'heart_decoration':'\ud83d\udc9f',
  1362. 'heart_eyes':'\ud83d\ude0d',
  1363. 'heart_eyes_cat':'\ud83d\ude3b',
  1364. 'heartbeat':'\ud83d\udc93',
  1365. 'heartpulse':'\ud83d\udc97',
  1366. 'hearts':'\u2665\ufe0f',
  1367. 'heavy_check_mark':'\u2714\ufe0f',
  1368. 'heavy_division_sign':'\u2797',
  1369. 'heavy_dollar_sign':'\ud83d\udcb2',
  1370. 'heavy_heart_exclamation':'\u2763\ufe0f',
  1371. 'heavy_minus_sign':'\u2796',
  1372. 'heavy_multiplication_x':'\u2716\ufe0f',
  1373. 'heavy_plus_sign':'\u2795',
  1374. 'helicopter':'\ud83d\ude81',
  1375. 'herb':'\ud83c\udf3f',
  1376. 'hibiscus':'\ud83c\udf3a',
  1377. 'high_brightness':'\ud83d\udd06',
  1378. 'high_heel':'\ud83d\udc60',
  1379. 'hocho':'\ud83d\udd2a',
  1380. 'hole':'\ud83d\udd73',
  1381. 'honey_pot':'\ud83c\udf6f',
  1382. 'horse':'\ud83d\udc34',
  1383. 'horse_racing':'\ud83c\udfc7',
  1384. 'hospital':'\ud83c\udfe5',
  1385. 'hot_pepper':'\ud83c\udf36',
  1386. 'hotdog':'\ud83c\udf2d',
  1387. 'hotel':'\ud83c\udfe8',
  1388. 'hotsprings':'\u2668\ufe0f',
  1389. 'hourglass':'\u231b\ufe0f',
  1390. 'hourglass_flowing_sand':'\u23f3',
  1391. 'house':'\ud83c\udfe0',
  1392. 'house_with_garden':'\ud83c\udfe1',
  1393. 'houses':'\ud83c\udfd8',
  1394. 'hugs':'\ud83e\udd17',
  1395. 'hushed':'\ud83d\ude2f',
  1396. 'ice_cream':'\ud83c\udf68',
  1397. 'ice_hockey':'\ud83c\udfd2',
  1398. 'ice_skate':'\u26f8',
  1399. 'icecream':'\ud83c\udf66',
  1400. 'id':'\ud83c\udd94',
  1401. 'ideograph_advantage':'\ud83c\ude50',
  1402. 'imp':'\ud83d\udc7f',
  1403. 'inbox_tray':'\ud83d\udce5',
  1404. 'incoming_envelope':'\ud83d\udce8',
  1405. 'tipping_hand_woman':'\ud83d\udc81',
  1406. 'information_source':'\u2139\ufe0f',
  1407. 'innocent':'\ud83d\ude07',
  1408. 'interrobang':'\u2049\ufe0f',
  1409. 'iphone':'\ud83d\udcf1',
  1410. 'izakaya_lantern':'\ud83c\udfee',
  1411. 'jack_o_lantern':'\ud83c\udf83',
  1412. 'japan':'\ud83d\uddfe',
  1413. 'japanese_castle':'\ud83c\udfef',
  1414. 'japanese_goblin':'\ud83d\udc7a',
  1415. 'japanese_ogre':'\ud83d\udc79',
  1416. 'jeans':'\ud83d\udc56',
  1417. 'joy':'\ud83d\ude02',
  1418. 'joy_cat':'\ud83d\ude39',
  1419. 'joystick':'\ud83d\udd79',
  1420. 'kaaba':'\ud83d\udd4b',
  1421. 'key':'\ud83d\udd11',
  1422. 'keyboard':'\u2328\ufe0f',
  1423. 'keycap_ten':'\ud83d\udd1f',
  1424. 'kick_scooter':'\ud83d\udef4',
  1425. 'kimono':'\ud83d\udc58',
  1426. 'kiss':'\ud83d\udc8b',
  1427. 'kissing':'\ud83d\ude17',
  1428. 'kissing_cat':'\ud83d\ude3d',
  1429. 'kissing_closed_eyes':'\ud83d\ude1a',
  1430. 'kissing_heart':'\ud83d\ude18',
  1431. 'kissing_smiling_eyes':'\ud83d\ude19',
  1432. 'kiwi_fruit':'\ud83e\udd5d',
  1433. 'koala':'\ud83d\udc28',
  1434. 'koko':'\ud83c\ude01',
  1435. 'label':'\ud83c\udff7',
  1436. 'large_blue_circle':'\ud83d\udd35',
  1437. 'large_blue_diamond':'\ud83d\udd37',
  1438. 'large_orange_diamond':'\ud83d\udd36',
  1439. 'last_quarter_moon':'\ud83c\udf17',
  1440. 'last_quarter_moon_with_face':'\ud83c\udf1c',
  1441. 'latin_cross':'\u271d\ufe0f',
  1442. 'laughing':'\ud83d\ude06',
  1443. 'leaves':'\ud83c\udf43',
  1444. 'ledger':'\ud83d\udcd2',
  1445. 'left_luggage':'\ud83d\udec5',
  1446. 'left_right_arrow':'\u2194\ufe0f',
  1447. 'leftwards_arrow_with_hook':'\u21a9\ufe0f',
  1448. 'lemon':'\ud83c\udf4b',
  1449. 'leo':'\u264c\ufe0f',
  1450. 'leopard':'\ud83d\udc06',
  1451. 'level_slider':'\ud83c\udf9a',
  1452. 'libra':'\u264e\ufe0f',
  1453. 'light_rail':'\ud83d\ude88',
  1454. 'link':'\ud83d\udd17',
  1455. 'lion':'\ud83e\udd81',
  1456. 'lips':'\ud83d\udc44',
  1457. 'lipstick':'\ud83d\udc84',
  1458. 'lizard':'\ud83e\udd8e',
  1459. 'lock':'\ud83d\udd12',
  1460. 'lock_with_ink_pen':'\ud83d\udd0f',
  1461. 'lollipop':'\ud83c\udf6d',
  1462. 'loop':'\u27bf',
  1463. 'loud_sound':'\ud83d\udd0a',
  1464. 'loudspeaker':'\ud83d\udce2',
  1465. 'love_hotel':'\ud83c\udfe9',
  1466. 'love_letter':'\ud83d\udc8c',
  1467. 'low_brightness':'\ud83d\udd05',
  1468. 'lying_face':'\ud83e\udd25',
  1469. 'm':'\u24c2\ufe0f',
  1470. 'mag':'\ud83d\udd0d',
  1471. 'mag_right':'\ud83d\udd0e',
  1472. 'mahjong':'\ud83c\udc04\ufe0f',
  1473. 'mailbox':'\ud83d\udceb',
  1474. 'mailbox_closed':'\ud83d\udcea',
  1475. 'mailbox_with_mail':'\ud83d\udcec',
  1476. 'mailbox_with_no_mail':'\ud83d\udced',
  1477. 'man':'\ud83d\udc68',
  1478. 'man_artist':'\ud83d\udc68&zwj;\ud83c\udfa8',
  1479. 'man_astronaut':'\ud83d\udc68&zwj;\ud83d\ude80',
  1480. 'man_cartwheeling':'\ud83e\udd38&zwj;\u2642\ufe0f',
  1481. 'man_cook':'\ud83d\udc68&zwj;\ud83c\udf73',
  1482. 'man_dancing':'\ud83d\udd7a',
  1483. 'man_facepalming':'\ud83e\udd26&zwj;\u2642\ufe0f',
  1484. 'man_factory_worker':'\ud83d\udc68&zwj;\ud83c\udfed',
  1485. 'man_farmer':'\ud83d\udc68&zwj;\ud83c\udf3e',
  1486. 'man_firefighter':'\ud83d\udc68&zwj;\ud83d\ude92',
  1487. 'man_health_worker':'\ud83d\udc68&zwj;\u2695\ufe0f',
  1488. 'man_in_tuxedo':'\ud83e\udd35',
  1489. 'man_judge':'\ud83d\udc68&zwj;\u2696\ufe0f',
  1490. 'man_juggling':'\ud83e\udd39&zwj;\u2642\ufe0f',
  1491. 'man_mechanic':'\ud83d\udc68&zwj;\ud83d\udd27',
  1492. 'man_office_worker':'\ud83d\udc68&zwj;\ud83d\udcbc',
  1493. 'man_pilot':'\ud83d\udc68&zwj;\u2708\ufe0f',
  1494. 'man_playing_handball':'\ud83e\udd3e&zwj;\u2642\ufe0f',
  1495. 'man_playing_water_polo':'\ud83e\udd3d&zwj;\u2642\ufe0f',
  1496. 'man_scientist':'\ud83d\udc68&zwj;\ud83d\udd2c',
  1497. 'man_shrugging':'\ud83e\udd37&zwj;\u2642\ufe0f',
  1498. 'man_singer':'\ud83d\udc68&zwj;\ud83c\udfa4',
  1499. 'man_student':'\ud83d\udc68&zwj;\ud83c\udf93',
  1500. 'man_teacher':'\ud83d\udc68&zwj;\ud83c\udfeb',
  1501. 'man_technologist':'\ud83d\udc68&zwj;\ud83d\udcbb',
  1502. 'man_with_gua_pi_mao':'\ud83d\udc72',
  1503. 'man_with_turban':'\ud83d\udc73',
  1504. 'tangerine':'\ud83c\udf4a',
  1505. 'mans_shoe':'\ud83d\udc5e',
  1506. 'mantelpiece_clock':'\ud83d\udd70',
  1507. 'maple_leaf':'\ud83c\udf41',
  1508. 'martial_arts_uniform':'\ud83e\udd4b',
  1509. 'mask':'\ud83d\ude37',
  1510. 'massage_woman':'\ud83d\udc86',
  1511. 'massage_man':'\ud83d\udc86&zwj;\u2642\ufe0f',
  1512. 'meat_on_bone':'\ud83c\udf56',
  1513. 'medal_military':'\ud83c\udf96',
  1514. 'medal_sports':'\ud83c\udfc5',
  1515. 'mega':'\ud83d\udce3',
  1516. 'melon':'\ud83c\udf48',
  1517. 'memo':'\ud83d\udcdd',
  1518. 'men_wrestling':'\ud83e\udd3c&zwj;\u2642\ufe0f',
  1519. 'menorah':'\ud83d\udd4e',
  1520. 'mens':'\ud83d\udeb9',
  1521. 'metal':'\ud83e\udd18',
  1522. 'metro':'\ud83d\ude87',
  1523. 'microphone':'\ud83c\udfa4',
  1524. 'microscope':'\ud83d\udd2c',
  1525. 'milk_glass':'\ud83e\udd5b',
  1526. 'milky_way':'\ud83c\udf0c',
  1527. 'minibus':'\ud83d\ude90',
  1528. 'minidisc':'\ud83d\udcbd',
  1529. 'mobile_phone_off':'\ud83d\udcf4',
  1530. 'money_mouth_face':'\ud83e\udd11',
  1531. 'money_with_wings':'\ud83d\udcb8',
  1532. 'moneybag':'\ud83d\udcb0',
  1533. 'monkey':'\ud83d\udc12',
  1534. 'monkey_face':'\ud83d\udc35',
  1535. 'monorail':'\ud83d\ude9d',
  1536. 'moon':'\ud83c\udf14',
  1537. 'mortar_board':'\ud83c\udf93',
  1538. 'mosque':'\ud83d\udd4c',
  1539. 'motor_boat':'\ud83d\udee5',
  1540. 'motor_scooter':'\ud83d\udef5',
  1541. 'motorcycle':'\ud83c\udfcd',
  1542. 'motorway':'\ud83d\udee3',
  1543. 'mount_fuji':'\ud83d\uddfb',
  1544. 'mountain':'\u26f0',
  1545. 'mountain_biking_man':'\ud83d\udeb5',
  1546. 'mountain_biking_woman':'\ud83d\udeb5&zwj;\u2640\ufe0f',
  1547. 'mountain_cableway':'\ud83d\udea0',
  1548. 'mountain_railway':'\ud83d\ude9e',
  1549. 'mountain_snow':'\ud83c\udfd4',
  1550. 'mouse':'\ud83d\udc2d',
  1551. 'mouse2':'\ud83d\udc01',
  1552. 'movie_camera':'\ud83c\udfa5',
  1553. 'moyai':'\ud83d\uddff',
  1554. 'mrs_claus':'\ud83e\udd36',
  1555. 'muscle':'\ud83d\udcaa',
  1556. 'mushroom':'\ud83c\udf44',
  1557. 'musical_keyboard':'\ud83c\udfb9',
  1558. 'musical_note':'\ud83c\udfb5',
  1559. 'musical_score':'\ud83c\udfbc',
  1560. 'mute':'\ud83d\udd07',
  1561. 'nail_care':'\ud83d\udc85',
  1562. 'name_badge':'\ud83d\udcdb',
  1563. 'national_park':'\ud83c\udfde',
  1564. 'nauseated_face':'\ud83e\udd22',
  1565. 'necktie':'\ud83d\udc54',
  1566. 'negative_squared_cross_mark':'\u274e',
  1567. 'nerd_face':'\ud83e\udd13',
  1568. 'neutral_face':'\ud83d\ude10',
  1569. 'new':'\ud83c\udd95',
  1570. 'new_moon':'\ud83c\udf11',
  1571. 'new_moon_with_face':'\ud83c\udf1a',
  1572. 'newspaper':'\ud83d\udcf0',
  1573. 'newspaper_roll':'\ud83d\uddde',
  1574. 'next_track_button':'\u23ed',
  1575. 'ng':'\ud83c\udd96',
  1576. 'no_good_man':'\ud83d\ude45&zwj;\u2642\ufe0f',
  1577. 'no_good_woman':'\ud83d\ude45',
  1578. 'night_with_stars':'\ud83c\udf03',
  1579. 'no_bell':'\ud83d\udd15',
  1580. 'no_bicycles':'\ud83d\udeb3',
  1581. 'no_entry':'\u26d4\ufe0f',
  1582. 'no_entry_sign':'\ud83d\udeab',
  1583. 'no_mobile_phones':'\ud83d\udcf5',
  1584. 'no_mouth':'\ud83d\ude36',
  1585. 'no_pedestrians':'\ud83d\udeb7',
  1586. 'no_smoking':'\ud83d\udead',
  1587. 'non-potable_water':'\ud83d\udeb1',
  1588. 'nose':'\ud83d\udc43',
  1589. 'notebook':'\ud83d\udcd3',
  1590. 'notebook_with_decorative_cover':'\ud83d\udcd4',
  1591. 'notes':'\ud83c\udfb6',
  1592. 'nut_and_bolt':'\ud83d\udd29',
  1593. 'o':'\u2b55\ufe0f',
  1594. 'o2':'\ud83c\udd7e\ufe0f',
  1595. 'ocean':'\ud83c\udf0a',
  1596. 'octopus':'\ud83d\udc19',
  1597. 'oden':'\ud83c\udf62',
  1598. 'office':'\ud83c\udfe2',
  1599. 'oil_drum':'\ud83d\udee2',
  1600. 'ok':'\ud83c\udd97',
  1601. 'ok_hand':'\ud83d\udc4c',
  1602. 'ok_man':'\ud83d\ude46&zwj;\u2642\ufe0f',
  1603. 'ok_woman':'\ud83d\ude46',
  1604. 'old_key':'\ud83d\udddd',
  1605. 'older_man':'\ud83d\udc74',
  1606. 'older_woman':'\ud83d\udc75',
  1607. 'om':'\ud83d\udd49',
  1608. 'on':'\ud83d\udd1b',
  1609. 'oncoming_automobile':'\ud83d\ude98',
  1610. 'oncoming_bus':'\ud83d\ude8d',
  1611. 'oncoming_police_car':'\ud83d\ude94',
  1612. 'oncoming_taxi':'\ud83d\ude96',
  1613. 'open_file_folder':'\ud83d\udcc2',
  1614. 'open_hands':'\ud83d\udc50',
  1615. 'open_mouth':'\ud83d\ude2e',
  1616. 'open_umbrella':'\u2602\ufe0f',
  1617. 'ophiuchus':'\u26ce',
  1618. 'orange_book':'\ud83d\udcd9',
  1619. 'orthodox_cross':'\u2626\ufe0f',
  1620. 'outbox_tray':'\ud83d\udce4',
  1621. 'owl':'\ud83e\udd89',
  1622. 'ox':'\ud83d\udc02',
  1623. 'package':'\ud83d\udce6',
  1624. 'page_facing_up':'\ud83d\udcc4',
  1625. 'page_with_curl':'\ud83d\udcc3',
  1626. 'pager':'\ud83d\udcdf',
  1627. 'paintbrush':'\ud83d\udd8c',
  1628. 'palm_tree':'\ud83c\udf34',
  1629. 'pancakes':'\ud83e\udd5e',
  1630. 'panda_face':'\ud83d\udc3c',
  1631. 'paperclip':'\ud83d\udcce',
  1632. 'paperclips':'\ud83d\udd87',
  1633. 'parasol_on_ground':'\u26f1',
  1634. 'parking':'\ud83c\udd7f\ufe0f',
  1635. 'part_alternation_mark':'\u303d\ufe0f',
  1636. 'partly_sunny':'\u26c5\ufe0f',
  1637. 'passenger_ship':'\ud83d\udef3',
  1638. 'passport_control':'\ud83d\udec2',
  1639. 'pause_button':'\u23f8',
  1640. 'peace_symbol':'\u262e\ufe0f',
  1641. 'peach':'\ud83c\udf51',
  1642. 'peanuts':'\ud83e\udd5c',
  1643. 'pear':'\ud83c\udf50',
  1644. 'pen':'\ud83d\udd8a',
  1645. 'pencil2':'\u270f\ufe0f',
  1646. 'penguin':'\ud83d\udc27',
  1647. 'pensive':'\ud83d\ude14',
  1648. 'performing_arts':'\ud83c\udfad',
  1649. 'persevere':'\ud83d\ude23',
  1650. 'person_fencing':'\ud83e\udd3a',
  1651. 'pouting_woman':'\ud83d\ude4e',
  1652. 'phone':'\u260e\ufe0f',
  1653. 'pick':'\u26cf',
  1654. 'pig':'\ud83d\udc37',
  1655. 'pig2':'\ud83d\udc16',
  1656. 'pig_nose':'\ud83d\udc3d',
  1657. 'pill':'\ud83d\udc8a',
  1658. 'pineapple':'\ud83c\udf4d',
  1659. 'ping_pong':'\ud83c\udfd3',
  1660. 'pisces':'\u2653\ufe0f',
  1661. 'pizza':'\ud83c\udf55',
  1662. 'place_of_worship':'\ud83d\uded0',
  1663. 'plate_with_cutlery':'\ud83c\udf7d',
  1664. 'play_or_pause_button':'\u23ef',
  1665. 'point_down':'\ud83d\udc47',
  1666. 'point_left':'\ud83d\udc48',
  1667. 'point_right':'\ud83d\udc49',
  1668. 'point_up':'\u261d\ufe0f',
  1669. 'point_up_2':'\ud83d\udc46',
  1670. 'police_car':'\ud83d\ude93',
  1671. 'policewoman':'\ud83d\udc6e&zwj;\u2640\ufe0f',
  1672. 'poodle':'\ud83d\udc29',
  1673. 'popcorn':'\ud83c\udf7f',
  1674. 'post_office':'\ud83c\udfe3',
  1675. 'postal_horn':'\ud83d\udcef',
  1676. 'postbox':'\ud83d\udcee',
  1677. 'potable_water':'\ud83d\udeb0',
  1678. 'potato':'\ud83e\udd54',
  1679. 'pouch':'\ud83d\udc5d',
  1680. 'poultry_leg':'\ud83c\udf57',
  1681. 'pound':'\ud83d\udcb7',
  1682. 'rage':'\ud83d\ude21',
  1683. 'pouting_cat':'\ud83d\ude3e',
  1684. 'pouting_man':'\ud83d\ude4e&zwj;\u2642\ufe0f',
  1685. 'pray':'\ud83d\ude4f',
  1686. 'prayer_beads':'\ud83d\udcff',
  1687. 'pregnant_woman':'\ud83e\udd30',
  1688. 'previous_track_button':'\u23ee',
  1689. 'prince':'\ud83e\udd34',
  1690. 'princess':'\ud83d\udc78',
  1691. 'printer':'\ud83d\udda8',
  1692. 'purple_heart':'\ud83d\udc9c',
  1693. 'purse':'\ud83d\udc5b',
  1694. 'pushpin':'\ud83d\udccc',
  1695. 'put_litter_in_its_place':'\ud83d\udeae',
  1696. 'question':'\u2753',
  1697. 'rabbit':'\ud83d\udc30',
  1698. 'rabbit2':'\ud83d\udc07',
  1699. 'racehorse':'\ud83d\udc0e',
  1700. 'racing_car':'\ud83c\udfce',
  1701. 'radio':'\ud83d\udcfb',
  1702. 'radio_button':'\ud83d\udd18',
  1703. 'radioactive':'\u2622\ufe0f',
  1704. 'railway_car':'\ud83d\ude83',
  1705. 'railway_track':'\ud83d\udee4',
  1706. 'rainbow':'\ud83c\udf08',
  1707. 'rainbow_flag':'\ud83c\udff3\ufe0f&zwj;\ud83c\udf08',
  1708. 'raised_back_of_hand':'\ud83e\udd1a',
  1709. 'raised_hand_with_fingers_splayed':'\ud83d\udd90',
  1710. 'raised_hands':'\ud83d\ude4c',
  1711. 'raising_hand_woman':'\ud83d\ude4b',
  1712. 'raising_hand_man':'\ud83d\ude4b&zwj;\u2642\ufe0f',
  1713. 'ram':'\ud83d\udc0f',
  1714. 'ramen':'\ud83c\udf5c',
  1715. 'rat':'\ud83d\udc00',
  1716. 'record_button':'\u23fa',
  1717. 'recycle':'\u267b\ufe0f',
  1718. 'red_circle':'\ud83d\udd34',
  1719. 'registered':'\u00ae\ufe0f',
  1720. 'relaxed':'\u263a\ufe0f',
  1721. 'relieved':'\ud83d\ude0c',
  1722. 'reminder_ribbon':'\ud83c\udf97',
  1723. 'repeat':'\ud83d\udd01',
  1724. 'repeat_one':'\ud83d\udd02',
  1725. 'rescue_worker_helmet':'\u26d1',
  1726. 'restroom':'\ud83d\udebb',
  1727. 'revolving_hearts':'\ud83d\udc9e',
  1728. 'rewind':'\u23ea',
  1729. 'rhinoceros':'\ud83e\udd8f',
  1730. 'ribbon':'\ud83c\udf80',
  1731. 'rice':'\ud83c\udf5a',
  1732. 'rice_ball':'\ud83c\udf59',
  1733. 'rice_cracker':'\ud83c\udf58',
  1734. 'rice_scene':'\ud83c\udf91',
  1735. 'right_anger_bubble':'\ud83d\uddef',
  1736. 'ring':'\ud83d\udc8d',
  1737. 'robot':'\ud83e\udd16',
  1738. 'rocket':'\ud83d\ude80',
  1739. 'rofl':'\ud83e\udd23',
  1740. 'roll_eyes':'\ud83d\ude44',
  1741. 'roller_coaster':'\ud83c\udfa2',
  1742. 'rooster':'\ud83d\udc13',
  1743. 'rose':'\ud83c\udf39',
  1744. 'rosette':'\ud83c\udff5',
  1745. 'rotating_light':'\ud83d\udea8',
  1746. 'round_pushpin':'\ud83d\udccd',
  1747. 'rowing_man':'\ud83d\udea3',
  1748. 'rowing_woman':'\ud83d\udea3&zwj;\u2640\ufe0f',
  1749. 'rugby_football':'\ud83c\udfc9',
  1750. 'running_man':'\ud83c\udfc3',
  1751. 'running_shirt_with_sash':'\ud83c\udfbd',
  1752. 'running_woman':'\ud83c\udfc3&zwj;\u2640\ufe0f',
  1753. 'sa':'\ud83c\ude02\ufe0f',
  1754. 'sagittarius':'\u2650\ufe0f',
  1755. 'sake':'\ud83c\udf76',
  1756. 'sandal':'\ud83d\udc61',
  1757. 'santa':'\ud83c\udf85',
  1758. 'satellite':'\ud83d\udce1',
  1759. 'saxophone':'\ud83c\udfb7',
  1760. 'school':'\ud83c\udfeb',
  1761. 'school_satchel':'\ud83c\udf92',
  1762. 'scissors':'\u2702\ufe0f',
  1763. 'scorpion':'\ud83e\udd82',
  1764. 'scorpius':'\u264f\ufe0f',
  1765. 'scream':'\ud83d\ude31',
  1766. 'scream_cat':'\ud83d\ude40',
  1767. 'scroll':'\ud83d\udcdc',
  1768. 'seat':'\ud83d\udcba',
  1769. 'secret':'\u3299\ufe0f',
  1770. 'see_no_evil':'\ud83d\ude48',
  1771. 'seedling':'\ud83c\udf31',
  1772. 'selfie':'\ud83e\udd33',
  1773. 'shallow_pan_of_food':'\ud83e\udd58',
  1774. 'shamrock':'\u2618\ufe0f',
  1775. 'shark':'\ud83e\udd88',
  1776. 'shaved_ice':'\ud83c\udf67',
  1777. 'sheep':'\ud83d\udc11',
  1778. 'shell':'\ud83d\udc1a',
  1779. 'shield':'\ud83d\udee1',
  1780. 'shinto_shrine':'\u26e9',
  1781. 'ship':'\ud83d\udea2',
  1782. 'shirt':'\ud83d\udc55',
  1783. 'shopping':'\ud83d\udecd',
  1784. 'shopping_cart':'\ud83d\uded2',
  1785. 'shower':'\ud83d\udebf',
  1786. 'shrimp':'\ud83e\udd90',
  1787. 'signal_strength':'\ud83d\udcf6',
  1788. 'six_pointed_star':'\ud83d\udd2f',
  1789. 'ski':'\ud83c\udfbf',
  1790. 'skier':'\u26f7',
  1791. 'skull':'\ud83d\udc80',
  1792. 'skull_and_crossbones':'\u2620\ufe0f',
  1793. 'sleeping':'\ud83d\ude34',
  1794. 'sleeping_bed':'\ud83d\udecc',
  1795. 'sleepy':'\ud83d\ude2a',
  1796. 'slightly_frowning_face':'\ud83d\ude41',
  1797. 'slightly_smiling_face':'\ud83d\ude42',
  1798. 'slot_machine':'\ud83c\udfb0',
  1799. 'small_airplane':'\ud83d\udee9',
  1800. 'small_blue_diamond':'\ud83d\udd39',
  1801. 'small_orange_diamond':'\ud83d\udd38',
  1802. 'small_red_triangle':'\ud83d\udd3a',
  1803. 'small_red_triangle_down':'\ud83d\udd3b',
  1804. 'smile':'\ud83d\ude04',
  1805. 'smile_cat':'\ud83d\ude38',
  1806. 'smiley':'\ud83d\ude03',
  1807. 'smiley_cat':'\ud83d\ude3a',
  1808. 'smiling_imp':'\ud83d\ude08',
  1809. 'smirk':'\ud83d\ude0f',
  1810. 'smirk_cat':'\ud83d\ude3c',
  1811. 'smoking':'\ud83d\udeac',
  1812. 'snail':'\ud83d\udc0c',
  1813. 'snake':'\ud83d\udc0d',
  1814. 'sneezing_face':'\ud83e\udd27',
  1815. 'snowboarder':'\ud83c\udfc2',
  1816. 'snowflake':'\u2744\ufe0f',
  1817. 'snowman':'\u26c4\ufe0f',
  1818. 'snowman_with_snow':'\u2603\ufe0f',
  1819. 'sob':'\ud83d\ude2d',
  1820. 'soccer':'\u26bd\ufe0f',
  1821. 'soon':'\ud83d\udd1c',
  1822. 'sos':'\ud83c\udd98',
  1823. 'sound':'\ud83d\udd09',
  1824. 'space_invader':'\ud83d\udc7e',
  1825. 'spades':'\u2660\ufe0f',
  1826. 'spaghetti':'\ud83c\udf5d',
  1827. 'sparkle':'\u2747\ufe0f',
  1828. 'sparkler':'\ud83c\udf87',
  1829. 'sparkles':'\u2728',
  1830. 'sparkling_heart':'\ud83d\udc96',
  1831. 'speak_no_evil':'\ud83d\ude4a',
  1832. 'speaker':'\ud83d\udd08',
  1833. 'speaking_head':'\ud83d\udde3',
  1834. 'speech_balloon':'\ud83d\udcac',
  1835. 'speedboat':'\ud83d\udea4',
  1836. 'spider':'\ud83d\udd77',
  1837. 'spider_web':'\ud83d\udd78',
  1838. 'spiral_calendar':'\ud83d\uddd3',
  1839. 'spiral_notepad':'\ud83d\uddd2',
  1840. 'spoon':'\ud83e\udd44',
  1841. 'squid':'\ud83e\udd91',
  1842. 'stadium':'\ud83c\udfdf',
  1843. 'star':'\u2b50\ufe0f',
  1844. 'star2':'\ud83c\udf1f',
  1845. 'star_and_crescent':'\u262a\ufe0f',
  1846. 'star_of_david':'\u2721\ufe0f',
  1847. 'stars':'\ud83c\udf20',
  1848. 'station':'\ud83d\ude89',
  1849. 'statue_of_liberty':'\ud83d\uddfd',
  1850. 'steam_locomotive':'\ud83d\ude82',
  1851. 'stew':'\ud83c\udf72',
  1852. 'stop_button':'\u23f9',
  1853. 'stop_sign':'\ud83d\uded1',
  1854. 'stopwatch':'\u23f1',
  1855. 'straight_ruler':'\ud83d\udccf',
  1856. 'strawberry':'\ud83c\udf53',
  1857. 'stuck_out_tongue':'\ud83d\ude1b',
  1858. 'stuck_out_tongue_closed_eyes':'\ud83d\ude1d',
  1859. 'stuck_out_tongue_winking_eye':'\ud83d\ude1c',
  1860. 'studio_microphone':'\ud83c\udf99',
  1861. 'stuffed_flatbread':'\ud83e\udd59',
  1862. 'sun_behind_large_cloud':'\ud83c\udf25',
  1863. 'sun_behind_rain_cloud':'\ud83c\udf26',
  1864. 'sun_behind_small_cloud':'\ud83c\udf24',
  1865. 'sun_with_face':'\ud83c\udf1e',
  1866. 'sunflower':'\ud83c\udf3b',
  1867. 'sunglasses':'\ud83d\ude0e',
  1868. 'sunny':'\u2600\ufe0f',
  1869. 'sunrise':'\ud83c\udf05',
  1870. 'sunrise_over_mountains':'\ud83c\udf04',
  1871. 'surfing_man':'\ud83c\udfc4',
  1872. 'surfing_woman':'\ud83c\udfc4&zwj;\u2640\ufe0f',
  1873. 'sushi':'\ud83c\udf63',
  1874. 'suspension_railway':'\ud83d\ude9f',
  1875. 'sweat':'\ud83d\ude13',
  1876. 'sweat_drops':'\ud83d\udca6',
  1877. 'sweat_smile':'\ud83d\ude05',
  1878. 'sweet_potato':'\ud83c\udf60',
  1879. 'swimming_man':'\ud83c\udfca',
  1880. 'swimming_woman':'\ud83c\udfca&zwj;\u2640\ufe0f',
  1881. 'symbols':'\ud83d\udd23',
  1882. 'synagogue':'\ud83d\udd4d',
  1883. 'syringe':'\ud83d\udc89',
  1884. 'taco':'\ud83c\udf2e',
  1885. 'tada':'\ud83c\udf89',
  1886. 'tanabata_tree':'\ud83c\udf8b',
  1887. 'taurus':'\u2649\ufe0f',
  1888. 'taxi':'\ud83d\ude95',
  1889. 'tea':'\ud83c\udf75',
  1890. 'telephone_receiver':'\ud83d\udcde',
  1891. 'telescope':'\ud83d\udd2d',
  1892. 'tennis':'\ud83c\udfbe',
  1893. 'tent':'\u26fa\ufe0f',
  1894. 'thermometer':'\ud83c\udf21',
  1895. 'thinking':'\ud83e\udd14',
  1896. 'thought_balloon':'\ud83d\udcad',
  1897. 'ticket':'\ud83c\udfab',
  1898. 'tickets':'\ud83c\udf9f',
  1899. 'tiger':'\ud83d\udc2f',
  1900. 'tiger2':'\ud83d\udc05',
  1901. 'timer_clock':'\u23f2',
  1902. 'tipping_hand_man':'\ud83d\udc81&zwj;\u2642\ufe0f',
  1903. 'tired_face':'\ud83d\ude2b',
  1904. 'tm':'\u2122\ufe0f',
  1905. 'toilet':'\ud83d\udebd',
  1906. 'tokyo_tower':'\ud83d\uddfc',
  1907. 'tomato':'\ud83c\udf45',
  1908. 'tongue':'\ud83d\udc45',
  1909. 'top':'\ud83d\udd1d',
  1910. 'tophat':'\ud83c\udfa9',
  1911. 'tornado':'\ud83c\udf2a',
  1912. 'trackball':'\ud83d\uddb2',
  1913. 'tractor':'\ud83d\ude9c',
  1914. 'traffic_light':'\ud83d\udea5',
  1915. 'train':'\ud83d\ude8b',
  1916. 'train2':'\ud83d\ude86',
  1917. 'tram':'\ud83d\ude8a',
  1918. 'triangular_flag_on_post':'\ud83d\udea9',
  1919. 'triangular_ruler':'\ud83d\udcd0',
  1920. 'trident':'\ud83d\udd31',
  1921. 'triumph':'\ud83d\ude24',
  1922. 'trolleybus':'\ud83d\ude8e',
  1923. 'trophy':'\ud83c\udfc6',
  1924. 'tropical_drink':'\ud83c\udf79',
  1925. 'tropical_fish':'\ud83d\udc20',
  1926. 'truck':'\ud83d\ude9a',
  1927. 'trumpet':'\ud83c\udfba',
  1928. 'tulip':'\ud83c\udf37',
  1929. 'tumbler_glass':'\ud83e\udd43',
  1930. 'turkey':'\ud83e\udd83',
  1931. 'turtle':'\ud83d\udc22',
  1932. 'tv':'\ud83d\udcfa',
  1933. 'twisted_rightwards_arrows':'\ud83d\udd00',
  1934. 'two_hearts':'\ud83d\udc95',
  1935. 'two_men_holding_hands':'\ud83d\udc6c',
  1936. 'two_women_holding_hands':'\ud83d\udc6d',
  1937. 'u5272':'\ud83c\ude39',
  1938. 'u5408':'\ud83c\ude34',
  1939. 'u55b6':'\ud83c\ude3a',
  1940. 'u6307':'\ud83c\ude2f\ufe0f',
  1941. 'u6708':'\ud83c\ude37\ufe0f',
  1942. 'u6709':'\ud83c\ude36',
  1943. 'u6e80':'\ud83c\ude35',
  1944. 'u7121':'\ud83c\ude1a\ufe0f',
  1945. 'u7533':'\ud83c\ude38',
  1946. 'u7981':'\ud83c\ude32',
  1947. 'u7a7a':'\ud83c\ude33',
  1948. 'umbrella':'\u2614\ufe0f',
  1949. 'unamused':'\ud83d\ude12',
  1950. 'underage':'\ud83d\udd1e',
  1951. 'unicorn':'\ud83e\udd84',
  1952. 'unlock':'\ud83d\udd13',
  1953. 'up':'\ud83c\udd99',
  1954. 'upside_down_face':'\ud83d\ude43',
  1955. 'v':'\u270c\ufe0f',
  1956. 'vertical_traffic_light':'\ud83d\udea6',
  1957. 'vhs':'\ud83d\udcfc',
  1958. 'vibration_mode':'\ud83d\udcf3',
  1959. 'video_camera':'\ud83d\udcf9',
  1960. 'video_game':'\ud83c\udfae',
  1961. 'violin':'\ud83c\udfbb',
  1962. 'virgo':'\u264d\ufe0f',
  1963. 'volcano':'\ud83c\udf0b',
  1964. 'volleyball':'\ud83c\udfd0',
  1965. 'vs':'\ud83c\udd9a',
  1966. 'vulcan_salute':'\ud83d\udd96',
  1967. 'walking_man':'\ud83d\udeb6',
  1968. 'walking_woman':'\ud83d\udeb6&zwj;\u2640\ufe0f',
  1969. 'waning_crescent_moon':'\ud83c\udf18',
  1970. 'waning_gibbous_moon':'\ud83c\udf16',
  1971. 'warning':'\u26a0\ufe0f',
  1972. 'wastebasket':'\ud83d\uddd1',
  1973. 'watch':'\u231a\ufe0f',
  1974. 'water_buffalo':'\ud83d\udc03',
  1975. 'watermelon':'\ud83c\udf49',
  1976. 'wave':'\ud83d\udc4b',
  1977. 'wavy_dash':'\u3030\ufe0f',
  1978. 'waxing_crescent_moon':'\ud83c\udf12',
  1979. 'wc':'\ud83d\udebe',
  1980. 'weary':'\ud83d\ude29',
  1981. 'wedding':'\ud83d\udc92',
  1982. 'weight_lifting_man':'\ud83c\udfcb\ufe0f',
  1983. 'weight_lifting_woman':'\ud83c\udfcb\ufe0f&zwj;\u2640\ufe0f',
  1984. 'whale':'\ud83d\udc33',
  1985. 'whale2':'\ud83d\udc0b',
  1986. 'wheel_of_dharma':'\u2638\ufe0f',
  1987. 'wheelchair':'\u267f\ufe0f',
  1988. 'white_check_mark':'\u2705',
  1989. 'white_circle':'\u26aa\ufe0f',
  1990. 'white_flag':'\ud83c\udff3\ufe0f',
  1991. 'white_flower':'\ud83d\udcae',
  1992. 'white_large_square':'\u2b1c\ufe0f',
  1993. 'white_medium_small_square':'\u25fd\ufe0f',
  1994. 'white_medium_square':'\u25fb\ufe0f',
  1995. 'white_small_square':'\u25ab\ufe0f',
  1996. 'white_square_button':'\ud83d\udd33',
  1997. 'wilted_flower':'\ud83e\udd40',
  1998. 'wind_chime':'\ud83c\udf90',
  1999. 'wind_face':'\ud83c\udf2c',
  2000. 'wine_glass':'\ud83c\udf77',
  2001. 'wink':'\ud83d\ude09',
  2002. 'wolf':'\ud83d\udc3a',
  2003. 'woman':'\ud83d\udc69',
  2004. 'woman_artist':'\ud83d\udc69&zwj;\ud83c\udfa8',
  2005. 'woman_astronaut':'\ud83d\udc69&zwj;\ud83d\ude80',
  2006. 'woman_cartwheeling':'\ud83e\udd38&zwj;\u2640\ufe0f',
  2007. 'woman_cook':'\ud83d\udc69&zwj;\ud83c\udf73',
  2008. 'woman_facepalming':'\ud83e\udd26&zwj;\u2640\ufe0f',
  2009. 'woman_factory_worker':'\ud83d\udc69&zwj;\ud83c\udfed',
  2010. 'woman_farmer':'\ud83d\udc69&zwj;\ud83c\udf3e',
  2011. 'woman_firefighter':'\ud83d\udc69&zwj;\ud83d\ude92',
  2012. 'woman_health_worker':'\ud83d\udc69&zwj;\u2695\ufe0f',
  2013. 'woman_judge':'\ud83d\udc69&zwj;\u2696\ufe0f',
  2014. 'woman_juggling':'\ud83e\udd39&zwj;\u2640\ufe0f',
  2015. 'woman_mechanic':'\ud83d\udc69&zwj;\ud83d\udd27',
  2016. 'woman_office_worker':'\ud83d\udc69&zwj;\ud83d\udcbc',
  2017. 'woman_pilot':'\ud83d\udc69&zwj;\u2708\ufe0f',
  2018. 'woman_playing_handball':'\ud83e\udd3e&zwj;\u2640\ufe0f',
  2019. 'woman_playing_water_polo':'\ud83e\udd3d&zwj;\u2640\ufe0f',
  2020. 'woman_scientist':'\ud83d\udc69&zwj;\ud83d\udd2c',
  2021. 'woman_shrugging':'\ud83e\udd37&zwj;\u2640\ufe0f',
  2022. 'woman_singer':'\ud83d\udc69&zwj;\ud83c\udfa4',
  2023. 'woman_student':'\ud83d\udc69&zwj;\ud83c\udf93',
  2024. 'woman_teacher':'\ud83d\udc69&zwj;\ud83c\udfeb',
  2025. 'woman_technologist':'\ud83d\udc69&zwj;\ud83d\udcbb',
  2026. 'woman_with_turban':'\ud83d\udc73&zwj;\u2640\ufe0f',
  2027. 'womans_clothes':'\ud83d\udc5a',
  2028. 'womans_hat':'\ud83d\udc52',
  2029. 'women_wrestling':'\ud83e\udd3c&zwj;\u2640\ufe0f',
  2030. 'womens':'\ud83d\udeba',
  2031. 'world_map':'\ud83d\uddfa',
  2032. 'worried':'\ud83d\ude1f',
  2033. 'wrench':'\ud83d\udd27',
  2034. 'writing_hand':'\u270d\ufe0f',
  2035. 'x':'\u274c',
  2036. 'yellow_heart':'\ud83d\udc9b',
  2037. 'yen':'\ud83d\udcb4',
  2038. 'yin_yang':'\u262f\ufe0f',
  2039. 'yum':'\ud83d\ude0b',
  2040. 'zap':'\u26a1\ufe0f',
  2041. 'zipper_mouth_face':'\ud83e\udd10',
  2042. 'zzz':'\ud83d\udca4',
  2043. /* special emojis :P */
  2044. 'octocat': '<img width="20" height="20" align="absmiddle" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAOwUlEQVR42uVbCVyO6RbPmn0sw9gZS0aZO4y5GTEUE2ObxjZjrbHEJVy3sWS5pkaWxjLEkCVDSbSgFLdESaWSLIVUSIi4kvb9f895vi/zbbR+yZ339/tbnu99n/ec/3Oe85xznufV0CjDBaAdwZqwnzCJ0FXjHV70/i8J5oQDhCFV8cJdq1atwqxZs+Ds7Iz4+HhqwgXCLELNKlK6G2Ej4e6lS5ewZcsWzJgxA+fOnWNZFqvzxT1v3boF/qcsBg0ahP3796OwsJAFWK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f2qnSICiBbDzVCRg9uzZTMC+94kAv6FDh8opwRsVHPjItnl4eEDxHNLKlStFXV+2javQ/M1SpZe+1KA4L4G7WDG57fSm/OUbXiqG0ewAFYOeYcN4fwZhvLkp2y4tftrxcltdlf/w+fPn4qNGxTCYU2m6nrRu3VqunT/EoiuZvw6TTZHpyuNNmEaNGsndP3fu3OJAq1N1JOAHDmyKheVtNP4OkE2crULRAW7fvl20EyyLy24a8p+/7WISFixYIMLt4t82bNhQYjXqXREgPq3j74mlX3AmSL8E1eOPIBXnuVT5OsVZpuLnOMeOHeN7vifwiYhYzhC5IpwlOXj1QXWdBmy/XWU/X+UqMZfKBw4cKAobHPlJlZe9h6tOu+7cuSN2dg0MDMSSyZUpmXvaSD+crq/xvl0k9BTCRa7qEPq+5T4t6ffF52WVV+f1P6zyLG30bsU4AAAAAElFTkSuQmCC">',
  2045. 'showdown': '<img width="20" height="20" align="absmiddle" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg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ml0PjI8L3RpZmY6UmVzb2x1dGlvblVuaXQ+CiAgICAgICAgIDxleGlmOkNvbG9yU3BhY2U+MTwvZXhpZjpDb2xvclNwYWNlPgogICAgICAgICA8ZXhpZjpQaXhlbFhEaW1lbnNpb24+NjQ8L2V4aWY6UGl4ZWxYRGltZW5zaW9uPgogICAgICAgICA8ZXhpZjpQaXhlbFlEaW1lbnNpb24+NjQ8L2V4aWY6UGl4ZWxZRGltZW5zaW9uPgogICAgICA8L3JkZjpEZXNjcmlwdGlvbj4KICAgPC9yZGY6UkRGPgo8L3g6eG1wbWV0YT4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICA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MMuXn6TUBw8qlaMrirNb4LdhWlP+SWD+cjFfxTpuS2GUpik+o3jFSEkqbJiWn0P0OMSGqlWiOu0TvD+FRHZKAE+oW+cfRmEwqlsesJJEJs8y91QqP+9UL6lqEtz2gpuNEY5sm9sIHln2DRa2aFKGJtiXkZEMiWtgVvRKUSUFkSKt2S7fAGgAXLYpmQQXf36MUChTZdUa2u8/rkvPA6Tz30r4eH3ybcBS5gJ6SaNXb+aABkA1AMxKenclBZLW/He4cYEGwEXb3wEASelexk6LIIIAAAAASUVORK5CYII=">'
  2046. };
  2047. /**
  2048. * Created by Estevao on 31-05-2015.
  2049. */
  2050. /**
  2051. * Showdown Converter class
  2052. * @class
  2053. * @param {object} [converterOptions]
  2054. * @returns {Converter}
  2055. */
  2056. showdown.Converter = function (converterOptions) {
  2057. 'use strict';
  2058. var
  2059. /**
  2060. * Options used by this converter
  2061. * @private
  2062. * @type {{}}
  2063. */
  2064. options = {},
  2065. /**
  2066. * Language extensions used by this converter
  2067. * @private
  2068. * @type {Array}
  2069. */
  2070. langExtensions = [],
  2071. /**
  2072. * Output modifiers extensions used by this converter
  2073. * @private
  2074. * @type {Array}
  2075. */
  2076. outputModifiers = [],
  2077. /**
  2078. * Event listeners
  2079. * @private
  2080. * @type {{}}
  2081. */
  2082. listeners = {},
  2083. /**
  2084. * The flavor set in this converter
  2085. */
  2086. setConvFlavor = setFlavor;
  2087. _constructor();
  2088. /**
  2089. * Converter constructor
  2090. * @private
  2091. */
  2092. function _constructor () {
  2093. converterOptions = converterOptions || {};
  2094. for (var gOpt in globalOptions) {
  2095. if (globalOptions.hasOwnProperty(gOpt)) {
  2096. options[gOpt] = globalOptions[gOpt];
  2097. }
  2098. }
  2099. // Merge options
  2100. if (typeof converterOptions === 'object') {
  2101. for (var opt in converterOptions) {
  2102. if (converterOptions.hasOwnProperty(opt)) {
  2103. options[opt] = converterOptions[opt];
  2104. }
  2105. }
  2106. } else {
  2107. throw Error('Converter expects the passed parameter to be an object, but ' + typeof converterOptions +
  2108. ' was passed instead.');
  2109. }
  2110. if (options.extensions) {
  2111. showdown.helper.forEach(options.extensions, _parseExtension);
  2112. }
  2113. }
  2114. /**
  2115. * Parse extension
  2116. * @param {*} ext
  2117. * @param {string} [name='']
  2118. * @private
  2119. */
  2120. function _parseExtension (ext, name) {
  2121. name = name || null;
  2122. // If it's a string, the extension was previously loaded
  2123. if (showdown.helper.isString(ext)) {
  2124. ext = showdown.helper.stdExtName(ext);
  2125. name = ext;
  2126. // LEGACY_SUPPORT CODE
  2127. if (showdown.extensions[ext]) {
  2128. console.warn('DEPRECATION WARNING: ' + ext + ' is an old extension that uses a deprecated loading method.' +
  2129. 'Please inform the developer that the extension should be updated!');
  2130. legacyExtensionLoading(showdown.extensions[ext], ext);
  2131. return;
  2132. // END LEGACY SUPPORT CODE
  2133. } else if (!showdown.helper.isUndefined(extensions[ext])) {
  2134. ext = extensions[ext];
  2135. } else {
  2136. throw Error('Extension "' + ext + '" could not be loaded. It was either not found or is not a valid extension.');
  2137. }
  2138. }
  2139. if (typeof ext === 'function') {
  2140. ext = ext();
  2141. }
  2142. if (!showdown.helper.isArray(ext)) {
  2143. ext = [ext];
  2144. }
  2145. var validExt = validate(ext, name);
  2146. if (!validExt.valid) {
  2147. throw Error(validExt.error);
  2148. }
  2149. for (var i = 0; i < ext.length; ++i) {
  2150. switch (ext[i].type) {
  2151. case 'lang':
  2152. langExtensions.push(ext[i]);
  2153. break;
  2154. case 'output':
  2155. outputModifiers.push(ext[i]);
  2156. break;
  2157. }
  2158. if (ext[i].hasOwnProperty('listeners')) {
  2159. for (var ln in ext[i].listeners) {
  2160. if (ext[i].listeners.hasOwnProperty(ln)) {
  2161. listen(ln, ext[i].listeners[ln]);
  2162. }
  2163. }
  2164. }
  2165. }
  2166. }
  2167. /**
  2168. * LEGACY_SUPPORT
  2169. * @param {*} ext
  2170. * @param {string} name
  2171. */
  2172. function legacyExtensionLoading (ext, name) {
  2173. if (typeof ext === 'function') {
  2174. ext = ext(new showdown.Converter());
  2175. }
  2176. if (!showdown.helper.isArray(ext)) {
  2177. ext = [ext];
  2178. }
  2179. var valid = validate(ext, name);
  2180. if (!valid.valid) {
  2181. throw Error(valid.error);
  2182. }
  2183. for (var i = 0; i < ext.length; ++i) {
  2184. switch (ext[i].type) {
  2185. case 'lang':
  2186. langExtensions.push(ext[i]);
  2187. break;
  2188. case 'output':
  2189. outputModifiers.push(ext[i]);
  2190. break;
  2191. default:// should never reach here
  2192. throw Error('Extension loader error: Type unrecognized!!!');
  2193. }
  2194. }
  2195. }
  2196. /**
  2197. * Listen to an event
  2198. * @param {string} name
  2199. * @param {function} callback
  2200. */
  2201. function listen (name, callback) {
  2202. if (!showdown.helper.isString(name)) {
  2203. throw Error('Invalid argument in converter.listen() method: name must be a string, but ' + typeof name + ' given');
  2204. }
  2205. if (typeof callback !== 'function') {
  2206. throw Error('Invalid argument in converter.listen() method: callback must be a function, but ' + typeof callback + ' given');
  2207. }
  2208. if (!listeners.hasOwnProperty(name)) {
  2209. listeners[name] = [];
  2210. }
  2211. listeners[name].push(callback);
  2212. }
  2213. function rTrimInputText (text) {
  2214. var rsp = text.match(/^\s*/)[0].length,
  2215. rgx = new RegExp('^\\s{0,' + rsp + '}', 'gm');
  2216. return text.replace(rgx, '');
  2217. }
  2218. /**
  2219. * Dispatch an event
  2220. * @private
  2221. * @param {string} evtName Event name
  2222. * @param {string} text Text
  2223. * @param {{}} options Converter Options
  2224. * @param {{}} globals
  2225. * @returns {string}
  2226. */
  2227. this._dispatch = function dispatch (evtName, text, options, globals) {
  2228. if (listeners.hasOwnProperty(evtName)) {
  2229. for (var ei = 0; ei < listeners[evtName].length; ++ei) {
  2230. var nText = listeners[evtName][ei](evtName, text, this, options, globals);
  2231. if (nText && typeof nText !== 'undefined') {
  2232. text = nText;
  2233. }
  2234. }
  2235. }
  2236. return text;
  2237. };
  2238. /**
  2239. * Listen to an event
  2240. * @param {string} name
  2241. * @param {function} callback
  2242. * @returns {showdown.Converter}
  2243. */
  2244. this.listen = function (name, callback) {
  2245. listen(name, callback);
  2246. return this;
  2247. };
  2248. /**
  2249. * Converts a markdown string into HTML
  2250. * @param {string} text
  2251. * @returns {*}
  2252. */
  2253. this.makeHtml = function (text) {
  2254. //check if text is not falsy
  2255. if (!text) {
  2256. return text;
  2257. }
  2258. var globals = {
  2259. gHtmlBlocks: [],
  2260. gHtmlMdBlocks: [],
  2261. gHtmlSpans: [],
  2262. gUrls: {},
  2263. gTitles: {},
  2264. gDimensions: {},
  2265. gListLevel: 0,
  2266. hashLinkCounts: {},
  2267. langExtensions: langExtensions,
  2268. outputModifiers: outputModifiers,
  2269. converter: this,
  2270. ghCodeBlocks: []
  2271. };
  2272. // This lets us use ¨ trema as an escape char to avoid md5 hashes
  2273. // The choice of character is arbitrary; anything that isn't
  2274. // magic in Markdown will work.
  2275. text = text.replace(/¨/g, '¨T');
  2276. // Replace $ with ¨D
  2277. // RegExp interprets $ as a special character
  2278. // when it's in a replacement string
  2279. text = text.replace(/\$/g, '¨D');
  2280. // Standardize line endings
  2281. text = text.replace(/\r\n/g, '\n'); // DOS to Unix
  2282. text = text.replace(/\r/g, '\n'); // Mac to Unix
  2283. // Stardardize line spaces (nbsp causes trouble in older browsers and some regex flavors)
  2284. text = text.replace(/\u00A0/g, ' ');
  2285. if (options.smartIndentationFix) {
  2286. text = rTrimInputText(text);
  2287. }
  2288. // Make sure text begins and ends with a couple of newlines:
  2289. text = '\n\n' + text + '\n\n';
  2290. // detab
  2291. text = showdown.subParser('detab')(text, options, globals);
  2292. /**
  2293. * Strip any lines consisting only of spaces and tabs.
  2294. * This makes subsequent regexs easier to write, because we can
  2295. * match consecutive blank lines with /\n+/ instead of something
  2296. * contorted like /[ \t]*\n+/
  2297. */
  2298. text = text.replace(/^[ \t]+$/mg, '');
  2299. //run languageExtensions
  2300. showdown.helper.forEach(langExtensions, function (ext) {
  2301. text = showdown.subParser('runExtension')(ext, text, options, globals);
  2302. });
  2303. // run the sub parsers
  2304. text = showdown.subParser('hashPreCodeTags')(text, options, globals);
  2305. text = showdown.subParser('githubCodeBlocks')(text, options, globals);
  2306. text = showdown.subParser('hashHTMLBlocks')(text, options, globals);
  2307. text = showdown.subParser('hashCodeTags')(text, options, globals);
  2308. text = showdown.subParser('stripLinkDefinitions')(text, options, globals);
  2309. text = showdown.subParser('blockGamut')(text, options, globals);
  2310. text = showdown.subParser('unhashHTMLSpans')(text, options, globals);
  2311. text = showdown.subParser('unescapeSpecialChars')(text, options, globals);
  2312. // attacklab: Restore dollar signs
  2313. text = text.replace(/¨D/g, '$$');
  2314. // attacklab: Restore tremas
  2315. text = text.replace(/¨T/g, '¨');
  2316. // Run output modifiers
  2317. showdown.helper.forEach(outputModifiers, function (ext) {
  2318. text = showdown.subParser('runExtension')(ext, text, options, globals);
  2319. });
  2320. return text;
  2321. };
  2322. /**
  2323. * Set an option of this Converter instance
  2324. * @param {string} key
  2325. * @param {*} value
  2326. */
  2327. this.setOption = function (key, value) {
  2328. options[key] = value;
  2329. };
  2330. /**
  2331. * Get the option of this Converter instance
  2332. * @param {string} key
  2333. * @returns {*}
  2334. */
  2335. this.getOption = function (key) {
  2336. return options[key];
  2337. };
  2338. /**
  2339. * Get the options of this Converter instance
  2340. * @returns {{}}
  2341. */
  2342. this.getOptions = function () {
  2343. return options;
  2344. };
  2345. /**
  2346. * Add extension to THIS converter
  2347. * @param {{}} extension
  2348. * @param {string} [name=null]
  2349. */
  2350. this.addExtension = function (extension, name) {
  2351. name = name || null;
  2352. _parseExtension(extension, name);
  2353. };
  2354. /**
  2355. * Use a global registered extension with THIS converter
  2356. * @param {string} extensionName Name of the previously registered extension
  2357. */
  2358. this.useExtension = function (extensionName) {
  2359. _parseExtension(extensionName);
  2360. };
  2361. /**
  2362. * Set the flavor THIS converter should use
  2363. * @param {string} name
  2364. */
  2365. this.setFlavor = function (name) {
  2366. if (!flavor.hasOwnProperty(name)) {
  2367. throw Error(name + ' flavor was not found');
  2368. }
  2369. var preset = flavor[name];
  2370. setConvFlavor = name;
  2371. for (var option in preset) {
  2372. if (preset.hasOwnProperty(option)) {
  2373. options[option] = preset[option];
  2374. }
  2375. }
  2376. };
  2377. /**
  2378. * Get the currently set flavor of this converter
  2379. * @returns {string}
  2380. */
  2381. this.getFlavor = function () {
  2382. return setConvFlavor;
  2383. };
  2384. /**
  2385. * Remove an extension from THIS converter.
  2386. * Note: This is a costly operation. It's better to initialize a new converter
  2387. * and specify the extensions you wish to use
  2388. * @param {Array} extension
  2389. */
  2390. this.removeExtension = function (extension) {
  2391. if (!showdown.helper.isArray(extension)) {
  2392. extension = [extension];
  2393. }
  2394. for (var a = 0; a < extension.length; ++a) {
  2395. var ext = extension[a];
  2396. for (var i = 0; i < langExtensions.length; ++i) {
  2397. if (langExtensions[i] === ext) {
  2398. langExtensions[i].splice(i, 1);
  2399. }
  2400. }
  2401. for (var ii = 0; ii < outputModifiers.length; ++i) {
  2402. if (outputModifiers[ii] === ext) {
  2403. outputModifiers[ii].splice(i, 1);
  2404. }
  2405. }
  2406. }
  2407. };
  2408. /**
  2409. * Get all extension of THIS converter
  2410. * @returns {{language: Array, output: Array}}
  2411. */
  2412. this.getAllExtensions = function () {
  2413. return {
  2414. language: langExtensions,
  2415. output: outputModifiers
  2416. };
  2417. };
  2418. };
  2419. /**
  2420. * Turn Markdown link shortcuts into XHTML <a> tags.
  2421. */
  2422. showdown.subParser('anchors', function (text, options, globals) {
  2423. 'use strict';
  2424. text = globals.converter._dispatch('anchors.before', text, options, globals);
  2425. var writeAnchorTag = function (wholeMatch, linkText, linkId, url, m5, m6, title) {
  2426. if (showdown.helper.isUndefined(title)) {
  2427. title = '';
  2428. }
  2429. linkId = linkId.toLowerCase();
  2430. // Special case for explicit empty url
  2431. if (wholeMatch.search(/\(<?\s*>? ?(['"].*['"])?\)$/m) > -1) {
  2432. url = '';
  2433. } else if (!url) {
  2434. if (!linkId) {
  2435. // lower-case and turn embedded newlines into spaces
  2436. linkId = linkText.toLowerCase().replace(/ ?\n/g, ' ');
  2437. }
  2438. url = '#' + linkId;
  2439. if (!showdown.helper.isUndefined(globals.gUrls[linkId])) {
  2440. url = globals.gUrls[linkId];
  2441. if (!showdown.helper.isUndefined(globals.gTitles[linkId])) {
  2442. title = globals.gTitles[linkId];
  2443. }
  2444. } else {
  2445. return wholeMatch;
  2446. }
  2447. }
  2448. //url = showdown.helper.escapeCharacters(url, '*_', false); // replaced line to improve performance
  2449. url = url.replace(showdown.helper.regexes.asteriskDashAndColon, showdown.helper.escapeCharactersCallback);
  2450. var result = '<a href="' + url + '"';
  2451. if (title !== '' && title !== null) {
  2452. title = title.replace(/"/g, '&quot;');
  2453. //title = showdown.helper.escapeCharacters(title, '*_', false); // replaced line to improve performance
  2454. title = title.replace(showdown.helper.regexes.asteriskDashAndColon, showdown.helper.escapeCharactersCallback);
  2455. result += ' title="' + title + '"';
  2456. }
  2457. if (options.openLinksInNewWindow) {
  2458. // escaped _
  2459. result += ' target="¨E95Eblank"';
  2460. }
  2461. result += '>' + linkText + '</a>';
  2462. return result;
  2463. };
  2464. // First, handle reference-style links: [link text] [id]
  2465. text = text.replace(/\[((?:\[[^\]]*]|[^\[\]])*)] ?(?:\n *)?\[(.*?)]()()()()/g, writeAnchorTag);
  2466. // Next, inline-style links: [link text](url "optional title")
  2467. // cases with crazy urls like ./image/cat1).png
  2468. text = text.replace(/\[((?:\[[^\]]*]|[^\[\]])*)]()[ \t]*\([ \t]?<([^>]*)>(?:[ \t]*((["'])([^"]*?)\5))?[ \t]?\)/g,
  2469. writeAnchorTag);
  2470. // normal cases
  2471. text = text.replace(/\[((?:\[[^\]]*]|[^\[\]])*)]()[ \t]*\([ \t]?<?([\S]+?(?:\([\S]*?\)[\S]*?)?)>?(?:[ \t]*((["'])([^"]*?)\5))?[ \t]?\)/g,
  2472. writeAnchorTag);
  2473. // handle reference-style shortcuts: [link text]
  2474. // These must come last in case you've also got [link test][1]
  2475. // or [link test](/foo)
  2476. text = text.replace(/\[([^\[\]]+)]()()()()()/g, writeAnchorTag);
  2477. // Lastly handle GithubMentions if option is enabled
  2478. if (options.ghMentions) {
  2479. text = text.replace(/(^|\s)(\\)?(@([a-z\d\-]+))(?=[.!?;,[\]()]|\s|$)/gmi, function (wm, st, escape, mentions, username) {
  2480. if (escape === '\\') {
  2481. return st + mentions;
  2482. }
  2483. //check if options.ghMentionsLink is a string
  2484. if (!showdown.helper.isString(options.ghMentionsLink)) {
  2485. throw new Error('ghMentionsLink option must be a string');
  2486. }
  2487. var lnk = options.ghMentionsLink.replace(/\{u}/g, username),
  2488. target = '';
  2489. if (options.openLinksInNewWindow) {
  2490. target = ' target="¨E95Eblank"';
  2491. }
  2492. return st + '<a href="' + lnk + '"' + target + '>' + mentions + '</a>';
  2493. });
  2494. }
  2495. text = globals.converter._dispatch('anchors.after', text, options, globals);
  2496. return text;
  2497. });
  2498. // url allowed chars [a-z\d_.~:/?#[]@!$&'()*+,;=-]
  2499. var simpleURLRegex = /([*~_]+|\b)(((https?|ftp|dict):\/\/|www\.)[^'">\s]+?\.[^'">\s]+?)()(\1)?(?=\s|$)(?!["<>])/gi,
  2500. simpleURLRegex2 = /([*~_]+|\b)(((https?|ftp|dict):\/\/|www\.)[^'">\s]+\.[^'">\s]+?)([.!?,()\[\]])?(\1)?(?=\s|$)(?!["<>])/gi,
  2501. delimUrlRegex = /()<(((https?|ftp|dict):\/\/|www\.)[^'">\s]+)()>()/gi,
  2502. simpleMailRegex = /(^|\s)(?:mailto:)?([A-Za-z0-9!#$%&'*+-/=?^_`{|}~.]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)(?=$|\s)/gmi,
  2503. delimMailRegex = /<()(?:mailto:)?([-.\w]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)>/gi,
  2504. replaceLink = function (options) {
  2505. 'use strict';
  2506. return function (wm, leadingMagicChars, link, m2, m3, trailingPunctuation, trailingMagicChars) {
  2507. link = link.replace(showdown.helper.regexes.asteriskDashAndColon, showdown.helper.escapeCharactersCallback);
  2508. var lnkTxt = link,
  2509. append = '',
  2510. target = '',
  2511. lmc = leadingMagicChars || '',
  2512. tmc = trailingMagicChars || '';
  2513. if (/^www\./i.test(link)) {
  2514. link = link.replace(/^www\./i, 'http://www.');
  2515. }
  2516. if (options.excludeTrailingPunctuationFromURLs && trailingPunctuation) {
  2517. append = trailingPunctuation;
  2518. }
  2519. if (options.openLinksInNewWindow) {
  2520. target = ' target="¨E95Eblank"';
  2521. }
  2522. return lmc + '<a href="' + link + '"' + target + '>' + lnkTxt + '</a>' + append + tmc;
  2523. };
  2524. },
  2525. replaceMail = function (options, globals) {
  2526. 'use strict';
  2527. return function (wholeMatch, b, mail) {
  2528. var href = 'mailto:';
  2529. b = b || '';
  2530. mail = showdown.subParser('unescapeSpecialChars')(mail, options, globals);
  2531. if (options.encodeEmails) {
  2532. href = showdown.helper.encodeEmailAddress(href + mail);
  2533. mail = showdown.helper.encodeEmailAddress(mail);
  2534. } else {
  2535. href = href + mail;
  2536. }
  2537. return b + '<a href="' + href + '">' + mail + '</a>';
  2538. };
  2539. };
  2540. showdown.subParser('autoLinks', function (text, options, globals) {
  2541. 'use strict';
  2542. text = globals.converter._dispatch('autoLinks.before', text, options, globals);
  2543. text = text.replace(delimUrlRegex, replaceLink(options));
  2544. text = text.replace(delimMailRegex, replaceMail(options, globals));
  2545. text = globals.converter._dispatch('autoLinks.after', text, options, globals);
  2546. return text;
  2547. });
  2548. showdown.subParser('simplifiedAutoLinks', function (text, options, globals) {
  2549. 'use strict';
  2550. if (!options.simplifiedAutoLink) {
  2551. return text;
  2552. }
  2553. text = globals.converter._dispatch('simplifiedAutoLinks.before', text, options, globals);
  2554. if (options.excludeTrailingPunctuationFromURLs) {
  2555. text = text.replace(simpleURLRegex2, replaceLink(options));
  2556. } else {
  2557. text = text.replace(simpleURLRegex, replaceLink(options));
  2558. }
  2559. text = text.replace(simpleMailRegex, replaceMail(options, globals));
  2560. text = globals.converter._dispatch('simplifiedAutoLinks.after', text, options, globals);
  2561. return text;
  2562. });
  2563. /**
  2564. * These are all the transformations that form block-level
  2565. * tags like paragraphs, headers, and list items.
  2566. */
  2567. showdown.subParser('blockGamut', function (text, options, globals) {
  2568. 'use strict';
  2569. text = globals.converter._dispatch('blockGamut.before', text, options, globals);
  2570. // we parse blockquotes first so that we can have headings and hrs
  2571. // inside blockquotes
  2572. text = showdown.subParser('blockQuotes')(text, options, globals);
  2573. text = showdown.subParser('headers')(text, options, globals);
  2574. // Do Horizontal Rules:
  2575. text = showdown.subParser('horizontalRule')(text, options, globals);
  2576. text = showdown.subParser('lists')(text, options, globals);
  2577. text = showdown.subParser('codeBlocks')(text, options, globals);
  2578. text = showdown.subParser('tables')(text, options, globals);
  2579. // We already ran _HashHTMLBlocks() before, in Markdown(), but that
  2580. // was to escape raw HTML in the original Markdown source. This time,
  2581. // we're escaping the markup we've just created, so that we don't wrap
  2582. // <p> tags around block-level tags.
  2583. text = showdown.subParser('hashHTMLBlocks')(text, options, globals);
  2584. text = showdown.subParser('paragraphs')(text, options, globals);
  2585. text = globals.converter._dispatch('blockGamut.after', text, options, globals);
  2586. return text;
  2587. });
  2588. showdown.subParser('blockQuotes', function (text, options, globals) {
  2589. 'use strict';
  2590. text = globals.converter._dispatch('blockQuotes.before', text, options, globals);
  2591. text = text.replace(/((^ {0,3}>[ \t]?.+\n(.+\n)*\n*)+)/gm, function (wholeMatch, m1) {
  2592. var bq = m1;
  2593. // attacklab: hack around Konqueror 3.5.4 bug:
  2594. // "----------bug".replace(/^-/g,"") == "bug"
  2595. bq = bq.replace(/^[ \t]*>[ \t]?/gm, '¨0'); // trim one level of quoting
  2596. // attacklab: clean up hack
  2597. bq = bq.replace(/¨0/g, '');
  2598. bq = bq.replace(/^[ \t]+$/gm, ''); // trim whitespace-only lines
  2599. bq = showdown.subParser('githubCodeBlocks')(bq, options, globals);
  2600. bq = showdown.subParser('blockGamut')(bq, options, globals); // recurse
  2601. bq = bq.replace(/(^|\n)/g, '$1 ');
  2602. // These leading spaces screw with <pre> content, so we need to fix that:
  2603. bq = bq.replace(/(\s*<pre>[^\r]+?<\/pre>)/gm, function (wholeMatch, m1) {
  2604. var pre = m1;
  2605. // attacklab: hack around Konqueror 3.5.4 bug:
  2606. pre = pre.replace(/^ /mg, '¨0');
  2607. pre = pre.replace(/¨0/g, '');
  2608. return pre;
  2609. });
  2610. return showdown.subParser('hashBlock')('<blockquote>\n' + bq + '\n</blockquote>', options, globals);
  2611. });
  2612. text = globals.converter._dispatch('blockQuotes.after', text, options, globals);
  2613. return text;
  2614. });
  2615. /**
  2616. * Process Markdown `<pre><code>` blocks.
  2617. */
  2618. showdown.subParser('codeBlocks', function (text, options, globals) {
  2619. 'use strict';
  2620. text = globals.converter._dispatch('codeBlocks.before', text, options, globals);
  2621. // sentinel workarounds for lack of \A and \Z, safari\khtml bug
  2622. text += '¨0';
  2623. var pattern = /(?:\n\n|^)((?:(?:[ ]{4}|\t).*\n+)+)(\n*[ ]{0,3}[^ \t\n]|(?=¨0))/g;
  2624. text = text.replace(pattern, function (wholeMatch, m1, m2) {
  2625. var codeblock = m1,
  2626. nextChar = m2,
  2627. end = '\n';
  2628. codeblock = showdown.subParser('outdent')(codeblock, options, globals);
  2629. codeblock = showdown.subParser('encodeCode')(codeblock, options, globals);
  2630. codeblock = showdown.subParser('detab')(codeblock, options, globals);
  2631. codeblock = codeblock.replace(/^\n+/g, ''); // trim leading newlines
  2632. codeblock = codeblock.replace(/\n+$/g, ''); // trim trailing newlines
  2633. if (options.omitExtraWLInCodeBlocks) {
  2634. end = '';
  2635. }
  2636. codeblock = '<pre><code>' + codeblock + end + '</code></pre>';
  2637. return showdown.subParser('hashBlock')(codeblock, options, globals) + nextChar;
  2638. });
  2639. // strip sentinel
  2640. text = text.replace(/¨0/, '');
  2641. text = globals.converter._dispatch('codeBlocks.after', text, options, globals);
  2642. return text;
  2643. });
  2644. /**
  2645. *
  2646. * * Backtick quotes are used for <code></code> spans.
  2647. *
  2648. * * You can use multiple backticks as the delimiters if you want to
  2649. * include literal backticks in the code span. So, this input:
  2650. *
  2651. * Just type ``foo `bar` baz`` at the prompt.
  2652. *
  2653. * Will translate to:
  2654. *
  2655. * <p>Just type <code>foo `bar` baz</code> at the prompt.</p>
  2656. *
  2657. * There's no arbitrary limit to the number of backticks you
  2658. * can use as delimters. If you need three consecutive backticks
  2659. * in your code, use four for delimiters, etc.
  2660. *
  2661. * * You can use spaces to get literal backticks at the edges:
  2662. *
  2663. * ... type `` `bar` `` ...
  2664. *
  2665. * Turns to:
  2666. *
  2667. * ... type <code>`bar`</code> ...
  2668. */
  2669. showdown.subParser('codeSpans', function (text, options, globals) {
  2670. 'use strict';
  2671. text = globals.converter._dispatch('codeSpans.before', text, options, globals);
  2672. if (typeof(text) === 'undefined') {
  2673. text = '';
  2674. }
  2675. text = text.replace(/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm,
  2676. function (wholeMatch, m1, m2, m3) {
  2677. var c = m3;
  2678. c = c.replace(/^([ \t]*)/g, ''); // leading whitespace
  2679. c = c.replace(/[ \t]*$/g, ''); // trailing whitespace
  2680. c = showdown.subParser('encodeCode')(c, options, globals);
  2681. return m1 + '<code>' + c + '</code>';
  2682. }
  2683. );
  2684. text = globals.converter._dispatch('codeSpans.after', text, options, globals);
  2685. return text;
  2686. });
  2687. /**
  2688. * Convert all tabs to spaces
  2689. */
  2690. showdown.subParser('detab', function (text, options, globals) {
  2691. 'use strict';
  2692. text = globals.converter._dispatch('detab.before', text, options, globals);
  2693. // expand first n-1 tabs
  2694. text = text.replace(/\t(?=\t)/g, ' '); // g_tab_width
  2695. // replace the nth with two sentinels
  2696. text = text.replace(/\t/g, '¨A¨B');
  2697. // use the sentinel to anchor our regex so it doesn't explode
  2698. text = text.replace(/¨B(.+?)¨A/g, function (wholeMatch, m1) {
  2699. var leadingText = m1,
  2700. numSpaces = 4 - leadingText.length % 4; // g_tab_width
  2701. // there *must* be a better way to do this:
  2702. for (var i = 0; i < numSpaces; i++) {
  2703. leadingText += ' ';
  2704. }
  2705. return leadingText;
  2706. });
  2707. // clean up sentinels
  2708. text = text.replace(/¨A/g, ' '); // g_tab_width
  2709. text = text.replace(/¨B/g, '');
  2710. text = globals.converter._dispatch('detab.after', text, options, globals);
  2711. return text;
  2712. });
  2713. /**
  2714. * These are all the transformations that occur *within* block-level
  2715. * tags like paragraphs, headers, and list items.
  2716. */
  2717. showdown.subParser('emoji', function (text, options, globals) {
  2718. 'use strict';
  2719. if (!options.emoji) {
  2720. return text;
  2721. }
  2722. text = globals.converter._dispatch('emoji.before', text, options, globals);
  2723. var emojiRgx = /:([\S]+?):/g;
  2724. text = text.replace(emojiRgx, function (wm, emojiCode) {
  2725. if (showdown.helper.emojis.hasOwnProperty(emojiCode)) {
  2726. return showdown.helper.emojis[emojiCode];
  2727. }
  2728. return wm;
  2729. });
  2730. text = globals.converter._dispatch('emoji.after', text, options, globals);
  2731. return text;
  2732. });
  2733. /**
  2734. * Smart processing for ampersands and angle brackets that need to be encoded.
  2735. */
  2736. showdown.subParser('encodeAmpsAndAngles', function (text, options, globals) {
  2737. 'use strict';
  2738. text = globals.converter._dispatch('encodeAmpsAndAngles.before', text, options, globals);
  2739. // Ampersand-encoding based entirely on Nat Irons's Amputator MT plugin:
  2740. // http://bumppo.net/projects/amputator/
  2741. text = text.replace(/&(?!#?[xX]?(?:[0-9a-fA-F]+|\w+);)/g, '&amp;');
  2742. // Encode naked <'s
  2743. text = text.replace(/<(?![a-z\/?$!])/gi, '&lt;');
  2744. // Encode <
  2745. text = text.replace(/</g, '&lt;');
  2746. // Encode >
  2747. text = text.replace(/>/g, '&gt;');
  2748. text = globals.converter._dispatch('encodeAmpsAndAngles.after', text, options, globals);
  2749. return text;
  2750. });
  2751. /**
  2752. * Returns the string, with after processing the following backslash escape sequences.
  2753. *
  2754. * attacklab: The polite way to do this is with the new escapeCharacters() function:
  2755. *
  2756. * text = escapeCharacters(text,"\\",true);
  2757. * text = escapeCharacters(text,"`*_{}[]()>#+-.!",true);
  2758. *
  2759. * ...but we're sidestepping its use of the (slow) RegExp constructor
  2760. * as an optimization for Firefox. This function gets called a LOT.
  2761. */
  2762. showdown.subParser('encodeBackslashEscapes', function (text, options, globals) {
  2763. 'use strict';
  2764. text = globals.converter._dispatch('encodeBackslashEscapes.before', text, options, globals);
  2765. text = text.replace(/\\(\\)/g, showdown.helper.escapeCharactersCallback);
  2766. text = text.replace(/\\([`*_{}\[\]()>#+.!~=|-])/g, showdown.helper.escapeCharactersCallback);
  2767. text = globals.converter._dispatch('encodeBackslashEscapes.after', text, options, globals);
  2768. return text;
  2769. });
  2770. /**
  2771. * Encode/escape certain characters inside Markdown code runs.
  2772. * The point is that in code, these characters are literals,
  2773. * and lose their special Markdown meanings.
  2774. */
  2775. showdown.subParser('encodeCode', function (text, options, globals) {
  2776. 'use strict';
  2777. text = globals.converter._dispatch('encodeCode.before', text, options, globals);
  2778. // Encode all ampersands; HTML entities are not
  2779. // entities within a Markdown code span.
  2780. text = text
  2781. .replace(/&/g, '&amp;')
  2782. // Do the angle bracket song and dance:
  2783. .replace(/</g, '&lt;')
  2784. .replace(/>/g, '&gt;')
  2785. // Now, escape characters that are magic in Markdown:
  2786. .replace(/([*_{}\[\]\\=~-])/g, showdown.helper.escapeCharactersCallback);
  2787. text = globals.converter._dispatch('encodeCode.after', text, options, globals);
  2788. return text;
  2789. });
  2790. /**
  2791. * Within tags -- meaning between < and > -- encode [\ ` * _ ~ =] so they
  2792. * don't conflict with their use in Markdown for code, italics and strong.
  2793. */
  2794. showdown.subParser('escapeSpecialCharsWithinTagAttributes', function (text, options, globals) {
  2795. 'use strict';
  2796. text = globals.converter._dispatch('escapeSpecialCharsWithinTagAttributes.before', text, options, globals);
  2797. // Build a regex to find HTML tags.
  2798. var tags = /<\/?[a-z\d_:-]+(?:[\s]+[\s\S]+?)?>/gi,
  2799. comments = /<!(--(?:(?:[^>-]|-[^>])(?:[^-]|-[^-])*)--)>/gi;
  2800. text = text.replace(tags, function (wholeMatch) {
  2801. return wholeMatch
  2802. .replace(/(.)<\/?code>(?=.)/g, '$1`')
  2803. .replace(/([\\`*_~=|])/g, showdown.helper.escapeCharactersCallback);
  2804. });
  2805. text = text.replace(comments, function (wholeMatch) {
  2806. return wholeMatch
  2807. .replace(/([\\`*_~=|])/g, showdown.helper.escapeCharactersCallback);
  2808. });
  2809. text = globals.converter._dispatch('escapeSpecialCharsWithinTagAttributes.after', text, options, globals);
  2810. return text;
  2811. });
  2812. /**
  2813. * Handle github codeblocks prior to running HashHTML so that
  2814. * HTML contained within the codeblock gets escaped properly
  2815. * Example:
  2816. * ```ruby
  2817. * def hello_world(x)
  2818. * puts "Hello, #{x}"
  2819. * end
  2820. * ```
  2821. */
  2822. showdown.subParser('githubCodeBlocks', function (text, options, globals) {
  2823. 'use strict';
  2824. // early exit if option is not enabled
  2825. if (!options.ghCodeBlocks) {
  2826. return text;
  2827. }
  2828. text = globals.converter._dispatch('githubCodeBlocks.before', text, options, globals);
  2829. text += '¨0';
  2830. text = text.replace(/(?:^|\n)```(.*)\n([\s\S]*?)\n```/g, function (wholeMatch, language, codeblock) {
  2831. var end = (options.omitExtraWLInCodeBlocks) ? '' : '\n';
  2832. // First parse the github code block
  2833. codeblock = showdown.subParser('encodeCode')(codeblock, options, globals);
  2834. codeblock = showdown.subParser('detab')(codeblock, options, globals);
  2835. codeblock = codeblock.replace(/^\n+/g, ''); // trim leading newlines
  2836. codeblock = codeblock.replace(/\n+$/g, ''); // trim trailing whitespace
  2837. codeblock = '<pre><code' + (language ? ' class="' + language + ' language-' + language + '"' : '') + '>' + codeblock + end + '</code></pre>';
  2838. codeblock = showdown.subParser('hashBlock')(codeblock, options, globals);
  2839. // Since GHCodeblocks can be false positives, we need to
  2840. // store the primitive text and the parsed text in a global var,
  2841. // and then return a token
  2842. return '\n\n¨G' + (globals.ghCodeBlocks.push({text: wholeMatch, codeblock: codeblock}) - 1) + 'G\n\n';
  2843. });
  2844. // attacklab: strip sentinel
  2845. text = text.replace(/¨0/, '');
  2846. return globals.converter._dispatch('githubCodeBlocks.after', text, options, globals);
  2847. });
  2848. showdown.subParser('hashBlock', function (text, options, globals) {
  2849. 'use strict';
  2850. text = globals.converter._dispatch('hashBlock.before', text, options, globals);
  2851. text = text.replace(/(^\n+|\n+$)/g, '');
  2852. text = '\n\n¨K' + (globals.gHtmlBlocks.push(text) - 1) + 'K\n\n';
  2853. text = globals.converter._dispatch('hashBlock.after', text, options, globals);
  2854. return text;
  2855. });
  2856. /**
  2857. * Hash and escape <code> elements that should not be parsed as markdown
  2858. */
  2859. showdown.subParser('hashCodeTags', function (text, options, globals) {
  2860. 'use strict';
  2861. text = globals.converter._dispatch('hashCodeTags.before', text, options, globals);
  2862. var repFunc = function (wholeMatch, match, left, right) {
  2863. var codeblock = left + showdown.subParser('encodeCode')(match, options, globals) + right;
  2864. return '¨C' + (globals.gHtmlSpans.push(codeblock) - 1) + 'C';
  2865. };
  2866. // Hash naked <code>
  2867. text = showdown.helper.replaceRecursiveRegExp(text, repFunc, '<code\\b[^>]*>', '</code>', 'gim');
  2868. text = globals.converter._dispatch('hashCodeTags.after', text, options, globals);
  2869. return text;
  2870. });
  2871. showdown.subParser('hashElement', function (text, options, globals) {
  2872. 'use strict';
  2873. return function (wholeMatch, m1) {
  2874. var blockText = m1;
  2875. // Undo double lines
  2876. blockText = blockText.replace(/\n\n/g, '\n');
  2877. blockText = blockText.replace(/^\n/, '');
  2878. // strip trailing blank lines
  2879. blockText = blockText.replace(/\n+$/g, '');
  2880. // Replace the element text with a marker ("¨KxK" where x is its key)
  2881. blockText = '\n\n¨K' + (globals.gHtmlBlocks.push(blockText) - 1) + 'K\n\n';
  2882. return blockText;
  2883. };
  2884. });
  2885. showdown.subParser('hashHTMLBlocks', function (text, options, globals) {
  2886. 'use strict';
  2887. text = globals.converter._dispatch('hashHTMLBlocks.before', text, options, globals);
  2888. var blockTags = [
  2889. 'pre',
  2890. 'div',
  2891. 'h1',
  2892. 'h2',
  2893. 'h3',
  2894. 'h4',
  2895. 'h5',
  2896. 'h6',
  2897. 'blockquote',
  2898. 'table',
  2899. 'dl',
  2900. 'ol',
  2901. 'ul',
  2902. 'script',
  2903. 'noscript',
  2904. 'form',
  2905. 'fieldset',
  2906. 'iframe',
  2907. 'math',
  2908. 'style',
  2909. 'section',
  2910. 'header',
  2911. 'footer',
  2912. 'nav',
  2913. 'article',
  2914. 'aside',
  2915. 'address',
  2916. 'audio',
  2917. 'canvas',
  2918. 'figure',
  2919. 'hgroup',
  2920. 'output',
  2921. 'video',
  2922. 'p'
  2923. ],
  2924. repFunc = function (wholeMatch, match, left, right) {
  2925. var txt = wholeMatch;
  2926. // check if this html element is marked as markdown
  2927. // if so, it's contents should be parsed as markdown
  2928. if (left.search(/\bmarkdown\b/) !== -1) {
  2929. txt = left + globals.converter.makeHtml(match) + right;
  2930. }
  2931. return '\n\n¨K' + (globals.gHtmlBlocks.push(txt) - 1) + 'K\n\n';
  2932. };
  2933. if (options.backslashEscapesHTMLTags) {
  2934. // encode backslash escaped HTML tags
  2935. text = text.replace(/\\<(\/?[^>]+?)>/g, function (wm, inside) {
  2936. return '&lt;' + inside + '&gt;';
  2937. });
  2938. }
  2939. // hash HTML Blocks
  2940. for (var i = 0; i < blockTags.length; ++i) {
  2941. var opTagPos,
  2942. rgx1 = new RegExp('^ {0,3}(<' + blockTags[i] + '\\b[^>]*>)', 'im'),
  2943. patLeft = '<' + blockTags[i] + '\\b[^>]*>',
  2944. patRight = '</' + blockTags[i] + '>';
  2945. // 1. Look for the first position of the first opening HTML tag in the text
  2946. while ((opTagPos = showdown.helper.regexIndexOf(text, rgx1)) !== -1) {
  2947. // if the HTML tag is \ escaped, we need to escape it and break
  2948. //2. Split the text in that position
  2949. var subTexts = showdown.helper.splitAtIndex(text, opTagPos),
  2950. //3. Match recursively
  2951. newSubText1 = showdown.helper.replaceRecursiveRegExp(subTexts[1], repFunc, patLeft, patRight, 'im');
  2952. // prevent an infinite loop
  2953. if (newSubText1 === subTexts[1]) {
  2954. break;
  2955. }
  2956. text = subTexts[0].concat(newSubText1);
  2957. }
  2958. }
  2959. // HR SPECIAL CASE
  2960. text = text.replace(/(\n {0,3}(<(hr)\b([^<>])*?\/?>)[ \t]*(?=\n{2,}))/g,
  2961. showdown.subParser('hashElement')(text, options, globals));
  2962. // Special case for standalone HTML comments
  2963. text = showdown.helper.replaceRecursiveRegExp(text, function (txt) {
  2964. return '\n\n¨K' + (globals.gHtmlBlocks.push(txt) - 1) + 'K\n\n';
  2965. }, '^ {0,3}<!--', '-->', 'gm');
  2966. // PHP and ASP-style processor instructions (<?...?> and <%...%>)
  2967. text = text.replace(/(?:\n\n)( {0,3}(?:<([?%])[^\r]*?\2>)[ \t]*(?=\n{2,}))/g,
  2968. showdown.subParser('hashElement')(text, options, globals));
  2969. text = globals.converter._dispatch('hashHTMLBlocks.after', text, options, globals);
  2970. return text;
  2971. });
  2972. /**
  2973. * Hash span elements that should not be parsed as markdown
  2974. */
  2975. showdown.subParser('hashHTMLSpans', function (text, options, globals) {
  2976. 'use strict';
  2977. text = globals.converter._dispatch('hashHTMLSpans.before', text, options, globals);
  2978. function hashHTMLSpan (html) {
  2979. return '¨C' + (globals.gHtmlSpans.push(html) - 1) + 'C';
  2980. }
  2981. // Hash Self Closing tags
  2982. text = text.replace(/<[^>]+?\/>/gi, function (wm) {
  2983. return hashHTMLSpan(wm);
  2984. });
  2985. // Hash tags without properties
  2986. text = text.replace(/<([^>]+?)>[\s\S]*?<\/\1>/g, function (wm) {
  2987. return hashHTMLSpan(wm);
  2988. });
  2989. // Hash tags with properties
  2990. text = text.replace(/<([^>]+?)\s[^>]+?>[\s\S]*?<\/\1>/g, function (wm) {
  2991. return hashHTMLSpan(wm);
  2992. });
  2993. // Hash self closing tags without />
  2994. text = text.replace(/<[^>]+?>/gi, function (wm) {
  2995. return hashHTMLSpan(wm);
  2996. });
  2997. /*showdown.helper.matchRecursiveRegExp(text, '<code\\b[^>]*>', '</code>', 'gi');*/
  2998. text = globals.converter._dispatch('hashHTMLSpans.after', text, options, globals);
  2999. return text;
  3000. });
  3001. /**
  3002. * Unhash HTML spans
  3003. */
  3004. showdown.subParser('unhashHTMLSpans', function (text, options, globals) {
  3005. 'use strict';
  3006. text = globals.converter._dispatch('unhashHTMLSpans.before', text, options, globals);
  3007. for (var i = 0; i < globals.gHtmlSpans.length; ++i) {
  3008. var repText = globals.gHtmlSpans[i],
  3009. // limiter to prevent infinite loop (assume 10 as limit for recurse)
  3010. limit = 0;
  3011. while (/¨C(\d+)C/.test(repText)) {
  3012. var num = RegExp.$1;
  3013. repText = repText.replace('¨C' + num + 'C', globals.gHtmlSpans[num]);
  3014. if (limit === 10) {
  3015. break;
  3016. }
  3017. ++limit;
  3018. }
  3019. text = text.replace('¨C' + i + 'C', repText);
  3020. }
  3021. text = globals.converter._dispatch('unhashHTMLSpans.after', text, options, globals);
  3022. return text;
  3023. });
  3024. /**
  3025. * Hash and escape <pre><code> elements that should not be parsed as markdown
  3026. */
  3027. showdown.subParser('hashPreCodeTags', function (text, options, globals) {
  3028. 'use strict';
  3029. text = globals.converter._dispatch('hashPreCodeTags.before', text, options, globals);
  3030. var repFunc = function (wholeMatch, match, left, right) {
  3031. // encode html entities
  3032. var codeblock = left + showdown.subParser('encodeCode')(match, options, globals) + right;
  3033. return '\n\n¨G' + (globals.ghCodeBlocks.push({text: wholeMatch, codeblock: codeblock}) - 1) + 'G\n\n';
  3034. };
  3035. // Hash <pre><code>
  3036. text = showdown.helper.replaceRecursiveRegExp(text, repFunc, '^ {0,3}<pre\\b[^>]*>\\s*<code\\b[^>]*>', '^ {0,3}</code>\\s*</pre>', 'gim');
  3037. text = globals.converter._dispatch('hashPreCodeTags.after', text, options, globals);
  3038. return text;
  3039. });
  3040. showdown.subParser('headers', function (text, options, globals) {
  3041. 'use strict';
  3042. text = globals.converter._dispatch('headers.before', text, options, globals);
  3043. var headerLevelStart = (isNaN(parseInt(options.headerLevelStart))) ? 1 : parseInt(options.headerLevelStart),
  3044. // Set text-style headers:
  3045. // Header 1
  3046. // ========
  3047. //
  3048. // Header 2
  3049. // --------
  3050. //
  3051. setextRegexH1 = (options.smoothLivePreview) ? /^(.+)[ \t]*\n={2,}[ \t]*\n+/gm : /^(.+)[ \t]*\n=+[ \t]*\n+/gm,
  3052. setextRegexH2 = (options.smoothLivePreview) ? /^(.+)[ \t]*\n-{2,}[ \t]*\n+/gm : /^(.+)[ \t]*\n-+[ \t]*\n+/gm;
  3053. text = text.replace(setextRegexH1, function (wholeMatch, m1) {
  3054. var spanGamut = showdown.subParser('spanGamut')(m1, options, globals),
  3055. hID = (options.noHeaderId) ? '' : ' id="' + headerId(m1) + '"',
  3056. hLevel = headerLevelStart,
  3057. hashBlock = '<h' + hLevel + hID + '>' + spanGamut + '</h' + hLevel + '>';
  3058. return showdown.subParser('hashBlock')(hashBlock, options, globals);
  3059. });
  3060. text = text.replace(setextRegexH2, function (matchFound, m1) {
  3061. var spanGamut = showdown.subParser('spanGamut')(m1, options, globals),
  3062. hID = (options.noHeaderId) ? '' : ' id="' + headerId(m1) + '"',
  3063. hLevel = headerLevelStart + 1,
  3064. hashBlock = '<h' + hLevel + hID + '>' + spanGamut + '</h' + hLevel + '>';
  3065. return showdown.subParser('hashBlock')(hashBlock, options, globals);
  3066. });
  3067. // atx-style headers:
  3068. // # Header 1
  3069. // ## Header 2
  3070. // ## Header 2 with closing hashes ##
  3071. // ...
  3072. // ###### Header 6
  3073. //
  3074. var atxStyle = (options.requireSpaceBeforeHeadingText) ? /^(#{1,6})[ \t]+(.+?)[ \t]*#*\n+/gm : /^(#{1,6})[ \t]*(.+?)[ \t]*#*\n+/gm;
  3075. text = text.replace(atxStyle, function (wholeMatch, m1, m2) {
  3076. var hText = m2;
  3077. if (options.customizedHeaderId) {
  3078. hText = m2.replace(/\s?\{([^{]+?)}\s*$/, '');
  3079. }
  3080. var span = showdown.subParser('spanGamut')(hText, options, globals),
  3081. hID = (options.noHeaderId) ? '' : ' id="' + headerId(m2) + '"',
  3082. hLevel = headerLevelStart - 1 + m1.length,
  3083. header = '<h' + hLevel + hID + '>' + span + '</h' + hLevel + '>';
  3084. return showdown.subParser('hashBlock')(header, options, globals);
  3085. });
  3086. function headerId (m) {
  3087. var title,
  3088. prefix;
  3089. // It is separate from other options to allow combining prefix and customized
  3090. if (options.customizedHeaderId) {
  3091. var match = m.match(/\{([^{]+?)}\s*$/);
  3092. if (match && match[1]) {
  3093. m = match[1];
  3094. }
  3095. }
  3096. title = m;
  3097. // Prefix id to prevent causing inadvertent pre-existing style matches.
  3098. if (showdown.helper.isString(options.prefixHeaderId)) {
  3099. prefix = options.prefixHeaderId;
  3100. } else if (options.prefixHeaderId === true) {
  3101. prefix = 'section-';
  3102. } else {
  3103. prefix = '';
  3104. }
  3105. if (!options.rawPrefixHeaderId) {
  3106. title = prefix + title;
  3107. }
  3108. if (options.ghCompatibleHeaderId) {
  3109. title = title
  3110. .replace(/ /g, '-')
  3111. // replace previously escaped chars (&, ¨ and $)
  3112. .replace(/&amp;/g, '')
  3113. .replace(/¨T/g, '')
  3114. .replace(/¨D/g, '')
  3115. // replace rest of the chars (&~$ are repeated as they might have been escaped)
  3116. // borrowed from github's redcarpet (some they should produce similar results)
  3117. .replace(/[&+$,\/:;=?@"#{}|^¨~\[\]`\\*)(%.!'<>]/g, '')
  3118. .toLowerCase();
  3119. } else if (options.rawHeaderId) {
  3120. title = title
  3121. .replace(/ /g, '-')
  3122. // replace previously escaped chars (&, ¨ and $)
  3123. .replace(/&amp;/g, '&')
  3124. .replace(/¨T/g, '¨')
  3125. .replace(/¨D/g, '$')
  3126. // replace " and '
  3127. .replace(/["']/g, '-')
  3128. .toLowerCase();
  3129. } else {
  3130. title = title
  3131. .replace(/[^\w]/g, '')
  3132. .toLowerCase();
  3133. }
  3134. if (options.rawPrefixHeaderId) {
  3135. title = prefix + title;
  3136. }
  3137. if (globals.hashLinkCounts[title]) {
  3138. title = title + '-' + (globals.hashLinkCounts[title]++);
  3139. } else {
  3140. globals.hashLinkCounts[title] = 1;
  3141. }
  3142. return title;
  3143. }
  3144. text = globals.converter._dispatch('headers.after', text, options, globals);
  3145. return text;
  3146. });
  3147. /**
  3148. * Turn Markdown link shortcuts into XHTML <a> tags.
  3149. */
  3150. showdown.subParser('horizontalRule', function (text, options, globals) {
  3151. 'use strict';
  3152. text = globals.converter._dispatch('horizontalRule.before', text, options, globals);
  3153. var key = showdown.subParser('hashBlock')('<hr />', options, globals);
  3154. text = text.replace(/^ {0,2}( ?-){3,}[ \t]*$/gm, key);
  3155. text = text.replace(/^ {0,2}( ?\*){3,}[ \t]*$/gm, key);
  3156. text = text.replace(/^ {0,2}( ?_){3,}[ \t]*$/gm, key);
  3157. text = globals.converter._dispatch('horizontalRule.after', text, options, globals);
  3158. return text;
  3159. });
  3160. /**
  3161. * Turn Markdown image shortcuts into <img> tags.
  3162. */
  3163. showdown.subParser('images', function (text, options, globals) {
  3164. 'use strict';
  3165. text = globals.converter._dispatch('images.before', text, options, globals);
  3166. var inlineRegExp = /!\[([^\]]*?)][ \t]*()\([ \t]?<?([\S]+?(?:\([\S]*?\)[\S]*?)?)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(["'])([^"]*?)\6)?[ \t]?\)/g,
  3167. crazyRegExp = /!\[([^\]]*?)][ \t]*()\([ \t]?<([^>]*)>(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(?:(["'])([^"]*?)\6))?[ \t]?\)/g,
  3168. base64RegExp = /!\[([^\]]*?)][ \t]*()\([ \t]?<?(data:.+?\/.+?;base64,[A-Za-z0-9+/=\n]+?)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(["'])([^"]*?)\6)?[ \t]?\)/g,
  3169. referenceRegExp = /!\[([^\]]*?)] ?(?:\n *)?\[([\s\S]*?)]()()()()()/g,
  3170. refShortcutRegExp = /!\[([^\[\]]+)]()()()()()/g;
  3171. function writeImageTagBase64 (wholeMatch, altText, linkId, url, width, height, m5, title) {
  3172. url = url.replace(/\s/g, '');
  3173. return writeImageTag (wholeMatch, altText, linkId, url, width, height, m5, title);
  3174. }
  3175. function writeImageTag (wholeMatch, altText, linkId, url, width, height, m5, title) {
  3176. var gUrls = globals.gUrls,
  3177. gTitles = globals.gTitles,
  3178. gDims = globals.gDimensions;
  3179. linkId = linkId.toLowerCase();
  3180. if (!title) {
  3181. title = '';
  3182. }
  3183. // Special case for explicit empty url
  3184. if (wholeMatch.search(/\(<?\s*>? ?(['"].*['"])?\)$/m) > -1) {
  3185. url = '';
  3186. } else if (url === '' || url === null) {
  3187. if (linkId === '' || linkId === null) {
  3188. // lower-case and turn embedded newlines into spaces
  3189. linkId = altText.toLowerCase().replace(/ ?\n/g, ' ');
  3190. }
  3191. url = '#' + linkId;
  3192. if (!showdown.helper.isUndefined(gUrls[linkId])) {
  3193. url = gUrls[linkId];
  3194. if (!showdown.helper.isUndefined(gTitles[linkId])) {
  3195. title = gTitles[linkId];
  3196. }
  3197. if (!showdown.helper.isUndefined(gDims[linkId])) {
  3198. width = gDims[linkId].width;
  3199. height = gDims[linkId].height;
  3200. }
  3201. } else {
  3202. return wholeMatch;
  3203. }
  3204. }
  3205. altText = altText
  3206. .replace(/"/g, '&quot;')
  3207. //altText = showdown.helper.escapeCharacters(altText, '*_', false);
  3208. .replace(showdown.helper.regexes.asteriskDashAndColon, showdown.helper.escapeCharactersCallback);
  3209. //url = showdown.helper.escapeCharacters(url, '*_', false);
  3210. url = url.replace(showdown.helper.regexes.asteriskDashAndColon, showdown.helper.escapeCharactersCallback);
  3211. var result = '<img src="' + url + '" alt="' + altText + '"';
  3212. if (title) {
  3213. title = title
  3214. .replace(/"/g, '&quot;')
  3215. //title = showdown.helper.escapeCharacters(title, '*_', false);
  3216. .replace(showdown.helper.regexes.asteriskDashAndColon, showdown.helper.escapeCharactersCallback);
  3217. result += ' title="' + title + '"';
  3218. }
  3219. if (width && height) {
  3220. width = (width === '*') ? 'auto' : width;
  3221. height = (height === '*') ? 'auto' : height;
  3222. result += ' width="' + width + '"';
  3223. result += ' height="' + height + '"';
  3224. }
  3225. result += ' />';
  3226. return result;
  3227. }
  3228. // First, handle reference-style labeled images: ![alt text][id]
  3229. text = text.replace(referenceRegExp, writeImageTag);
  3230. // Next, handle inline images: ![alt text](url =<width>x<height> "optional title")
  3231. // base64 encoded images
  3232. text = text.replace(base64RegExp, writeImageTagBase64);
  3233. // cases with crazy urls like ./image/cat1).png
  3234. text = text.replace(crazyRegExp, writeImageTag);
  3235. // normal cases
  3236. text = text.replace(inlineRegExp, writeImageTag);
  3237. // handle reference-style shortcuts: ![img text]
  3238. text = text.replace(refShortcutRegExp, writeImageTag);
  3239. text = globals.converter._dispatch('images.after', text, options, globals);
  3240. return text;
  3241. });
  3242. showdown.subParser('italicsAndBold', function (text, options, globals) {
  3243. 'use strict';
  3244. text = globals.converter._dispatch('italicsAndBold.before', text, options, globals);
  3245. // it's faster to have 3 separate regexes for each case than have just one
  3246. // because of backtracing, in some cases, it could lead to an exponential effect
  3247. // called "catastrophic backtrace". Ominous!
  3248. function parseInside (txt, left, right) {
  3249. /*
  3250. if (options.simplifiedAutoLink) {
  3251. txt = showdown.subParser('simplifiedAutoLinks')(txt, options, globals);
  3252. }
  3253. */
  3254. return left + txt + right;
  3255. }
  3256. // Parse underscores
  3257. if (options.literalMidWordUnderscores) {
  3258. text = text.replace(/\b___(\S[\s\S]*)___\b/g, function (wm, txt) {
  3259. return parseInside (txt, '<strong><em>', '</em></strong>');
  3260. });
  3261. text = text.replace(/\b__(\S[\s\S]*)__\b/g, function (wm, txt) {
  3262. return parseInside (txt, '<strong>', '</strong>');
  3263. });
  3264. text = text.replace(/\b_(\S[\s\S]*?)_\b/g, function (wm, txt) {
  3265. return parseInside (txt, '<em>', '</em>');
  3266. });
  3267. } else {
  3268. text = text.replace(/___(\S[\s\S]*?)___/g, function (wm, m) {
  3269. return (/\S$/.test(m)) ? parseInside (m, '<strong><em>', '</em></strong>') : wm;
  3270. });
  3271. text = text.replace(/__(\S[\s\S]*?)__/g, function (wm, m) {
  3272. return (/\S$/.test(m)) ? parseInside (m, '<strong>', '</strong>') : wm;
  3273. });
  3274. text = text.replace(/_([^\s_][\s\S]*?)_/g, function (wm, m) {
  3275. // !/^_[^_]/.test(m) - test if it doesn't start with __ (since it seems redundant, we removed it)
  3276. return (/\S$/.test(m)) ? parseInside (m, '<em>', '</em>') : wm;
  3277. });
  3278. }
  3279. // Now parse asterisks
  3280. if (options.literalMidWordAsterisks) {
  3281. text = text.trim().replace(/(^| )\*{3}(\S[\s\S]*?)\*{3}([ ,;!?.]|$)/g, function (wm, lead, txt, trail) {
  3282. return parseInside (txt, lead + '<strong><em>', '</em></strong>' + trail);
  3283. });
  3284. text = text.trim().replace(/(^| )\*{2}(\S[\s\S]*?)\*{2}([ ,;!?.]|$)/g, function (wm, lead, txt, trail) {
  3285. return parseInside (txt, lead + '<strong>', '</strong>' + trail);
  3286. });
  3287. text = text.trim().replace(/(^| )\*(\S[\s\S]*?)\*([ ,;!?.]|$)/g, function (wm, lead, txt, trail) {
  3288. return parseInside (txt, lead + '<em>', '</em>' + trail);
  3289. });
  3290. } else {
  3291. text = text.replace(/\*\*\*(\S[\s\S]*?)\*\*\*/g, function (wm, m) {
  3292. return (/\S$/.test(m)) ? parseInside (m, '<strong><em>', '</em></strong>') : wm;
  3293. });
  3294. text = text.replace(/\*\*(\S[\s\S]*?)\*\*/g, function (wm, m) {
  3295. return (/\S$/.test(m)) ? parseInside (m, '<strong>', '</strong>') : wm;
  3296. });
  3297. text = text.replace(/\*([^\s*][\s\S]*?)\*/g, function (wm, m) {
  3298. // !/^\*[^*]/.test(m) - test if it doesn't start with ** (since it seems redundant, we removed it)
  3299. return (/\S$/.test(m)) ? parseInside (m, '<em>', '</em>') : wm;
  3300. });
  3301. }
  3302. text = globals.converter._dispatch('italicsAndBold.after', text, options, globals);
  3303. return text;
  3304. });
  3305. /**
  3306. * Form HTML ordered (numbered) and unordered (bulleted) lists.
  3307. */
  3308. showdown.subParser('lists', function (text, options, globals) {
  3309. 'use strict';
  3310. /**
  3311. * Process the contents of a single ordered or unordered list, splitting it
  3312. * into individual list items.
  3313. * @param {string} listStr
  3314. * @param {boolean} trimTrailing
  3315. * @returns {string}
  3316. */
  3317. function processListItems (listStr, trimTrailing) {
  3318. // The $g_list_level global keeps track of when we're inside a list.
  3319. // Each time we enter a list, we increment it; when we leave a list,
  3320. // we decrement. If it's zero, we're not in a list anymore.
  3321. //
  3322. // We do this because when we're not inside a list, we want to treat
  3323. // something like this:
  3324. //
  3325. // I recommend upgrading to version
  3326. // 8. Oops, now this line is treated
  3327. // as a sub-list.
  3328. //
  3329. // As a single paragraph, despite the fact that the second line starts
  3330. // with a digit-period-space sequence.
  3331. //
  3332. // Whereas when we're inside a list (or sub-list), that line will be
  3333. // treated as the start of a sub-list. What a kludge, huh? This is
  3334. // an aspect of Markdown's syntax that's hard to parse perfectly
  3335. // without resorting to mind-reading. Perhaps the solution is to
  3336. // change the syntax rules such that sub-lists must start with a
  3337. // starting cardinal number; e.g. "1." or "a.".
  3338. globals.gListLevel++;
  3339. // trim trailing blank lines:
  3340. listStr = listStr.replace(/\n{2,}$/, '\n');
  3341. // attacklab: add sentinel to emulate \z
  3342. listStr += '¨0';
  3343. var rgx = /(\n)?(^ {0,3})([*+-]|\d+[.])[ \t]+((\[(x|X| )?])?[ \t]*[^\r]+?(\n{1,2}))(?=\n*(¨0| {0,3}([*+-]|\d+[.])[ \t]+))/gm,
  3344. isParagraphed = (/\n[ \t]*\n(?!¨0)/.test(listStr));
  3345. // Since version 1.5, nesting sublists requires 4 spaces (or 1 tab) indentation,
  3346. // which is a syntax breaking change
  3347. // activating this option reverts to old behavior
  3348. if (options.disableForced4SpacesIndentedSublists) {
  3349. rgx = /(\n)?(^ {0,3})([*+-]|\d+[.])[ \t]+((\[(x|X| )?])?[ \t]*[^\r]+?(\n{1,2}))(?=\n*(¨0|\2([*+-]|\d+[.])[ \t]+))/gm;
  3350. }
  3351. listStr = listStr.replace(rgx, function (wholeMatch, m1, m2, m3, m4, taskbtn, checked) {
  3352. checked = (checked && checked.trim() !== '');
  3353. var item = showdown.subParser('outdent')(m4, options, globals),
  3354. bulletStyle = '';
  3355. // Support for github tasklists
  3356. if (taskbtn && options.tasklists) {
  3357. bulletStyle = ' class="task-list-item" style="list-style-type: none;"';
  3358. item = item.replace(/^[ \t]*\[(x|X| )?]/m, function () {
  3359. var otp = '<input type="checkbox" disabled style="margin: 0px 0.35em 0.25em -1.6em; vertical-align: middle;"';
  3360. if (checked) {
  3361. otp += ' checked';
  3362. }
  3363. otp += '>';
  3364. return otp;
  3365. });
  3366. }
  3367. // ISSUE #312
  3368. // This input: - - - a
  3369. // causes trouble to the parser, since it interprets it as:
  3370. // <ul><li><li><li>a</li></li></li></ul>
  3371. // instead of:
  3372. // <ul><li>- - a</li></ul>
  3373. // So, to prevent it, we will put a marker (¨A)in the beginning of the line
  3374. // Kind of hackish/monkey patching, but seems more effective than overcomplicating the list parser
  3375. item = item.replace(/^([-*+]|\d\.)[ \t]+[\S\n ]*/g, function (wm2) {
  3376. return '¨A' + wm2;
  3377. });
  3378. // m1 - Leading line or
  3379. // Has a double return (multi paragraph) or
  3380. // Has sublist
  3381. if (m1 || (item.search(/\n{2,}/) > -1)) {
  3382. item = showdown.subParser('githubCodeBlocks')(item, options, globals);
  3383. item = showdown.subParser('blockGamut')(item, options, globals);
  3384. } else {
  3385. // Recursion for sub-lists:
  3386. item = showdown.subParser('lists')(item, options, globals);
  3387. item = item.replace(/\n$/, ''); // chomp(item)
  3388. item = showdown.subParser('hashHTMLBlocks')(item, options, globals);
  3389. // Colapse double linebreaks
  3390. item = item.replace(/\n\n+/g, '\n\n');
  3391. if (isParagraphed) {
  3392. item = showdown.subParser('paragraphs')(item, options, globals);
  3393. } else {
  3394. item = showdown.subParser('spanGamut')(item, options, globals);
  3395. }
  3396. }
  3397. // now we need to remove the marker (¨A)
  3398. item = item.replace('¨A', '');
  3399. // we can finally wrap the line in list item tags
  3400. item = '<li' + bulletStyle + '>' + item + '</li>\n';
  3401. return item;
  3402. });
  3403. // attacklab: strip sentinel
  3404. listStr = listStr.replace(/¨0/g, '');
  3405. globals.gListLevel--;
  3406. if (trimTrailing) {
  3407. listStr = listStr.replace(/\s+$/, '');
  3408. }
  3409. return listStr;
  3410. }
  3411. function styleStartNumber (list, listType) {
  3412. // check if ol and starts by a number different than 1
  3413. if (listType === 'ol') {
  3414. var res = list.match(/^ *(\d+)\./);
  3415. if (res && res[1] !== '1') {
  3416. return ' start="' + res[1] + '"';
  3417. }
  3418. }
  3419. return '';
  3420. }
  3421. /**
  3422. * Check and parse consecutive lists (better fix for issue #142)
  3423. * @param {string} list
  3424. * @param {string} listType
  3425. * @param {boolean} trimTrailing
  3426. * @returns {string}
  3427. */
  3428. function parseConsecutiveLists (list, listType, trimTrailing) {
  3429. // check if we caught 2 or more consecutive lists by mistake
  3430. // we use the counterRgx, meaning if listType is UL we look for OL and vice versa
  3431. var olRgx = (options.disableForced4SpacesIndentedSublists) ? /^ ?\d+\.[ \t]/gm : /^ {0,3}\d+\.[ \t]/gm,
  3432. ulRgx = (options.disableForced4SpacesIndentedSublists) ? /^ ?[*+-][ \t]/gm : /^ {0,3}[*+-][ \t]/gm,
  3433. counterRxg = (listType === 'ul') ? olRgx : ulRgx,
  3434. result = '';
  3435. if (list.search(counterRxg) !== -1) {
  3436. (function parseCL (txt) {
  3437. var pos = txt.search(counterRxg),
  3438. style = styleStartNumber(list, listType);
  3439. if (pos !== -1) {
  3440. // slice
  3441. result += '\n<' + listType + style + '>\n' + processListItems(txt.slice(0, pos), !!trimTrailing) + '</' + listType + '>\n';
  3442. // invert counterType and listType
  3443. listType = (listType === 'ul') ? 'ol' : 'ul';
  3444. counterRxg = (listType === 'ul') ? olRgx : ulRgx;
  3445. //recurse
  3446. parseCL(txt.slice(pos));
  3447. } else {
  3448. result += '\n<' + listType + style + '>\n' + processListItems(txt, !!trimTrailing) + '</' + listType + '>\n';
  3449. }
  3450. })(list);
  3451. } else {
  3452. var style = styleStartNumber(list, listType);
  3453. result = '\n<' + listType + style + '>\n' + processListItems(list, !!trimTrailing) + '</' + listType + '>\n';
  3454. }
  3455. return result;
  3456. }
  3457. /** Start of list parsing **/
  3458. text = globals.converter._dispatch('lists.before', text, options, globals);
  3459. // add sentinel to hack around khtml/safari bug:
  3460. // http://bugs.webkit.org/show_bug.cgi?id=11231
  3461. text += '¨0';
  3462. if (globals.gListLevel) {
  3463. text = text.replace(/^(( {0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(¨0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm,
  3464. function (wholeMatch, list, m2) {
  3465. var listType = (m2.search(/[*+-]/g) > -1) ? 'ul' : 'ol';
  3466. return parseConsecutiveLists(list, listType, true);
  3467. }
  3468. );
  3469. } else {
  3470. text = text.replace(/(\n\n|^\n?)(( {0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(¨0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm,
  3471. function (wholeMatch, m1, list, m3) {
  3472. var listType = (m3.search(/[*+-]/g) > -1) ? 'ul' : 'ol';
  3473. return parseConsecutiveLists(list, listType, false);
  3474. }
  3475. );
  3476. }
  3477. // strip sentinel
  3478. text = text.replace(/¨0/, '');
  3479. text = globals.converter._dispatch('lists.after', text, options, globals);
  3480. return text;
  3481. });
  3482. /**
  3483. * Remove one level of line-leading tabs or spaces
  3484. */
  3485. showdown.subParser('outdent', function (text, options, globals) {
  3486. 'use strict';
  3487. text = globals.converter._dispatch('outdent.before', text, options, globals);
  3488. // attacklab: hack around Konqueror 3.5.4 bug:
  3489. // "----------bug".replace(/^-/g,"") == "bug"
  3490. text = text.replace(/^(\t|[ ]{1,4})/gm, '¨0'); // attacklab: g_tab_width
  3491. // attacklab: clean up hack
  3492. text = text.replace(/¨0/g, '');
  3493. text = globals.converter._dispatch('outdent.after', text, options, globals);
  3494. return text;
  3495. });
  3496. /**
  3497. *
  3498. */
  3499. showdown.subParser('paragraphs', function (text, options, globals) {
  3500. 'use strict';
  3501. text = globals.converter._dispatch('paragraphs.before', text, options, globals);
  3502. // Strip leading and trailing lines:
  3503. text = text.replace(/^\n+/g, '');
  3504. text = text.replace(/\n+$/g, '');
  3505. var grafs = text.split(/\n{2,}/g),
  3506. grafsOut = [],
  3507. end = grafs.length; // Wrap <p> tags
  3508. for (var i = 0; i < end; i++) {
  3509. var str = grafs[i];
  3510. // if this is an HTML marker, copy it
  3511. if (str.search(/¨(K|G)(\d+)\1/g) >= 0) {
  3512. grafsOut.push(str);
  3513. // test for presence of characters to prevent empty lines being parsed
  3514. // as paragraphs (resulting in undesired extra empty paragraphs)
  3515. } else if (str.search(/\S/) >= 0) {
  3516. str = showdown.subParser('spanGamut')(str, options, globals);
  3517. str = str.replace(/^([ \t]*)/g, '<p>');
  3518. str += '</p>';
  3519. grafsOut.push(str);
  3520. }
  3521. }
  3522. /** Unhashify HTML blocks */
  3523. end = grafsOut.length;
  3524. for (i = 0; i < end; i++) {
  3525. var blockText = '',
  3526. grafsOutIt = grafsOut[i],
  3527. codeFlag = false;
  3528. // if this is a marker for an html block...
  3529. // use RegExp.test instead of string.search because of QML bug
  3530. while (/¨(K|G)(\d+)\1/.test(grafsOutIt)) {
  3531. var delim = RegExp.$1,
  3532. num = RegExp.$2;
  3533. if (delim === 'K') {
  3534. blockText = globals.gHtmlBlocks[num];
  3535. } else {
  3536. // we need to check if ghBlock is a false positive
  3537. if (codeFlag) {
  3538. // use encoded version of all text
  3539. blockText = showdown.subParser('encodeCode')(globals.ghCodeBlocks[num].text, options, globals);
  3540. } else {
  3541. blockText = globals.ghCodeBlocks[num].codeblock;
  3542. }
  3543. }
  3544. blockText = blockText.replace(/\$/g, '$$$$'); // Escape any dollar signs
  3545. grafsOutIt = grafsOutIt.replace(/(\n\n)?¨(K|G)\d+\2(\n\n)?/, blockText);
  3546. // Check if grafsOutIt is a pre->code
  3547. if (/^<pre\b[^>]*>\s*<code\b[^>]*>/.test(grafsOutIt)) {
  3548. codeFlag = true;
  3549. }
  3550. }
  3551. grafsOut[i] = grafsOutIt;
  3552. }
  3553. text = grafsOut.join('\n');
  3554. // Strip leading and trailing lines:
  3555. text = text.replace(/^\n+/g, '');
  3556. text = text.replace(/\n+$/g, '');
  3557. return globals.converter._dispatch('paragraphs.after', text, options, globals);
  3558. });
  3559. /**
  3560. * Run extension
  3561. */
  3562. showdown.subParser('runExtension', function (ext, text, options, globals) {
  3563. 'use strict';
  3564. if (ext.filter) {
  3565. text = ext.filter(text, globals.converter, options);
  3566. } else if (ext.regex) {
  3567. // TODO remove this when old extension loading mechanism is deprecated
  3568. var re = ext.regex;
  3569. if (!(re instanceof RegExp)) {
  3570. re = new RegExp(re, 'g');
  3571. }
  3572. text = text.replace(re, ext.replace);
  3573. }
  3574. return text;
  3575. });
  3576. /**
  3577. * These are all the transformations that occur *within* block-level
  3578. * tags like paragraphs, headers, and list items.
  3579. */
  3580. showdown.subParser('spanGamut', function (text, options, globals) {
  3581. 'use strict';
  3582. text = globals.converter._dispatch('spanGamut.before', text, options, globals);
  3583. text = showdown.subParser('codeSpans')(text, options, globals);
  3584. text = showdown.subParser('escapeSpecialCharsWithinTagAttributes')(text, options, globals);
  3585. text = showdown.subParser('encodeBackslashEscapes')(text, options, globals);
  3586. // Process anchor and image tags. Images must come first,
  3587. // because ![foo][f] looks like an anchor.
  3588. text = showdown.subParser('images')(text, options, globals);
  3589. text = showdown.subParser('anchors')(text, options, globals);
  3590. // Make links out of things like `<http://example.com/>`
  3591. // Must come after anchors, because you can use < and >
  3592. // delimiters in inline links like [this](<url>).
  3593. text = showdown.subParser('autoLinks')(text, options, globals);
  3594. text = showdown.subParser('simplifiedAutoLinks')(text, options, globals);
  3595. text = showdown.subParser('emoji')(text, options, globals);
  3596. text = showdown.subParser('underline')(text, options, globals);
  3597. text = showdown.subParser('italicsAndBold')(text, options, globals);
  3598. text = showdown.subParser('strikethrough')(text, options, globals);
  3599. // we need to hash HTML tags inside spans
  3600. text = showdown.subParser('hashHTMLSpans')(text, options, globals);
  3601. // now we encode amps and angles
  3602. text = showdown.subParser('encodeAmpsAndAngles')(text, options, globals);
  3603. // Do hard breaks
  3604. if (options.simpleLineBreaks) {
  3605. // GFM style hard breaks
  3606. // only add line breaks if the text does not contain a block (special case for lists)
  3607. if (!/\n\n¨K/.test(text)) {
  3608. text = text.replace(/\n+/g, '<br />\n');
  3609. }
  3610. } else {
  3611. // Vanilla hard breaks
  3612. text = text.replace(/ +\n/g, '<br />\n');
  3613. }
  3614. text = globals.converter._dispatch('spanGamut.after', text, options, globals);
  3615. return text;
  3616. });
  3617. showdown.subParser('strikethrough', function (text, options, globals) {
  3618. 'use strict';
  3619. function parseInside (txt) {
  3620. if (options.simplifiedAutoLink) {
  3621. txt = showdown.subParser('simplifiedAutoLinks')(txt, options, globals);
  3622. }
  3623. return '<del>' + txt + '</del>';
  3624. }
  3625. if (options.strikethrough) {
  3626. text = globals.converter._dispatch('strikethrough.before', text, options, globals);
  3627. text = text.replace(/(?:~){2}([\s\S]+?)(?:~){2}/g, function (wm, txt) { return parseInside(txt); });
  3628. text = globals.converter._dispatch('strikethrough.after', text, options, globals);
  3629. }
  3630. return text;
  3631. });
  3632. /**
  3633. * Strips link definitions from text, stores the URLs and titles in
  3634. * hash references.
  3635. * Link defs are in the form: ^[id]: url "optional title"
  3636. */
  3637. showdown.subParser('stripLinkDefinitions', function (text, options, globals) {
  3638. 'use strict';
  3639. var regex = /^ {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,
  3640. base64Regex = /^ {0,3}\[(.+)]:[ \t]*\n?[ \t]*<?(data:.+?\/.+?;base64,[A-Za-z0-9+/=\n]+?)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n\n|(?=¨0)|(?=\n\[))/gm;
  3641. // attacklab: sentinel workarounds for lack of \A and \Z, safari\khtml bug
  3642. text += '¨0';
  3643. var replaceFunc = function (wholeMatch, linkId, url, width, height, blankLines, title) {
  3644. linkId = linkId.toLowerCase();
  3645. if (url.match(/^data:.+?\/.+?;base64,/)) {
  3646. // remove newlines
  3647. globals.gUrls[linkId] = url.replace(/\s/g, '');
  3648. } else {
  3649. globals.gUrls[linkId] = showdown.subParser('encodeAmpsAndAngles')(url, options, globals); // Link IDs are case-insensitive
  3650. }
  3651. if (blankLines) {
  3652. // Oops, found blank lines, so it's not a title.
  3653. // Put back the parenthetical statement we stole.
  3654. return blankLines + title;
  3655. } else {
  3656. if (title) {
  3657. globals.gTitles[linkId] = title.replace(/"|'/g, '&quot;');
  3658. }
  3659. if (options.parseImgDimensions && width && height) {
  3660. globals.gDimensions[linkId] = {
  3661. width: width,
  3662. height: height
  3663. };
  3664. }
  3665. }
  3666. // Completely remove the definition from the text
  3667. return '';
  3668. };
  3669. // first we try to find base64 link references
  3670. text = text.replace(base64Regex, replaceFunc);
  3671. text = text.replace(regex, replaceFunc);
  3672. // attacklab: strip sentinel
  3673. text = text.replace(/¨0/, '');
  3674. return text;
  3675. });
  3676. showdown.subParser('tables', function (text, options, globals) {
  3677. 'use strict';
  3678. if (!options.tables) {
  3679. return text;
  3680. }
  3681. var tableRgx = /^ {0,3}\|?.+\|.+\n {0,3}\|?[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*:?[ \t]*(?:[-=]){2,}[\s\S]+?(?:\n\n|<ol|<ul|¨0)/gm,
  3682. //singeColTblRgx = /^ {0,3}\|.+\|\n {0,3}\|[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*\n(?: {0,3}\|.+\|\n)+(?:\n\n|¨0)/gm;
  3683. singeColTblRgx = /^ {0,3}\|.+\|[ \t]*\n {0,3}\|[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*\n( {0,3}\|.+\|[ \t]*\n)*(?:\n|<ol|<ul|¨0)/gm;
  3684. function parseStyles (sLine) {
  3685. if (/^:[ \t]*--*$/.test(sLine)) {
  3686. return ' style="text-align:left;"';
  3687. } else if (/^--*[ \t]*:[ \t]*$/.test(sLine)) {
  3688. return ' style="text-align:right;"';
  3689. } else if (/^:[ \t]*--*[ \t]*:$/.test(sLine)) {
  3690. return ' style="text-align:center;"';
  3691. } else {
  3692. return '';
  3693. }
  3694. }
  3695. function parseHeaders (header, style) {
  3696. var id = '';
  3697. header = header.trim();
  3698. // support both tablesHeaderId and tableHeaderId due to error in documention so we don't break backwards compatibility
  3699. if (options.tablesHeaderId || options.tableHeaderId) {
  3700. id = ' id="' + header.replace(/ /g, '_').toLowerCase() + '"';
  3701. }
  3702. header = showdown.subParser('spanGamut')(header, options, globals);
  3703. return '<th' + id + style + '>' + header + '</th>\n';
  3704. }
  3705. function parseCells (cell, style) {
  3706. var subText = showdown.subParser('spanGamut')(cell, options, globals);
  3707. return '<td' + style + '>' + subText + '</td>\n';
  3708. }
  3709. function buildTable (headers, cells) {
  3710. var tb = '<table>\n<thead>\n<tr>\n',
  3711. tblLgn = headers.length;
  3712. for (var i = 0; i < tblLgn; ++i) {
  3713. tb += headers[i];
  3714. }
  3715. tb += '</tr>\n</thead>\n<tbody>\n';
  3716. for (i = 0; i < cells.length; ++i) {
  3717. tb += '<tr>\n';
  3718. for (var ii = 0; ii < tblLgn; ++ii) {
  3719. tb += cells[i][ii];
  3720. }
  3721. tb += '</tr>\n';
  3722. }
  3723. tb += '</tbody>\n</table>\n';
  3724. return tb;
  3725. }
  3726. function parseTable (rawTable) {
  3727. var i, tableLines = rawTable.split('\n');
  3728. // strip wrong first and last column if wrapped tables are used
  3729. for (i = 0; i < tableLines.length; ++i) {
  3730. if (/^ {0,3}\|/.test(tableLines[i])) {
  3731. tableLines[i] = tableLines[i].replace(/^ {0,3}\|/, '');
  3732. }
  3733. if (/\|[ \t]*$/.test(tableLines[i])) {
  3734. tableLines[i] = tableLines[i].replace(/\|[ \t]*$/, '');
  3735. }
  3736. }
  3737. var rawHeaders = tableLines[0].split('|').map(function (s) { return s.trim();}),
  3738. rawStyles = tableLines[1].split('|').map(function (s) { return s.trim();}),
  3739. rawCells = [],
  3740. headers = [],
  3741. styles = [],
  3742. cells = [];
  3743. tableLines.shift();
  3744. tableLines.shift();
  3745. for (i = 0; i < tableLines.length; ++i) {
  3746. if (tableLines[i].trim() === '') {
  3747. continue;
  3748. }
  3749. rawCells.push(
  3750. tableLines[i]
  3751. .split('|')
  3752. .map(function (s) {
  3753. return s.trim();
  3754. })
  3755. );
  3756. }
  3757. if (rawHeaders.length < rawStyles.length) {
  3758. return rawTable;
  3759. }
  3760. for (i = 0; i < rawStyles.length; ++i) {
  3761. styles.push(parseStyles(rawStyles[i]));
  3762. }
  3763. for (i = 0; i < rawHeaders.length; ++i) {
  3764. if (showdown.helper.isUndefined(styles[i])) {
  3765. styles[i] = '';
  3766. }
  3767. headers.push(parseHeaders(rawHeaders[i], styles[i]));
  3768. }
  3769. for (i = 0; i < rawCells.length; ++i) {
  3770. var row = [];
  3771. for (var ii = 0; ii < headers.length; ++ii) {
  3772. if (showdown.helper.isUndefined(rawCells[i][ii])) {
  3773. }
  3774. row.push(parseCells(rawCells[i][ii], styles[ii]));
  3775. }
  3776. cells.push(row);
  3777. }
  3778. return buildTable(headers, cells);
  3779. }
  3780. function hackFixTableFollowedByList (rawTable) {
  3781. var lastChars = rawTable.slice(-3);
  3782. if (lastChars === '<ol' || lastChars === '<ul') {
  3783. rawTable = rawTable.slice(0, -3) + '\n\n' + rawTable.slice(-3);
  3784. }
  3785. return rawTable;
  3786. }
  3787. text = globals.converter._dispatch('tables.before', text, options, globals);
  3788. // find escaped pipe characters
  3789. text = text.replace(/\\(\|)/g, showdown.helper.escapeCharactersCallback);
  3790. // hackfix issue #443. Due to lists only having a linebreak before them, we need to manually insert a linebreak to prevent
  3791. // tables not being parsed when followed by a list
  3792. text = text.replace(tableRgx, hackFixTableFollowedByList);
  3793. text = text.replace(singeColTblRgx, hackFixTableFollowedByList);
  3794. // parse multi column tables
  3795. text = text.replace(tableRgx, parseTable);
  3796. // parse one column tables
  3797. text = text.replace(singeColTblRgx, parseTable);
  3798. text = globals.converter._dispatch('tables.after', text, options, globals);
  3799. return text;
  3800. });
  3801. showdown.subParser('underline', function (text, options, globals) {
  3802. 'use strict';
  3803. if (!options.underline) {
  3804. return text;
  3805. }
  3806. text = globals.converter._dispatch('underline.before', text, options, globals);
  3807. if (options.literalMidWordUnderscores) {
  3808. text = text.replace(/\b_?__(\S[\s\S]*)___?\b/g, function (wm, txt) {
  3809. return '<u>' + txt + '</u>';
  3810. });
  3811. } else {
  3812. text = text.replace(/_?__(\S[\s\S]*?)___?/g, function (wm, m) {
  3813. return (/\S$/.test(m)) ? '<u>' + m + '</u>' : wm;
  3814. });
  3815. }
  3816. // escape remaining underscores to prevent them being parsed by italic and bold
  3817. text = text.replace(/(_)/g, showdown.helper.escapeCharactersCallback);
  3818. text = globals.converter._dispatch('underline.after', text, options, globals);
  3819. return text;
  3820. });
  3821. /**
  3822. * Swap back in all the special characters we've hidden.
  3823. */
  3824. showdown.subParser('unescapeSpecialChars', function (text, options, globals) {
  3825. 'use strict';
  3826. text = globals.converter._dispatch('unescapeSpecialChars.before', text, options, globals);
  3827. text = text.replace(/¨E(\d+)E/g, function (wholeMatch, m1) {
  3828. var charCodeToReplace = parseInt(m1);
  3829. return String.fromCharCode(charCodeToReplace);
  3830. });
  3831. text = globals.converter._dispatch('unescapeSpecialChars.after', text, options, globals);
  3832. return text;
  3833. });
  3834. var root = this;
  3835. // AMD Loader
  3836. if (typeof define === 'function' && define.amd) {
  3837. define(function () {
  3838. 'use strict';
  3839. return showdown;
  3840. });
  3841. // CommonJS/nodeJS Loader
  3842. } else if (typeof module !== 'undefined' && module.exports) {
  3843. module.exports = showdown;
  3844. // Regular Browser loader
  3845. } else {
  3846. root.showdown = showdown;
  3847. }
  3848. }).call(this);
  3849. //# sourceMappingURL=showdown.js.map