Skip to content

Commit

Permalink
Browser files rebuild
Browse files Browse the repository at this point in the history
  • Loading branch information
Vitaly Puzrin committed Mar 12, 2015
1 parent be9e92a commit 2f9fe09
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 16 deletions.
24 changes: 10 additions & 14 deletions dist/markdown-it-sup.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! markdown-it-sup 0.1.0 https://github.com//markdown-it/markdown-it-sup @license MIT */!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.markdownitSup=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
/*! markdown-it-sup 1.0.0 https://github.com//markdown-it/markdown-it-sup @license MIT */(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.markdownitSup = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
// Process ^superscript^

'use strict';
Expand All @@ -9,6 +9,7 @@ var UNESCAPE_RE = /\\([ \\!"#$%&'()*+,.\/:;<=>?@[\]^_`{|}~-])/g;
function superscript(state, silent) {
var found,
content,
token,
max = state.posMax,
start = state.pos;

Expand Down Expand Up @@ -45,28 +46,23 @@ function superscript(state, silent) {
state.pos = start + 1;

// Earlier we checked !silent, but this implementation does not need it
state.push({ type: 'sup_open', level: state.level++ });
state.push({
type: 'text',
level: state.level,
content: content.replace(UNESCAPE_RE, '$1')
});
state.push({ type: 'sup_close', level: --state.level });
token = state.push('sup_open', 'sup', 1);
token.markup = '^';

token = state.push('text', '', 0);
token.content = content.replace(UNESCAPE_RE, '$1');

token = state.push('sup_close', 'sup', -1);
token.markup = '^';

state.pos = state.posMax + 1;
state.posMax = max;
return true;
}


function sup_open() { return '<sup>'; }
function sup_close() { return '</sup>'; }


module.exports = function sup_plugin(md) {
md.inline.ruler.after('emphasis', 'sup', superscript);
md.renderer.rules.sup_open = sup_open;
md.renderer.rules.sup_close = sup_close;
};

},{}]},{},[1])(1)
Expand Down
4 changes: 2 additions & 2 deletions dist/markdown-it-sup.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 2f9fe09

Please sign in to comment.