|
|
@@ -251,8 +251,8 @@ var formatText = (function() {
|
|
|
if ('\n' === text[i])
|
|
|
return text[i];
|
|
|
if (['*', '~', '-', '_' ].indexOf(text[i]) !== -1 &&
|
|
|
- (nextIsAlphadec || ['*', '~', '-', '_', '<', '&'].indexOf(text[i+1]) !== -1) &&
|
|
|
- (prevIsAlphadec || ['*', '~', '-', '_', '<', '&'].indexOf(text[i-1]) !== -1))
|
|
|
+ (nextIsAlphadec || text[i +1] === undefined || ['*', '~', '-', '_', '<', '&'].indexOf(text[i+1]) !== -1) &&
|
|
|
+ (!prevIsAlphadec || text[i -1] === undefined || ['*', '~', '-', '_', '<', '&'].indexOf(text[i-1]) !== -1))
|
|
|
return text[i];
|
|
|
if ([':'].indexOf(text[i]) !== -1 && nextIsAlphadec)
|
|
|
return text[i];
|
|
|
@@ -592,10 +592,5 @@ var formatText = (function() {
|
|
|
return _parse;
|
|
|
})();
|
|
|
|
|
|
-window['_formatText'] = function(str, opts) {
|
|
|
- return formatText(str, {
|
|
|
- highlights: opts ? opts["highlights"] : undefined
|
|
|
- });
|
|
|
-};
|
|
|
if (typeof module !== "undefined") module.exports.formatText = formatText;
|
|
|
|