marked 0.7.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/marked +17 -17
- package/lib/marked.esm.js +1816 -0
- package/lib/marked.js +1548 -1468
- package/marked.min.js +2 -2
- package/package.json +34 -22
- package/src/InlineLexer.js +293 -0
- package/src/Lexer.js +402 -0
- package/src/Parser.js +206 -0
- package/src/Renderer.js +164 -0
- package/src/Slugger.js +30 -0
- package/src/TextRenderer.js +38 -0
- package/src/defaults.js +30 -0
- package/src/helpers.js +243 -0
- package/src/marked.js +150 -0
- package/src/rules.js +240 -0
package/bin/marked
CHANGED
|
@@ -5,18 +5,18 @@
|
|
|
5
5
|
* Copyright (c) 2011-2013, Christopher Jeffrey (MIT License)
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
const fs = require('fs'),
|
|
9
|
+
path = require('path'),
|
|
10
|
+
marked = require('../');
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* Man Page
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
16
|
function help() {
|
|
17
|
-
|
|
17
|
+
const spawn = require('child_process').spawn;
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
const options = {
|
|
20
20
|
cwd: process.cwd(),
|
|
21
21
|
env: process.env,
|
|
22
22
|
setsid: false,
|
|
@@ -33,7 +33,7 @@ function help() {
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
function version() {
|
|
36
|
-
|
|
36
|
+
const pkg = require('../package.json');
|
|
37
37
|
console.log(pkg.version);
|
|
38
38
|
}
|
|
39
39
|
|
|
@@ -42,17 +42,17 @@ function version() {
|
|
|
42
42
|
*/
|
|
43
43
|
|
|
44
44
|
function main(argv, callback) {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
45
|
+
const files = [],
|
|
46
|
+
options = {};
|
|
47
|
+
let input,
|
|
48
|
+
output,
|
|
49
|
+
string,
|
|
50
|
+
arg,
|
|
51
|
+
tokens,
|
|
52
|
+
opt;
|
|
53
53
|
|
|
54
54
|
function getarg() {
|
|
55
|
-
|
|
55
|
+
let arg = argv.shift();
|
|
56
56
|
|
|
57
57
|
if (arg.indexOf('--') === 0) {
|
|
58
58
|
// e.g. --opt
|
|
@@ -162,8 +162,8 @@ function main(argv, callback) {
|
|
|
162
162
|
*/
|
|
163
163
|
|
|
164
164
|
function getStdin(callback) {
|
|
165
|
-
|
|
166
|
-
|
|
165
|
+
const stdin = process.stdin;
|
|
166
|
+
let buff = '';
|
|
167
167
|
|
|
168
168
|
stdin.setEncoding('utf8');
|
|
169
169
|
|