mirror of https://github.com/emn178/js-md2.git
Compare commits
No commits in common. 'master' and 'v0.1.2' have entirely different histories.
@ -1,2 +1 @@
|
||||
/node_modules/
|
||||
/tests/
|
||||
|
@ -1,2 +0,0 @@
|
||||
/node_modules/
|
||||
/covreporter/
|
@ -1,12 +1,12 @@
|
||||
language: node_js
|
||||
node_js:
|
||||
- "0.12.15"
|
||||
- "4.5"
|
||||
- "6.5.0"
|
||||
before_install:
|
||||
- npm install coveralls
|
||||
- npm install mocha-lcov-reporter
|
||||
script: npm run-script coveralls
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
- "0.11"
|
||||
- "0.10"
|
||||
- "0.8"
|
||||
install:
|
||||
- npm install mocha -g
|
||||
- npm install coveralls -g
|
||||
- npm install mocha-lcov-reporter -g
|
||||
- npm install
|
||||
script:
|
||||
- npm run-script coveralls
|
||||
|
@ -1,36 +1,14 @@
|
||||
# Change Log
|
||||
# v0.1.2 / 2015-01-07
|
||||
|
||||
## v0.2.2 / 2017-02-08
|
||||
### Fixed
|
||||
- `root` is undefined in some special environment.
|
||||
* Add bower package.
|
||||
* Fixed JSHint warnings.
|
||||
* Add travis.
|
||||
* Add coveralls.
|
||||
|
||||
## v0.2.1 / 2015-04-03
|
||||
### Added
|
||||
- support AMD.
|
||||
# v0.1.1 / 2014-07-27
|
||||
|
||||
## v0.2.0 / 2015-02-28
|
||||
### Added
|
||||
- test cases.
|
||||
Fixed accents bug
|
||||
|
||||
### Removed
|
||||
- ascii parameter.
|
||||
# v0.1.0 / 2014-01-05
|
||||
|
||||
### Improved
|
||||
- performance.
|
||||
|
||||
## v0.1.2 / 2015-01-07
|
||||
### Added
|
||||
- bower package.
|
||||
- travis.
|
||||
- coveralls.
|
||||
|
||||
### Fixed
|
||||
- JSHint warnings.
|
||||
|
||||
## v0.1.1 / 2014-07-27
|
||||
### Fixed
|
||||
- accents bug
|
||||
|
||||
## v0.1.0 / 2014-01-05
|
||||
### Added
|
||||
- initial release.
|
||||
Initial release
|
||||
|
@ -1,10 +1,4 @@
|
||||
/**
|
||||
* [js-md2]{@link https://github.com/emn178/js-md2}
|
||||
*
|
||||
* @namespace md2
|
||||
* @version 0.2.2
|
||||
* @author Chen, Yi-Cyuan [emn178@gmail.com]
|
||||
* @copyright Chen, Yi-Cyuan 2014-2017
|
||||
* @license MIT
|
||||
*/
|
||||
!function(){"use strict";var o="object"==typeof window?window:{},e=!o.JS_MD2_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node;e&&(o=global);var r=!o.JS_MD2_NO_COMMON_JS&&"object"==typeof module&&module.exports,f="function"==typeof define&&define.amd,t="0123456789abcdef".split(""),n=[41,46,67,201,162,216,124,1,61,54,84,161,236,240,6,19,98,167,5,243,192,199,115,140,152,147,43,217,188,76,130,202,30,155,87,60,253,212,224,22,103,66,111,24,138,23,229,18,190,78,196,214,218,158,222,73,160,251,245,142,187,47,238,122,169,104,121,145,21,178,7,63,148,194,16,137,11,34,95,33,128,127,93,154,90,144,50,39,53,62,204,231,191,247,151,3,255,25,48,179,72,165,181,209,215,94,146,42,172,86,170,198,79,184,56,210,150,164,125,182,118,252,107,226,156,116,4,241,69,157,112,89,100,113,135,32,134,91,207,101,230,45,168,2,27,96,37,173,174,176,185,246,28,70,97,105,52,64,126,15,85,71,163,35,221,81,175,58,195,92,249,206,186,197,234,38,44,83,13,110,133,40,132,9,211,223,205,244,65,129,77,82,106,220,55,200,108,193,171,250,36,225,123,8,12,189,177,74,120,136,149,139,227,99,232,109,233,203,213,254,59,0,29,57,242,239,183,14,102,88,208,228,166,119,114,248,235,117,75,10,49,68,80,180,143,237,31,26,219,153,141,51,159,17,131,20],d=[],i=[],s=[],c=function(o){var e,r,f,c,p,u,a=0,l=1,_=0,v=0,b=0,m=o.length;for(r=0;16>r;++r)i[r]=s[r]=0;d[16]=d[17]=d[18]=0;do{for(d[0]=d[16],d[1]=d[17],d[2]=d[18],d[16]=d[17]=d[18]=d[3]=d[4]=d[5]=d[6]=d[7]=d[8]=d[9]=d[10]=d[11]=d[12]=d[13]=d[14]=d[15]=0,r=v;m>_&&16>r;++_)e=o.charCodeAt(_),128>e?d[r++]=e:2048>e?(d[r++]=192|e>>6,d[r++]=128|63&e):55296>e||e>=57344?(d[r++]=224|e>>12,d[r++]=128|e>>6&63,d[r++]=128|63&e):(e=65536+((1023&e)<<10|1023&o.charCodeAt(++_)),d[r++]=240|e>>18,d[r++]=128|e>>12&63,d[r++]=128|e>>6&63,d[r++]=128|63&e);if(b+=r-v,v=r-16,_===m&&16>r)for(l=2,p=16-(15&b);16>r;++r)d[r]=p;for(r=0;16>r;++r)s[r]^=n[d[r]^a],a=s[r];for(r=0;l>r;++r)for(u=0===r?d:s,i[16]=u[0],i[32]=i[16]^i[0],i[17]=u[1],i[33]=i[17]^i[1],i[18]=u[2],i[34]=i[18]^i[2],i[19]=u[3],i[35]=i[19]^i[3],i[20]=u[4],i[36]=i[20]^i[4],i[21]=u[5],i[37]=i[21]^i[5],i[22]=u[6],i[38]=i[22]^i[6],i[23]=u[7],i[39]=i[23]^i[7],i[24]=u[8],i[40]=i[24]^i[8],i[25]=u[9],i[41]=i[25]^i[9],i[26]=u[10],i[42]=i[26]^i[10],i[27]=u[11],i[43]=i[27]^i[11],i[28]=u[12],i[44]=i[28]^i[12],i[29]=u[13],i[45]=i[29]^i[13],i[30]=u[14],i[46]=i[30]^i[14],i[31]=u[15],i[47]=i[31]^i[15],p=0,f=0;18>f;++f){for(c=0;48>c;++c)i[c]=p=i[c]^n[p];p=p+f&255}}while(1===l);var w="";for(r=0;16>r;++r)w+=t[i[r]>>4&15]+t[15&i[r]];return w};r?module.exports=c:(o.md2=c,f&&define(function(){return c}))}();
|
||||
(function(l,q){var m="0123456789abcdef".split(""),n=[41,46,67,201,162,216,124,1,61,54,84,161,236,240,6,19,98,167,5,243,192,199,115,140,152,147,43,217,188,76,130,202,30,155,87,60,253,212,224,22,103,66,111,24,138,23,229,18,190,78,196,214,218,158,222,73,160,251,245,142,187,47,238,122,169,104,121,145,21,178,7,63,148,194,16,137,11,34,95,33,128,127,93,154,90,144,50,39,53,62,204,231,191,247,151,3,255,25,48,179,72,165,181,209,215,94,146,42,172,86,170,198,79,184,56,210,150,164,125,182,118,252,107,226,156,
|
||||
116,4,241,69,157,112,89,100,113,135,32,134,91,207,101,230,45,168,2,27,96,37,173,174,176,185,246,28,70,97,105,52,64,126,15,85,71,163,35,221,81,175,58,195,92,249,206,186,197,234,38,44,83,13,110,133,40,132,9,211,223,205,244,65,129,77,82,106,220,55,200,108,193,171,250,36,225,123,8,12,189,177,74,120,136,149,139,227,99,232,109,233,203,213,254,59,0,29,57,242,239,183,14,102,88,208,228,166,119,114,248,235,117,75,10,49,68,80,180,143,237,31,26,219,153,141,51,159,17,131,20],p=function(k,l){var d,h=[],b,a;if(!l&&
|
||||
/[^\x00-\x7F]/.test(k)){d=[];for(a=b=0;a<k.length;a++){var c=k.charCodeAt(a);128>c?d[b++]=c:(2048>c?d[b++]=192|c>>6:(55296>c||57344<=c?d[b++]=224|c>>12:(c=65536+((c&1023)<<10|k.charCodeAt(++a)&1023),d[b++]=240|c>>18,d[b++]=128|c>>12&63),d[b++]=128|c>>6&63),d[b++]=128|c&63)}var f=d.length;b=(f>>4)+1<<4;a=[];for(c=0;c<f;++c)a[c]=d[c];for(d=16-(f&15);c<b;++c)a[c]=d;d=a}else{c=k.length;d=(c>>4)+1<<4;b=[];for(a=0;a<c;++a)b[a]=k.charCodeAt(a);for(c=16-(c&15);a<d;++a)b[a]=c;d=b}b=d;a=[];var c=0,f=b.length>>
|
||||
4,e;for(e=0;e<f;++e)for(var g=0;16>g;++g)a[g]^=n[b[(e<<4)+g]^c],c=a[g];f=b.length;for(e=0;16>e;++e)b[f+e]=a[e];for(b=0;48>b;++b)h[b]=0;c=d.length>>4;f="";for(b=0;b<c;++b){for(a=0;16>a;++a)h[16+a]=d[(b<<4)+a],h[32+a]=h[16+a]^h[a];for(a=e=0;18>a;++a){for(g=0;48>g;++g)h[g]=e=h[g]^n[e];e=e+a&255}}for(b=0;16>b;++b)f+=m[h[b]>>4&15]+m[h[b]&15];return f};"undefined"!=typeof module?module.exports=p:l&&(l.md2=p)})(this);
|
||||
|
@ -1,24 +0,0 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>MD2</title>
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/mocha/2.1.0/mocha.min.css">
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/mocha/2.1.0/mocha.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/expect.js/0.2.0/expect.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.1.17/require.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="mocha"></div>
|
||||
<script>
|
||||
mocha.setup('bdd');
|
||||
require(['../src/md2.js'], function (md2) {
|
||||
window.md2 = md2;
|
||||
require(['test.js'], function () {
|
||||
mocha.checkLeaks();
|
||||
mocha.run();
|
||||
})
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue