marked 0.3.15 → 0.3.19
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/.editorconfig +16 -0
- package/.eslintrc.json +28 -0
- package/.travis.yml +16 -4
- package/LICENSE.md +43 -0
- package/README.md +20 -384
- package/bower.json +1 -1
- package/component.json +1 -1
- package/jasmine.json +11 -0
- package/lib/marked.js +140 -134
- package/man/marked.1 +1 -1
- package/marked.min.js +2 -2
- package/package.json +24 -7
- package/www/demo.css +153 -0
- package/www/demo.html +244 -0
- package/www/demo.js +105 -0
- package/LICENSE +0 -19
- package/doc/broken.md +0 -426
- package/doc/todo.md +0 -2
package/.editorconfig
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
root = true
|
|
2
|
+
|
|
3
|
+
[*, *.json, *.js]
|
|
4
|
+
charset = utf-8
|
|
5
|
+
end_of_line = lf
|
|
6
|
+
insert_final_newline = true
|
|
7
|
+
indent_style = space
|
|
8
|
+
indent_size = 2
|
|
9
|
+
|
|
10
|
+
[*.md, !test/*md]
|
|
11
|
+
charset = utf-8
|
|
12
|
+
end_of_line = lf
|
|
13
|
+
insert_final_newline = true
|
|
14
|
+
trim_trailing_whitespace = true
|
|
15
|
+
indent_style = tab
|
|
16
|
+
indent_size = 4
|
package/.eslintrc.json
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "standard",
|
|
3
|
+
"plugins": [
|
|
4
|
+
"standard"
|
|
5
|
+
],
|
|
6
|
+
"parserOptions": { "ecmaVersion": 5 },
|
|
7
|
+
"rules": {
|
|
8
|
+
"semi": "off",
|
|
9
|
+
"indent": ["warn", 2, {
|
|
10
|
+
"VariableDeclarator": { "var": 2 },
|
|
11
|
+
"SwitchCase": 1,
|
|
12
|
+
"outerIIFEBody": 0
|
|
13
|
+
}],
|
|
14
|
+
"space-before-function-paren": "off",
|
|
15
|
+
"operator-linebreak": ["error", "before", { "overrides": { "=": "after" } }],
|
|
16
|
+
"no-cond-assign": "off",
|
|
17
|
+
"no-useless-escape": "off",
|
|
18
|
+
"no-return-assign": "off",
|
|
19
|
+
"one-var": "off",
|
|
20
|
+
"no-control-regex": "off"
|
|
21
|
+
},
|
|
22
|
+
"env": {
|
|
23
|
+
"node": true,
|
|
24
|
+
"browser": true,
|
|
25
|
+
"amd": true,
|
|
26
|
+
"jasmine": true
|
|
27
|
+
}
|
|
28
|
+
}
|
package/.travis.yml
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
language: node_js
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
|
|
3
|
+
jobs:
|
|
4
|
+
include:
|
|
5
|
+
- stage: spec tests 👩🏽💻
|
|
6
|
+
node_js: v0.10
|
|
7
|
+
- node_js: v4
|
|
8
|
+
- node_js: lts/*
|
|
9
|
+
- node_js: node
|
|
10
|
+
|
|
11
|
+
- stage: lint ✨
|
|
12
|
+
node_js: lts/*
|
|
13
|
+
script: npm run test:lint
|
|
14
|
+
|
|
15
|
+
cache:
|
|
16
|
+
directories:
|
|
17
|
+
- node_modules
|
package/LICENSE.md
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# License information
|
|
2
|
+
|
|
3
|
+
## Contribution License Agreement
|
|
4
|
+
|
|
5
|
+
If you contribute code to this project, you are implicitly allowing your code
|
|
6
|
+
to be distributed under the MIT license. You are also implicitly verifying that
|
|
7
|
+
all code is your original work. `</legalese>`
|
|
8
|
+
|
|
9
|
+
## Marked
|
|
10
|
+
|
|
11
|
+
Copyright (c) 2011-2018, Christopher Jeffrey (https://github.com/chjj/)
|
|
12
|
+
|
|
13
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
14
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
15
|
+
in the Software without restriction, including without limitation the rights
|
|
16
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
17
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
18
|
+
furnished to do so, subject to the following conditions:
|
|
19
|
+
|
|
20
|
+
The above copyright notice and this permission notice shall be included in
|
|
21
|
+
all copies or substantial portions of the Software.
|
|
22
|
+
|
|
23
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
24
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
25
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
26
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
27
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
28
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
29
|
+
THE SOFTWARE.
|
|
30
|
+
|
|
31
|
+
## Markdown
|
|
32
|
+
|
|
33
|
+
Copyright © 2004, John Gruber
|
|
34
|
+
http://daringfireball.net/
|
|
35
|
+
All rights reserved.
|
|
36
|
+
|
|
37
|
+
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
|
38
|
+
|
|
39
|
+
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
|
40
|
+
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
|
41
|
+
* Neither the name “Markdown” nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
|
42
|
+
|
|
43
|
+
This software is provided by the copyright holders and contributors “as is” and any express or implied warranties, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose are disclaimed. In no event shall the copyright owner or contributors be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data, or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this software, even if advised of the possibility of such damage.
|
package/README.md
CHANGED
|
@@ -1,52 +1,31 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Marked
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
> for speed.
|
|
3
|
+
Marked is
|
|
5
4
|
|
|
6
|
-
|
|
5
|
+
1. built for speed.
|
|
6
|
+
2. a low-level markdown compiler that allows frequent parsing of large chunks of markdown without caching or blocking for long periods of time.
|
|
7
|
+
3. light-weight while implementing all markdown features from the supported flavors & specifications.
|
|
8
|
+
4. available as a command line interface (CLI) and running in client- or server-side JavaScript projects.
|
|
7
9
|
|
|
8
|
-
##
|
|
10
|
+
## Installation
|
|
9
11
|
|
|
10
|
-
|
|
11
|
-
npm install marked --save
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
or if you want to use the `marked` CLI tool (not necessary when using npm run-scripts):
|
|
12
|
+
**CLI:** `npm install -g marked`
|
|
15
13
|
|
|
16
|
-
|
|
17
|
-
npm install -g marked
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
## Usage
|
|
21
|
-
|
|
22
|
-
Minimal usage:
|
|
23
|
-
|
|
24
|
-
```js
|
|
25
|
-
var marked = require('marked');
|
|
26
|
-
console.log(marked('I am using __markdown__.'));
|
|
27
|
-
// Outputs: <p>I am using <strong>markdown</strong>.</p>
|
|
28
|
-
```
|
|
14
|
+
**In-browser:** `npm install marked --save`
|
|
29
15
|
|
|
30
|
-
|
|
16
|
+
## Usage
|
|
31
17
|
|
|
32
|
-
|
|
33
|
-
var marked = require('marked');
|
|
34
|
-
marked.setOptions({
|
|
35
|
-
renderer: new marked.Renderer(),
|
|
36
|
-
gfm: true,
|
|
37
|
-
tables: true,
|
|
38
|
-
breaks: false,
|
|
39
|
-
pedantic: false,
|
|
40
|
-
sanitize: false,
|
|
41
|
-
smartLists: true,
|
|
42
|
-
smartypants: false,
|
|
43
|
-
xhtml: false
|
|
44
|
-
});
|
|
18
|
+
**CLI**
|
|
45
19
|
|
|
46
|
-
|
|
20
|
+
``` bash
|
|
21
|
+
$ marked -o hello.html
|
|
22
|
+
hello world
|
|
23
|
+
^D
|
|
24
|
+
$ cat hello.html
|
|
25
|
+
<p>hello world</p>
|
|
47
26
|
```
|
|
48
27
|
|
|
49
|
-
|
|
28
|
+
**Browser**
|
|
50
29
|
|
|
51
30
|
```html
|
|
52
31
|
<!doctype html>
|
|
@@ -54,364 +33,21 @@ console.log(marked('I am using __markdown__.'));
|
|
|
54
33
|
<head>
|
|
55
34
|
<meta charset="utf-8"/>
|
|
56
35
|
<title>Marked in the browser</title>
|
|
57
|
-
<script src="
|
|
36
|
+
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
|
|
58
37
|
</head>
|
|
59
38
|
<body>
|
|
60
39
|
<div id="content"></div>
|
|
61
40
|
<script>
|
|
62
41
|
document.getElementById('content').innerHTML =
|
|
63
|
-
marked('# Marked in browser\n\nRendered by **marked**.');
|
|
42
|
+
marked('# Marked in the browser\n\nRendered by **marked**.');
|
|
64
43
|
</script>
|
|
65
44
|
</body>
|
|
66
45
|
</html>
|
|
67
46
|
```
|
|
68
47
|
|
|
69
|
-
## marked(markdownString [,options] [,callback])
|
|
70
|
-
|
|
71
|
-
### markdownString
|
|
72
|
-
|
|
73
|
-
Type: `string`
|
|
74
|
-
|
|
75
|
-
String of markdown source to be compiled.
|
|
76
|
-
|
|
77
|
-
### options
|
|
78
|
-
|
|
79
|
-
Type: `object`
|
|
80
|
-
|
|
81
|
-
Hash of options. Can also be set using the `marked.setOptions` method as seen
|
|
82
|
-
above.
|
|
83
|
-
|
|
84
|
-
### callback
|
|
85
|
-
|
|
86
|
-
Type: `function`
|
|
87
|
-
|
|
88
|
-
Function called when the `markdownString` has been fully parsed when using
|
|
89
|
-
async highlighting. If the `options` argument is omitted, this can be used as
|
|
90
|
-
the second argument.
|
|
91
|
-
|
|
92
|
-
## Options
|
|
93
|
-
|
|
94
|
-
### highlight
|
|
95
|
-
|
|
96
|
-
Type: `function`
|
|
97
|
-
|
|
98
|
-
A function to highlight code blocks. The first example below uses async highlighting with
|
|
99
|
-
[node-pygmentize-bundled][pygmentize], and the second is a synchronous example using
|
|
100
|
-
[highlight.js][highlight]:
|
|
101
|
-
|
|
102
|
-
```js
|
|
103
|
-
var marked = require('marked');
|
|
104
|
-
|
|
105
|
-
var markdownString = '```js\n console.log("hello"); \n```';
|
|
106
|
-
|
|
107
|
-
// Async highlighting with pygmentize-bundled
|
|
108
|
-
marked.setOptions({
|
|
109
|
-
highlight: function (code, lang, callback) {
|
|
110
|
-
require('pygmentize-bundled')({ lang: lang, format: 'html' }, code, function (err, result) {
|
|
111
|
-
callback(err, result.toString());
|
|
112
|
-
});
|
|
113
|
-
}
|
|
114
|
-
});
|
|
115
|
-
|
|
116
|
-
// Using async version of marked
|
|
117
|
-
marked(markdownString, function (err, content) {
|
|
118
|
-
if (err) throw err;
|
|
119
|
-
console.log(content);
|
|
120
|
-
});
|
|
121
|
-
|
|
122
|
-
// Synchronous highlighting with highlight.js
|
|
123
|
-
marked.setOptions({
|
|
124
|
-
highlight: function (code) {
|
|
125
|
-
return require('highlight.js').highlightAuto(code).value;
|
|
126
|
-
}
|
|
127
|
-
});
|
|
128
|
-
|
|
129
|
-
console.log(marked(markdownString));
|
|
130
|
-
```
|
|
131
|
-
|
|
132
|
-
#### highlight arguments
|
|
133
|
-
|
|
134
|
-
`code`
|
|
135
|
-
|
|
136
|
-
Type: `string`
|
|
137
|
-
|
|
138
|
-
The section of code to pass to the highlighter.
|
|
139
|
-
|
|
140
|
-
`lang`
|
|
141
|
-
|
|
142
|
-
Type: `string`
|
|
143
|
-
|
|
144
|
-
The programming language specified in the code block.
|
|
145
|
-
|
|
146
|
-
`callback`
|
|
147
|
-
|
|
148
|
-
Type: `function`
|
|
149
|
-
|
|
150
|
-
The callback function to call when using an async highlighter.
|
|
151
|
-
|
|
152
|
-
### renderer
|
|
153
|
-
|
|
154
|
-
Type: `object`
|
|
155
|
-
Default: `new Renderer()`
|
|
156
|
-
|
|
157
|
-
An object containing functions to render tokens to HTML.
|
|
158
|
-
|
|
159
|
-
#### Overriding renderer methods
|
|
160
|
-
|
|
161
|
-
The renderer option allows you to render tokens in a custom manner. Here is an
|
|
162
|
-
example of overriding the default heading token rendering by adding an embedded anchor tag like on GitHub:
|
|
163
|
-
|
|
164
|
-
```javascript
|
|
165
|
-
var marked = require('marked');
|
|
166
|
-
var renderer = new marked.Renderer();
|
|
167
|
-
|
|
168
|
-
renderer.heading = function (text, level) {
|
|
169
|
-
var escapedText = text.toLowerCase().replace(/[^\w]+/g, '-');
|
|
170
|
-
|
|
171
|
-
return '<h' + level + '><a name="' +
|
|
172
|
-
escapedText +
|
|
173
|
-
'" class="anchor" href="#' +
|
|
174
|
-
escapedText +
|
|
175
|
-
'"><span class="header-link"></span></a>' +
|
|
176
|
-
text + '</h' + level + '>';
|
|
177
|
-
};
|
|
178
|
-
|
|
179
|
-
console.log(marked('# heading+', { renderer: renderer }));
|
|
180
|
-
```
|
|
181
|
-
This code will output the following HTML:
|
|
182
|
-
```html
|
|
183
|
-
<h1>
|
|
184
|
-
<a name="heading-" class="anchor" href="#heading-">
|
|
185
|
-
<span class="header-link"></span>
|
|
186
|
-
</a>
|
|
187
|
-
heading+
|
|
188
|
-
</h1>
|
|
189
|
-
```
|
|
190
|
-
|
|
191
|
-
#### Block level renderer methods
|
|
192
|
-
|
|
193
|
-
- code(*string* code, *string* language)
|
|
194
|
-
- blockquote(*string* quote)
|
|
195
|
-
- html(*string* html)
|
|
196
|
-
- heading(*string* text, *number* level)
|
|
197
|
-
- hr()
|
|
198
|
-
- list(*string* body, *boolean* ordered)
|
|
199
|
-
- listitem(*string* text)
|
|
200
|
-
- paragraph(*string* text)
|
|
201
|
-
- table(*string* header, *string* body)
|
|
202
|
-
- tablerow(*string* content)
|
|
203
|
-
- tablecell(*string* content, *object* flags)
|
|
204
|
-
|
|
205
|
-
`flags` has the following properties:
|
|
206
|
-
|
|
207
|
-
```js
|
|
208
|
-
{
|
|
209
|
-
header: true || false,
|
|
210
|
-
align: 'center' || 'left' || 'right'
|
|
211
|
-
}
|
|
212
|
-
```
|
|
213
|
-
|
|
214
|
-
#### Inline level renderer methods
|
|
215
|
-
|
|
216
|
-
- strong(*string* text)
|
|
217
|
-
- em(*string* text)
|
|
218
|
-
- codespan(*string* code)
|
|
219
|
-
- br()
|
|
220
|
-
- del(*string* text)
|
|
221
|
-
- link(*string* href, *string* title, *string* text)
|
|
222
|
-
- image(*string* href, *string* title, *string* text)
|
|
223
|
-
- text(*string* text)
|
|
224
|
-
|
|
225
|
-
### gfm
|
|
226
|
-
|
|
227
|
-
Type: `boolean`
|
|
228
|
-
Default: `true`
|
|
229
|
-
|
|
230
|
-
Enable [GitHub flavored markdown][gfm].
|
|
231
|
-
|
|
232
|
-
### tables
|
|
233
|
-
|
|
234
|
-
Type: `boolean`
|
|
235
|
-
Default: `true`
|
|
236
|
-
|
|
237
|
-
Enable GFM [tables][tables].
|
|
238
|
-
This option requires the `gfm` option to be true.
|
|
239
|
-
|
|
240
|
-
### breaks
|
|
241
|
-
|
|
242
|
-
Type: `boolean`
|
|
243
|
-
Default: `false`
|
|
244
|
-
|
|
245
|
-
Enable GFM [line breaks][breaks].
|
|
246
|
-
This option requires the `gfm` option to be true.
|
|
247
|
-
|
|
248
|
-
### pedantic
|
|
249
|
-
|
|
250
|
-
Type: `boolean`
|
|
251
|
-
Default: `false`
|
|
252
|
-
|
|
253
|
-
Conform to obscure parts of `markdown.pl` as much as possible. Don't fix any of
|
|
254
|
-
the original markdown bugs or poor behavior.
|
|
255
|
-
|
|
256
|
-
### sanitize
|
|
257
|
-
|
|
258
|
-
Type: `boolean`
|
|
259
|
-
Default: `false`
|
|
260
|
-
|
|
261
|
-
Sanitize the output. Ignore any HTML that has been input.
|
|
262
|
-
|
|
263
|
-
### smartLists
|
|
264
|
-
|
|
265
|
-
Type: `boolean`
|
|
266
|
-
Default: `true`
|
|
267
|
-
|
|
268
|
-
Use smarter list behavior than the original markdown. May eventually be
|
|
269
|
-
default with the old behavior moved into `pedantic`.
|
|
270
|
-
|
|
271
|
-
### smartypants
|
|
272
|
-
|
|
273
|
-
Type: `boolean`
|
|
274
|
-
Default: `false`
|
|
275
|
-
|
|
276
|
-
Use "smart" typographic punctuation for things like quotes and dashes.
|
|
277
|
-
|
|
278
|
-
### xhtml
|
|
279
|
-
|
|
280
|
-
Type: `boolean`
|
|
281
|
-
Default: `false`
|
|
282
|
-
|
|
283
|
-
Self-close the tags for void elements (<br/>, <img/>, etc.) with a "/" as required by XHTML.
|
|
284
|
-
|
|
285
|
-
## Access to lexer and parser
|
|
286
|
-
|
|
287
|
-
You also have direct access to the lexer and parser if you so desire.
|
|
288
|
-
|
|
289
|
-
``` js
|
|
290
|
-
var tokens = marked.lexer(text, options);
|
|
291
|
-
console.log(marked.parser(tokens));
|
|
292
|
-
```
|
|
293
|
-
|
|
294
|
-
``` js
|
|
295
|
-
var lexer = new marked.Lexer(options);
|
|
296
|
-
var tokens = lexer.lex(text);
|
|
297
|
-
console.log(tokens);
|
|
298
|
-
console.log(lexer.rules);
|
|
299
|
-
```
|
|
300
48
|
|
|
301
|
-
## CLI
|
|
302
|
-
|
|
303
|
-
``` bash
|
|
304
|
-
$ marked -o hello.html
|
|
305
|
-
hello world
|
|
306
|
-
^D
|
|
307
|
-
$ cat hello.html
|
|
308
|
-
<p>hello world</p>
|
|
309
|
-
```
|
|
310
|
-
|
|
311
|
-
## Philosophy behind marked
|
|
312
|
-
|
|
313
|
-
The point of marked was to create a markdown compiler where it was possible to
|
|
314
|
-
frequently parse huge chunks of markdown without having to worry about
|
|
315
|
-
caching the compiled output somehow...or blocking for an unnecessarily long time.
|
|
316
|
-
|
|
317
|
-
marked is very concise and still implements all markdown features. It is also
|
|
318
|
-
now fully compatible with the client-side.
|
|
319
|
-
|
|
320
|
-
marked more or less passes the official markdown test suite in its
|
|
321
|
-
entirety. This is important because a surprising number of markdown compilers
|
|
322
|
-
cannot pass more than a few tests. It was very difficult to get marked as
|
|
323
|
-
compliant as it is. It could have cut corners in several areas for the sake
|
|
324
|
-
of performance, but did not in order to be exactly what you expect in terms
|
|
325
|
-
of a markdown rendering. In fact, this is why marked could be considered at a
|
|
326
|
-
disadvantage in the benchmarks.
|
|
327
|
-
|
|
328
|
-
Along with implementing every markdown feature, marked also implements [GFM
|
|
329
|
-
features][gfmf].
|
|
330
|
-
|
|
331
|
-
## Benchmarks
|
|
332
|
-
|
|
333
|
-
node v8.9.4
|
|
334
|
-
|
|
335
|
-
``` bash
|
|
336
|
-
$ npm run bench
|
|
337
|
-
marked completed in 3408ms.
|
|
338
|
-
marked (gfm) completed in 3465ms.
|
|
339
|
-
marked (pedantic) completed in 3032ms.
|
|
340
|
-
showdown (reuse converter) completed in 21444ms.
|
|
341
|
-
showdown (new converter) completed in 23058ms.
|
|
342
|
-
markdown-it completed in 3364ms.
|
|
343
|
-
markdown.js completed in 12090ms.
|
|
344
|
-
```
|
|
345
|
-
|
|
346
|
-
### Pro level
|
|
347
|
-
|
|
348
|
-
You also have direct access to the lexer and parser if you so desire.
|
|
349
|
-
|
|
350
|
-
``` js
|
|
351
|
-
var tokens = marked.lexer(text, options);
|
|
352
|
-
console.log(marked.parser(tokens));
|
|
353
|
-
```
|
|
354
|
-
|
|
355
|
-
``` js
|
|
356
|
-
var lexer = new marked.Lexer(options);
|
|
357
|
-
var tokens = lexer.lex(text);
|
|
358
|
-
console.log(tokens);
|
|
359
|
-
console.log(lexer.rules);
|
|
360
|
-
```
|
|
361
|
-
|
|
362
|
-
``` bash
|
|
363
|
-
$ node
|
|
364
|
-
> require('marked').lexer('> i am using marked.')
|
|
365
|
-
[ { type: 'blockquote_start' },
|
|
366
|
-
{ type: 'paragraph',
|
|
367
|
-
text: 'i am using marked.' },
|
|
368
|
-
{ type: 'blockquote_end' },
|
|
369
|
-
links: {} ]
|
|
370
|
-
```
|
|
371
|
-
|
|
372
|
-
## Running Tests & Contributing
|
|
373
|
-
|
|
374
|
-
If you want to submit a pull request, make sure your changes pass the test
|
|
375
|
-
suite. If you're adding a new feature, be sure to add your own test.
|
|
376
|
-
|
|
377
|
-
The marked test suite is set up slightly strangely: `test/new` is for all tests
|
|
378
|
-
that are not part of the original markdown.pl test suite (this is where your
|
|
379
|
-
test should go if you make one). `test/original` is only for the original
|
|
380
|
-
markdown.pl tests.
|
|
381
|
-
|
|
382
|
-
In other words, if you have a test to add, add it to `test/new/`. If your test
|
|
383
|
-
uses a certain feature, for example, maybe it assumes GFM is *not* enabled, you
|
|
384
|
-
can add [front-matter](https://www.npmjs.com/package/front-matter) to the top of
|
|
385
|
-
your `.md` file
|
|
386
|
-
|
|
387
|
-
``` yml
|
|
388
|
-
---
|
|
389
|
-
gfm: false
|
|
390
|
-
---
|
|
391
|
-
```
|
|
392
|
-
|
|
393
|
-
To run the tests:
|
|
394
|
-
|
|
395
|
-
``` bash
|
|
396
|
-
npm run test
|
|
397
|
-
```
|
|
398
|
-
|
|
399
|
-
### Contribution and License Agreement
|
|
400
|
-
|
|
401
|
-
If you contribute code to this project, you are implicitly allowing your code
|
|
402
|
-
to be distributed under the MIT license. You are also implicitly verifying that
|
|
403
|
-
all code is your original work. `</legalese>`
|
|
404
49
|
|
|
405
50
|
## License
|
|
406
51
|
|
|
407
52
|
Copyright (c) 2011-2018, Christopher Jeffrey. (MIT License)
|
|
408
53
|
|
|
409
|
-
See LICENSE for more info.
|
|
410
|
-
|
|
411
|
-
[gfm]: https://help.github.com/articles/github-flavored-markdown
|
|
412
|
-
[gfmf]: http://github.github.com/github-flavored-markdown/
|
|
413
|
-
[pygmentize]: https://github.com/rvagg/node-pygmentize-bundled
|
|
414
|
-
[highlight]: https://github.com/isagalaev/highlight.js
|
|
415
|
-
[badge]: http://badge.fury.io/js/marked
|
|
416
|
-
[tables]: https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet#wiki-tables
|
|
417
|
-
[breaks]: https://help.github.com/articles/github-flavored-markdown#newlines
|
package/bower.json
CHANGED
package/component.json
CHANGED