Edit File by line
/home/barbar84/www/wp-inclu.../js/dist
File: blocks.js
'swimming_man':'\ud83c\udfca',
[9500] Fix | Delete
'swimming_woman':'\ud83c\udfca‍\u2640\ufe0f',
[9501] Fix | Delete
'symbols':'\ud83d\udd23',
[9502] Fix | Delete
'synagogue':'\ud83d\udd4d',
[9503] Fix | Delete
'syringe':'\ud83d\udc89',
[9504] Fix | Delete
'taco':'\ud83c\udf2e',
[9505] Fix | Delete
'tada':'\ud83c\udf89',
[9506] Fix | Delete
'tanabata_tree':'\ud83c\udf8b',
[9507] Fix | Delete
'taurus':'\u2649\ufe0f',
[9508] Fix | Delete
'taxi':'\ud83d\ude95',
[9509] Fix | Delete
'tea':'\ud83c\udf75',
[9510] Fix | Delete
'telephone_receiver':'\ud83d\udcde',
[9511] Fix | Delete
'telescope':'\ud83d\udd2d',
[9512] Fix | Delete
'tennis':'\ud83c\udfbe',
[9513] Fix | Delete
'tent':'\u26fa\ufe0f',
[9514] Fix | Delete
'thermometer':'\ud83c\udf21',
[9515] Fix | Delete
'thinking':'\ud83e\udd14',
[9516] Fix | Delete
'thought_balloon':'\ud83d\udcad',
[9517] Fix | Delete
'ticket':'\ud83c\udfab',
[9518] Fix | Delete
'tickets':'\ud83c\udf9f',
[9519] Fix | Delete
'tiger':'\ud83d\udc2f',
[9520] Fix | Delete
'tiger2':'\ud83d\udc05',
[9521] Fix | Delete
'timer_clock':'\u23f2',
[9522] Fix | Delete
'tipping_hand_man':'\ud83d\udc81‍\u2642\ufe0f',
[9523] Fix | Delete
'tired_face':'\ud83d\ude2b',
[9524] Fix | Delete
'tm':'\u2122\ufe0f',
[9525] Fix | Delete
'toilet':'\ud83d\udebd',
[9526] Fix | Delete
'tokyo_tower':'\ud83d\uddfc',
[9527] Fix | Delete
'tomato':'\ud83c\udf45',
[9528] Fix | Delete
'tongue':'\ud83d\udc45',
[9529] Fix | Delete
'top':'\ud83d\udd1d',
[9530] Fix | Delete
'tophat':'\ud83c\udfa9',
[9531] Fix | Delete
'tornado':'\ud83c\udf2a',
[9532] Fix | Delete
'trackball':'\ud83d\uddb2',
[9533] Fix | Delete
'tractor':'\ud83d\ude9c',
[9534] Fix | Delete
'traffic_light':'\ud83d\udea5',
[9535] Fix | Delete
'train':'\ud83d\ude8b',
[9536] Fix | Delete
'train2':'\ud83d\ude86',
[9537] Fix | Delete
'tram':'\ud83d\ude8a',
[9538] Fix | Delete
'triangular_flag_on_post':'\ud83d\udea9',
[9539] Fix | Delete
'triangular_ruler':'\ud83d\udcd0',
[9540] Fix | Delete
'trident':'\ud83d\udd31',
[9541] Fix | Delete
'triumph':'\ud83d\ude24',
[9542] Fix | Delete
'trolleybus':'\ud83d\ude8e',
[9543] Fix | Delete
'trophy':'\ud83c\udfc6',
[9544] Fix | Delete
'tropical_drink':'\ud83c\udf79',
[9545] Fix | Delete
'tropical_fish':'\ud83d\udc20',
[9546] Fix | Delete
'truck':'\ud83d\ude9a',
[9547] Fix | Delete
'trumpet':'\ud83c\udfba',
[9548] Fix | Delete
'tulip':'\ud83c\udf37',
[9549] Fix | Delete
'tumbler_glass':'\ud83e\udd43',
[9550] Fix | Delete
'turkey':'\ud83e\udd83',
[9551] Fix | Delete
'turtle':'\ud83d\udc22',
[9552] Fix | Delete
'tv':'\ud83d\udcfa',
[9553] Fix | Delete
'twisted_rightwards_arrows':'\ud83d\udd00',
[9554] Fix | Delete
'two_hearts':'\ud83d\udc95',
[9555] Fix | Delete
'two_men_holding_hands':'\ud83d\udc6c',
[9556] Fix | Delete
'two_women_holding_hands':'\ud83d\udc6d',
[9557] Fix | Delete
'u5272':'\ud83c\ude39',
[9558] Fix | Delete
'u5408':'\ud83c\ude34',
[9559] Fix | Delete
'u55b6':'\ud83c\ude3a',
[9560] Fix | Delete
'u6307':'\ud83c\ude2f\ufe0f',
[9561] Fix | Delete
'u6708':'\ud83c\ude37\ufe0f',
[9562] Fix | Delete
'u6709':'\ud83c\ude36',
[9563] Fix | Delete
'u6e80':'\ud83c\ude35',
[9564] Fix | Delete
'u7121':'\ud83c\ude1a\ufe0f',
[9565] Fix | Delete
'u7533':'\ud83c\ude38',
[9566] Fix | Delete
'u7981':'\ud83c\ude32',
[9567] Fix | Delete
'u7a7a':'\ud83c\ude33',
[9568] Fix | Delete
'umbrella':'\u2614\ufe0f',
[9569] Fix | Delete
'unamused':'\ud83d\ude12',
[9570] Fix | Delete
'underage':'\ud83d\udd1e',
[9571] Fix | Delete
'unicorn':'\ud83e\udd84',
[9572] Fix | Delete
'unlock':'\ud83d\udd13',
[9573] Fix | Delete
'up':'\ud83c\udd99',
[9574] Fix | Delete
'upside_down_face':'\ud83d\ude43',
[9575] Fix | Delete
'v':'\u270c\ufe0f',
[9576] Fix | Delete
'vertical_traffic_light':'\ud83d\udea6',
[9577] Fix | Delete
'vhs':'\ud83d\udcfc',
[9578] Fix | Delete
'vibration_mode':'\ud83d\udcf3',
[9579] Fix | Delete
'video_camera':'\ud83d\udcf9',
[9580] Fix | Delete
'video_game':'\ud83c\udfae',
[9581] Fix | Delete
'violin':'\ud83c\udfbb',
[9582] Fix | Delete
'virgo':'\u264d\ufe0f',
[9583] Fix | Delete
'volcano':'\ud83c\udf0b',
[9584] Fix | Delete
'volleyball':'\ud83c\udfd0',
[9585] Fix | Delete
'vs':'\ud83c\udd9a',
[9586] Fix | Delete
'vulcan_salute':'\ud83d\udd96',
[9587] Fix | Delete
'walking_man':'\ud83d\udeb6',
[9588] Fix | Delete
'walking_woman':'\ud83d\udeb6‍\u2640\ufe0f',
[9589] Fix | Delete
'waning_crescent_moon':'\ud83c\udf18',
[9590] Fix | Delete
'waning_gibbous_moon':'\ud83c\udf16',
[9591] Fix | Delete
'warning':'\u26a0\ufe0f',
[9592] Fix | Delete
'wastebasket':'\ud83d\uddd1',
[9593] Fix | Delete
'watch':'\u231a\ufe0f',
[9594] Fix | Delete
'water_buffalo':'\ud83d\udc03',
[9595] Fix | Delete
'watermelon':'\ud83c\udf49',
[9596] Fix | Delete
'wave':'\ud83d\udc4b',
[9597] Fix | Delete
'wavy_dash':'\u3030\ufe0f',
[9598] Fix | Delete
'waxing_crescent_moon':'\ud83c\udf12',
[9599] Fix | Delete
'wc':'\ud83d\udebe',
[9600] Fix | Delete
'weary':'\ud83d\ude29',
[9601] Fix | Delete
'wedding':'\ud83d\udc92',
[9602] Fix | Delete
'weight_lifting_man':'\ud83c\udfcb\ufe0f',
[9603] Fix | Delete
'weight_lifting_woman':'\ud83c\udfcb\ufe0f‍\u2640\ufe0f',
[9604] Fix | Delete
'whale':'\ud83d\udc33',
[9605] Fix | Delete
'whale2':'\ud83d\udc0b',
[9606] Fix | Delete
'wheel_of_dharma':'\u2638\ufe0f',
[9607] Fix | Delete
'wheelchair':'\u267f\ufe0f',
[9608] Fix | Delete
'white_check_mark':'\u2705',
[9609] Fix | Delete
'white_circle':'\u26aa\ufe0f',
[9610] Fix | Delete
'white_flag':'\ud83c\udff3\ufe0f',
[9611] Fix | Delete
'white_flower':'\ud83d\udcae',
[9612] Fix | Delete
'white_large_square':'\u2b1c\ufe0f',
[9613] Fix | Delete
'white_medium_small_square':'\u25fd\ufe0f',
[9614] Fix | Delete
'white_medium_square':'\u25fb\ufe0f',
[9615] Fix | Delete
'white_small_square':'\u25ab\ufe0f',
[9616] Fix | Delete
'white_square_button':'\ud83d\udd33',
[9617] Fix | Delete
'wilted_flower':'\ud83e\udd40',
[9618] Fix | Delete
'wind_chime':'\ud83c\udf90',
[9619] Fix | Delete
'wind_face':'\ud83c\udf2c',
[9620] Fix | Delete
'wine_glass':'\ud83c\udf77',
[9621] Fix | Delete
'wink':'\ud83d\ude09',
[9622] Fix | Delete
'wolf':'\ud83d\udc3a',
[9623] Fix | Delete
'woman':'\ud83d\udc69',
[9624] Fix | Delete
'woman_artist':'\ud83d\udc69‍\ud83c\udfa8',
[9625] Fix | Delete
'woman_astronaut':'\ud83d\udc69‍\ud83d\ude80',
[9626] Fix | Delete
'woman_cartwheeling':'\ud83e\udd38‍\u2640\ufe0f',
[9627] Fix | Delete
'woman_cook':'\ud83d\udc69‍\ud83c\udf73',
[9628] Fix | Delete
'woman_facepalming':'\ud83e\udd26‍\u2640\ufe0f',
[9629] Fix | Delete
'woman_factory_worker':'\ud83d\udc69‍\ud83c\udfed',
[9630] Fix | Delete
'woman_farmer':'\ud83d\udc69‍\ud83c\udf3e',
[9631] Fix | Delete
'woman_firefighter':'\ud83d\udc69‍\ud83d\ude92',
[9632] Fix | Delete
'woman_health_worker':'\ud83d\udc69‍\u2695\ufe0f',
[9633] Fix | Delete
'woman_judge':'\ud83d\udc69‍\u2696\ufe0f',
[9634] Fix | Delete
'woman_juggling':'\ud83e\udd39‍\u2640\ufe0f',
[9635] Fix | Delete
'woman_mechanic':'\ud83d\udc69‍\ud83d\udd27',
[9636] Fix | Delete
'woman_office_worker':'\ud83d\udc69‍\ud83d\udcbc',
[9637] Fix | Delete
'woman_pilot':'\ud83d\udc69‍\u2708\ufe0f',
[9638] Fix | Delete
'woman_playing_handball':'\ud83e\udd3e‍\u2640\ufe0f',
[9639] Fix | Delete
'woman_playing_water_polo':'\ud83e\udd3d‍\u2640\ufe0f',
[9640] Fix | Delete
'woman_scientist':'\ud83d\udc69‍\ud83d\udd2c',
[9641] Fix | Delete
'woman_shrugging':'\ud83e\udd37‍\u2640\ufe0f',
[9642] Fix | Delete
'woman_singer':'\ud83d\udc69‍\ud83c\udfa4',
[9643] Fix | Delete
'woman_student':'\ud83d\udc69‍\ud83c\udf93',
[9644] Fix | Delete
'woman_teacher':'\ud83d\udc69‍\ud83c\udfeb',
[9645] Fix | Delete
'woman_technologist':'\ud83d\udc69‍\ud83d\udcbb',
[9646] Fix | Delete
'woman_with_turban':'\ud83d\udc73‍\u2640\ufe0f',
[9647] Fix | Delete
'womans_clothes':'\ud83d\udc5a',
[9648] Fix | Delete
'womans_hat':'\ud83d\udc52',
[9649] Fix | Delete
'women_wrestling':'\ud83e\udd3c‍\u2640\ufe0f',
[9650] Fix | Delete
'womens':'\ud83d\udeba',
[9651] Fix | Delete
'world_map':'\ud83d\uddfa',
[9652] Fix | Delete
'worried':'\ud83d\ude1f',
[9653] Fix | Delete
'wrench':'\ud83d\udd27',
[9654] Fix | Delete
'writing_hand':'\u270d\ufe0f',
[9655] Fix | Delete
'x':'\u274c',
[9656] Fix | Delete
'yellow_heart':'\ud83d\udc9b',
[9657] Fix | Delete
'yen':'\ud83d\udcb4',
[9658] Fix | Delete
'yin_yang':'\u262f\ufe0f',
[9659] Fix | Delete
'yum':'\ud83d\ude0b',
[9660] Fix | Delete
'zap':'\u26a1\ufe0f',
[9661] Fix | Delete
'zipper_mouth_face':'\ud83e\udd10',
[9662] Fix | Delete
'zzz':'\ud83d\udca4',
[9663] Fix | Delete
[9664] Fix | Delete
/* special emojis :P */
[9665] Fix | Delete
'octocat': '<img alt=":octocat:" height="20" width="20" align="absmiddle" src="https://assets-cdn.github.com/images/icons/emoji/octocat.png">',
[9666] Fix | Delete
'showdown': '<span style="font-family: \'Anonymous Pro\', monospace; text-decoration: underline; text-decoration-style: dashed; text-decoration-color: #3e8b8a;text-underline-position: under;">S</span>'
[9667] Fix | Delete
};
[9668] Fix | Delete
[9669] Fix | Delete
/**
[9670] Fix | Delete
* Created by Estevao on 31-05-2015.
[9671] Fix | Delete
*/
[9672] Fix | Delete
[9673] Fix | Delete
/**
[9674] Fix | Delete
* Showdown Converter class
[9675] Fix | Delete
* @class
[9676] Fix | Delete
* @param {object} [converterOptions]
[9677] Fix | Delete
* @returns {Converter}
[9678] Fix | Delete
*/
[9679] Fix | Delete
showdown.Converter = function (converterOptions) {
[9680] Fix | Delete
'use strict';
[9681] Fix | Delete
[9682] Fix | Delete
var
[9683] Fix | Delete
/**
[9684] Fix | Delete
* Options used by this converter
[9685] Fix | Delete
* @private
[9686] Fix | Delete
* @type {{}}
[9687] Fix | Delete
*/
[9688] Fix | Delete
options = {},
[9689] Fix | Delete
[9690] Fix | Delete
/**
[9691] Fix | Delete
* Language extensions used by this converter
[9692] Fix | Delete
* @private
[9693] Fix | Delete
* @type {Array}
[9694] Fix | Delete
*/
[9695] Fix | Delete
langExtensions = [],
[9696] Fix | Delete
[9697] Fix | Delete
/**
[9698] Fix | Delete
* Output modifiers extensions used by this converter
[9699] Fix | Delete
* @private
[9700] Fix | Delete
* @type {Array}
[9701] Fix | Delete
*/
[9702] Fix | Delete
outputModifiers = [],
[9703] Fix | Delete
[9704] Fix | Delete
/**
[9705] Fix | Delete
* Event listeners
[9706] Fix | Delete
* @private
[9707] Fix | Delete
* @type {{}}
[9708] Fix | Delete
*/
[9709] Fix | Delete
listeners = {},
[9710] Fix | Delete
[9711] Fix | Delete
/**
[9712] Fix | Delete
* The flavor set in this converter
[9713] Fix | Delete
*/
[9714] Fix | Delete
setConvFlavor = setFlavor,
[9715] Fix | Delete
[9716] Fix | Delete
/**
[9717] Fix | Delete
* Metadata of the document
[9718] Fix | Delete
* @type {{parsed: {}, raw: string, format: string}}
[9719] Fix | Delete
*/
[9720] Fix | Delete
metadata = {
[9721] Fix | Delete
parsed: {},
[9722] Fix | Delete
raw: '',
[9723] Fix | Delete
format: ''
[9724] Fix | Delete
};
[9725] Fix | Delete
[9726] Fix | Delete
_constructor();
[9727] Fix | Delete
[9728] Fix | Delete
/**
[9729] Fix | Delete
* Converter constructor
[9730] Fix | Delete
* @private
[9731] Fix | Delete
*/
[9732] Fix | Delete
function _constructor () {
[9733] Fix | Delete
converterOptions = converterOptions || {};
[9734] Fix | Delete
[9735] Fix | Delete
for (var gOpt in globalOptions) {
[9736] Fix | Delete
if (globalOptions.hasOwnProperty(gOpt)) {
[9737] Fix | Delete
options[gOpt] = globalOptions[gOpt];
[9738] Fix | Delete
}
[9739] Fix | Delete
}
[9740] Fix | Delete
[9741] Fix | Delete
// Merge options
[9742] Fix | Delete
if (typeof converterOptions === 'object') {
[9743] Fix | Delete
for (var opt in converterOptions) {
[9744] Fix | Delete
if (converterOptions.hasOwnProperty(opt)) {
[9745] Fix | Delete
options[opt] = converterOptions[opt];
[9746] Fix | Delete
}
[9747] Fix | Delete
}
[9748] Fix | Delete
} else {
[9749] Fix | Delete
throw Error('Converter expects the passed parameter to be an object, but ' + typeof converterOptions +
[9750] Fix | Delete
' was passed instead.');
[9751] Fix | Delete
}
[9752] Fix | Delete
[9753] Fix | Delete
if (options.extensions) {
[9754] Fix | Delete
showdown.helper.forEach(options.extensions, _parseExtension);
[9755] Fix | Delete
}
[9756] Fix | Delete
}
[9757] Fix | Delete
[9758] Fix | Delete
/**
[9759] Fix | Delete
* Parse extension
[9760] Fix | Delete
* @param {*} ext
[9761] Fix | Delete
* @param {string} [name='']
[9762] Fix | Delete
* @private
[9763] Fix | Delete
*/
[9764] Fix | Delete
function _parseExtension (ext, name) {
[9765] Fix | Delete
[9766] Fix | Delete
name = name || null;
[9767] Fix | Delete
// If it's a string, the extension was previously loaded
[9768] Fix | Delete
if (showdown.helper.isString(ext)) {
[9769] Fix | Delete
ext = showdown.helper.stdExtName(ext);
[9770] Fix | Delete
name = ext;
[9771] Fix | Delete
[9772] Fix | Delete
// LEGACY_SUPPORT CODE
[9773] Fix | Delete
if (showdown.extensions[ext]) {
[9774] Fix | Delete
console.warn('DEPRECATION WARNING: ' + ext + ' is an old extension that uses a deprecated loading method.' +
[9775] Fix | Delete
'Please inform the developer that the extension should be updated!');
[9776] Fix | Delete
legacyExtensionLoading(showdown.extensions[ext], ext);
[9777] Fix | Delete
return;
[9778] Fix | Delete
// END LEGACY SUPPORT CODE
[9779] Fix | Delete
[9780] Fix | Delete
} else if (!showdown.helper.isUndefined(extensions[ext])) {
[9781] Fix | Delete
ext = extensions[ext];
[9782] Fix | Delete
[9783] Fix | Delete
} else {
[9784] Fix | Delete
throw Error('Extension "' + ext + '" could not be loaded. It was either not found or is not a valid extension.');
[9785] Fix | Delete
}
[9786] Fix | Delete
}
[9787] Fix | Delete
[9788] Fix | Delete
if (typeof ext === 'function') {
[9789] Fix | Delete
ext = ext();
[9790] Fix | Delete
}
[9791] Fix | Delete
[9792] Fix | Delete
if (!showdown.helper.isArray(ext)) {
[9793] Fix | Delete
ext = [ext];
[9794] Fix | Delete
}
[9795] Fix | Delete
[9796] Fix | Delete
var validExt = validate(ext, name);
[9797] Fix | Delete
if (!validExt.valid) {
[9798] Fix | Delete
throw Error(validExt.error);
[9799] Fix | Delete
}
[9800] Fix | Delete
[9801] Fix | Delete
for (var i = 0; i < ext.length; ++i) {
[9802] Fix | Delete
switch (ext[i].type) {
[9803] Fix | Delete
[9804] Fix | Delete
case 'lang':
[9805] Fix | Delete
langExtensions.push(ext[i]);
[9806] Fix | Delete
break;
[9807] Fix | Delete
[9808] Fix | Delete
case 'output':
[9809] Fix | Delete
outputModifiers.push(ext[i]);
[9810] Fix | Delete
break;
[9811] Fix | Delete
}
[9812] Fix | Delete
if (ext[i].hasOwnProperty('listeners')) {
[9813] Fix | Delete
for (var ln in ext[i].listeners) {
[9814] Fix | Delete
if (ext[i].listeners.hasOwnProperty(ln)) {
[9815] Fix | Delete
listen(ln, ext[i].listeners[ln]);
[9816] Fix | Delete
}
[9817] Fix | Delete
}
[9818] Fix | Delete
}
[9819] Fix | Delete
}
[9820] Fix | Delete
[9821] Fix | Delete
}
[9822] Fix | Delete
[9823] Fix | Delete
/**
[9824] Fix | Delete
* LEGACY_SUPPORT
[9825] Fix | Delete
* @param {*} ext
[9826] Fix | Delete
* @param {string} name
[9827] Fix | Delete
*/
[9828] Fix | Delete
function legacyExtensionLoading (ext, name) {
[9829] Fix | Delete
if (typeof ext === 'function') {
[9830] Fix | Delete
ext = ext(new showdown.Converter());
[9831] Fix | Delete
}
[9832] Fix | Delete
if (!showdown.helper.isArray(ext)) {
[9833] Fix | Delete
ext = [ext];
[9834] Fix | Delete
}
[9835] Fix | Delete
var valid = validate(ext, name);
[9836] Fix | Delete
[9837] Fix | Delete
if (!valid.valid) {
[9838] Fix | Delete
throw Error(valid.error);
[9839] Fix | Delete
}
[9840] Fix | Delete
[9841] Fix | Delete
for (var i = 0; i < ext.length; ++i) {
[9842] Fix | Delete
switch (ext[i].type) {
[9843] Fix | Delete
case 'lang':
[9844] Fix | Delete
langExtensions.push(ext[i]);
[9845] Fix | Delete
break;
[9846] Fix | Delete
case 'output':
[9847] Fix | Delete
outputModifiers.push(ext[i]);
[9848] Fix | Delete
break;
[9849] Fix | Delete
default:// should never reach here
[9850] Fix | Delete
throw Error('Extension loader error: Type unrecognized!!!');
[9851] Fix | Delete
}
[9852] Fix | Delete
}
[9853] Fix | Delete
}
[9854] Fix | Delete
[9855] Fix | Delete
/**
[9856] Fix | Delete
* Listen to an event
[9857] Fix | Delete
* @param {string} name
[9858] Fix | Delete
* @param {function} callback
[9859] Fix | Delete
*/
[9860] Fix | Delete
function listen (name, callback) {
[9861] Fix | Delete
if (!showdown.helper.isString(name)) {
[9862] Fix | Delete
throw Error('Invalid argument in converter.listen() method: name must be a string, but ' + typeof name + ' given');
[9863] Fix | Delete
}
[9864] Fix | Delete
[9865] Fix | Delete
if (typeof callback !== 'function') {
[9866] Fix | Delete
throw Error('Invalid argument in converter.listen() method: callback must be a function, but ' + typeof callback + ' given');
[9867] Fix | Delete
}
[9868] Fix | Delete
[9869] Fix | Delete
if (!listeners.hasOwnProperty(name)) {
[9870] Fix | Delete
listeners[name] = [];
[9871] Fix | Delete
}
[9872] Fix | Delete
listeners[name].push(callback);
[9873] Fix | Delete
}
[9874] Fix | Delete
[9875] Fix | Delete
function rTrimInputText (text) {
[9876] Fix | Delete
var rsp = text.match(/^\s*/)[0].length,
[9877] Fix | Delete
rgx = new RegExp('^\\s{0,' + rsp + '}', 'gm');
[9878] Fix | Delete
return text.replace(rgx, '');
[9879] Fix | Delete
}
[9880] Fix | Delete
[9881] Fix | Delete
/**
[9882] Fix | Delete
* Dispatch an event
[9883] Fix | Delete
* @private
[9884] Fix | Delete
* @param {string} evtName Event name
[9885] Fix | Delete
* @param {string} text Text
[9886] Fix | Delete
* @param {{}} options Converter Options
[9887] Fix | Delete
* @param {{}} globals
[9888] Fix | Delete
* @returns {string}
[9889] Fix | Delete
*/
[9890] Fix | Delete
this._dispatch = function dispatch (evtName, text, options, globals) {
[9891] Fix | Delete
if (listeners.hasOwnProperty(evtName)) {
[9892] Fix | Delete
for (var ei = 0; ei < listeners[evtName].length; ++ei) {
[9893] Fix | Delete
var nText = listeners[evtName][ei](evtName, text, this, options, globals);
[9894] Fix | Delete
if (nText && typeof nText !== 'undefined') {
[9895] Fix | Delete
text = nText;
[9896] Fix | Delete
}
[9897] Fix | Delete
}
[9898] Fix | Delete
}
[9899] Fix | Delete
return text;
[9900] Fix | Delete
};
[9901] Fix | Delete
[9902] Fix | Delete
/**
[9903] Fix | Delete
* Listen to an event
[9904] Fix | Delete
* @param {string} name
[9905] Fix | Delete
* @param {function} callback
[9906] Fix | Delete
* @returns {showdown.Converter}
[9907] Fix | Delete
*/
[9908] Fix | Delete
this.listen = function (name, callback) {
[9909] Fix | Delete
listen(name, callback);
[9910] Fix | Delete
return this;
[9911] Fix | Delete
};
[9912] Fix | Delete
[9913] Fix | Delete
/**
[9914] Fix | Delete
* Converts a markdown string into HTML
[9915] Fix | Delete
* @param {string} text
[9916] Fix | Delete
* @returns {*}
[9917] Fix | Delete
*/
[9918] Fix | Delete
this.makeHtml = function (text) {
[9919] Fix | Delete
//check if text is not falsy
[9920] Fix | Delete
if (!text) {
[9921] Fix | Delete
return text;
[9922] Fix | Delete
}
[9923] Fix | Delete
[9924] Fix | Delete
var globals = {
[9925] Fix | Delete
gHtmlBlocks: [],
[9926] Fix | Delete
gHtmlMdBlocks: [],
[9927] Fix | Delete
gHtmlSpans: [],
[9928] Fix | Delete
gUrls: {},
[9929] Fix | Delete
gTitles: {},
[9930] Fix | Delete
gDimensions: {},
[9931] Fix | Delete
gListLevel: 0,
[9932] Fix | Delete
hashLinkCounts: {},
[9933] Fix | Delete
langExtensions: langExtensions,
[9934] Fix | Delete
outputModifiers: outputModifiers,
[9935] Fix | Delete
converter: this,
[9936] Fix | Delete
ghCodeBlocks: [],
[9937] Fix | Delete
metadata: {
[9938] Fix | Delete
parsed: {},
[9939] Fix | Delete
raw: '',
[9940] Fix | Delete
format: ''
[9941] Fix | Delete
}
[9942] Fix | Delete
};
[9943] Fix | Delete
[9944] Fix | Delete
// This lets us use ¨ trema as an escape char to avoid md5 hashes
[9945] Fix | Delete
// The choice of character is arbitrary; anything that isn't
[9946] Fix | Delete
// magic in Markdown will work.
[9947] Fix | Delete
text = text.replace(/¨/g, '¨T');
[9948] Fix | Delete
[9949] Fix | Delete
// Replace $ with ¨D
[9950] Fix | Delete
// RegExp interprets $ as a special character
[9951] Fix | Delete
// when it's in a replacement string
[9952] Fix | Delete
text = text.replace(/\$/g, '¨D');
[9953] Fix | Delete
[9954] Fix | Delete
// Standardize line endings
[9955] Fix | Delete
text = text.replace(/\r\n/g, '\n'); // DOS to Unix
[9956] Fix | Delete
text = text.replace(/\r/g, '\n'); // Mac to Unix
[9957] Fix | Delete
[9958] Fix | Delete
// Stardardize line spaces
[9959] Fix | Delete
text = text.replace(/\u00A0/g, '&nbsp;');
[9960] Fix | Delete
[9961] Fix | Delete
if (options.smartIndentationFix) {
[9962] Fix | Delete
text = rTrimInputText(text);
[9963] Fix | Delete
}
[9964] Fix | Delete
[9965] Fix | Delete
// Make sure text begins and ends with a couple of newlines:
[9966] Fix | Delete
text = '\n\n' + text + '\n\n';
[9967] Fix | Delete
[9968] Fix | Delete
// detab
[9969] Fix | Delete
text = showdown.subParser('detab')(text, options, globals);
[9970] Fix | Delete
[9971] Fix | Delete
/**
[9972] Fix | Delete
* Strip any lines consisting only of spaces and tabs.
[9973] Fix | Delete
* This makes subsequent regexs easier to write, because we can
[9974] Fix | Delete
* match consecutive blank lines with /\n+/ instead of something
[9975] Fix | Delete
* contorted like /[ \t]*\n+/
[9976] Fix | Delete
*/
[9977] Fix | Delete
text = text.replace(/^[ \t]+$/mg, '');
[9978] Fix | Delete
[9979] Fix | Delete
//run languageExtensions
[9980] Fix | Delete
showdown.helper.forEach(langExtensions, function (ext) {
[9981] Fix | Delete
text = showdown.subParser('runExtension')(ext, text, options, globals);
[9982] Fix | Delete
});
[9983] Fix | Delete
[9984] Fix | Delete
// run the sub parsers
[9985] Fix | Delete
text = showdown.subParser('metadata')(text, options, globals);
[9986] Fix | Delete
text = showdown.subParser('hashPreCodeTags')(text, options, globals);
[9987] Fix | Delete
text = showdown.subParser('githubCodeBlocks')(text, options, globals);
[9988] Fix | Delete
text = showdown.subParser('hashHTMLBlocks')(text, options, globals);
[9989] Fix | Delete
text = showdown.subParser('hashCodeTags')(text, options, globals);
[9990] Fix | Delete
text = showdown.subParser('stripLinkDefinitions')(text, options, globals);
[9991] Fix | Delete
text = showdown.subParser('blockGamut')(text, options, globals);
[9992] Fix | Delete
text = showdown.subParser('unhashHTMLSpans')(text, options, globals);
[9993] Fix | Delete
text = showdown.subParser('unescapeSpecialChars')(text, options, globals);
[9994] Fix | Delete
[9995] Fix | Delete
// attacklab: Restore dollar signs
[9996] Fix | Delete
text = text.replace(/¨D/g, '$$');
[9997] Fix | Delete
[9998] Fix | Delete
// attacklab: Restore tremas
[9999] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function