marked 0.7.0 → 1.0.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/README.md CHANGED
@@ -10,7 +10,7 @@
10
10
  [![downloads](https://badgen.net/npm/dt/marked)](https://www.npmjs.com/package/marked)
11
11
  [![dep](https://badgen.net/david/dep/markedjs/marked?label=deps)](https://david-dm.org/markedjs/marked)
12
12
  [![dev dep](https://badgen.net/david/dev/markedjs/marked?label=devDeps)](https://david-dm.org/markedjs/marked?type=dev)
13
- [![travis](https://badgen.net/travis/markedjs/marked)](https://travis-ci.org/markedjs/marked)
13
+ [![github actions](https://github.com/markedjs/marked/workflows/Tests/badge.svg)](https://github.com/markedjs/marked/actions)
14
14
  [![snyk](https://snyk.io/test/npm/marked/badge.svg)](https://snyk.io/test/npm/marked)
15
15
 
16
16
  - ⚡ built for speed
package/bin/marked CHANGED
@@ -5,27 +5,27 @@
5
5
  * Copyright (c) 2011-2013, Christopher Jeffrey (MIT License)
6
6
  */
7
7
 
8
- var fs = require('fs'),
9
- path = require('path'),
10
- marked = require('../');
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
- var spawn = require('child_process').spawn;
17
+ const spawn = require('child_process').spawn;
18
18
 
19
- var options = {
19
+ const options = {
20
20
  cwd: process.cwd(),
21
21
  env: process.env,
22
22
  setsid: false,
23
23
  stdio: 'inherit'
24
24
  };
25
25
 
26
- spawn('man', [path.resolve(__dirname, '/../man/marked.1')], options)
26
+ spawn('man', [path.resolve(__dirname, '../man/marked.1')], options)
27
27
  .on('error', function() {
28
- fs.readFile(path.resolve(__dirname, '/../man/marked.1.txt'), 'utf8', function(err, data) {
28
+ fs.readFile(path.resolve(__dirname, '../man/marked.1.txt'), 'utf8', function(err, data) {
29
29
  if (err) throw err;
30
30
  console.log(data);
31
31
  });
@@ -33,7 +33,7 @@ function help() {
33
33
  }
34
34
 
35
35
  function version() {
36
- var pkg = require('../package.json');
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
- var files = [],
46
- options = {},
47
- input,
48
- output,
49
- string,
50
- arg,
51
- tokens,
52
- opt;
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
- var arg = argv.shift();
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
- var stdin = process.stdin,
166
- buff = '';
165
+ const stdin = process.stdin;
166
+ let buff = '';
167
167
 
168
168
  stdin.setEncoding('utf8');
169
169