marked 0.3.16 → 0.3.17

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/.eslintrc.json ADDED
@@ -0,0 +1,27 @@
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
+ }
27
+ }
package/.travis.yml CHANGED
@@ -1,5 +1,16 @@
1
1
  language: node_js
2
2
  node_js:
3
3
  - "0.10"
4
- - "0.8"
5
- - "0.6"
4
+ - "4"
5
+ - "lts/*"
6
+ - "node"
7
+ script: |
8
+ if [ `node --version | cut -d . -f 1,2` = "v0.10" ]; then
9
+ sed -i s/0o755/0755/ test/index.js;
10
+ npm test;
11
+ else
12
+ npm run test:lint && npm test;
13
+ fi
14
+ cache:
15
+ directories:
16
+ - node_modules
package/AUTHORS.md ADDED
@@ -0,0 +1,45 @@
1
+ # Authors
2
+
3
+ Marked takes an encompassing approach to its community. As such, you can think of these as [concentric circles](https://medium.com/the-node-js-collection/healthy-open-source-967fa8be7951), where each subsequent group is enveloped by the previous one.
4
+
5
+ ## Users
6
+
7
+ Users are anyone using Marked in some fashion. If you use Marked and would like to be added to a list of users, please reach out and let us know and maybe we can add you here or elsewhere.
8
+
9
+ ## Contributors
10
+
11
+ Contributors are users who submit a [PR](https://github.com/markedjs/marked/pulls), [Issue](https://github.com/markedjs/marked/issues), or collaborate in making Marked a better product and experience for all the users.
12
+
13
+ To be listed here, just make a contribution and, if it has significant impact, the committers may be able to add you here. If you're name is here, and you would rather it not be, just let us know.
14
+
15
+ - Karen Yavine @karenyavine - Thank you for helping keep us out of the security penalyt box!
16
+ - Jamie Davis @davisjam - Thank you for the security-related contributions!
17
+ - Костя Третяк @KostyaTretyak
18
+
19
+ ## Committers
20
+
21
+ Committers are contributors who also have the responsibility, privilege, some might even say burden of being able to review and merge contributions (just usually not their own).
22
+
23
+ - Tony Brix @UziTech - really good at the test harness and environment setup
24
+ - Federico Soave @Feder1co5oave - really good at the regex things
25
+ - Steven @styfle
26
+
27
+ Committers are usually selected from contributors who enter the discussions regarding the future direction of Marked (maybe even doing informal reviews of contributions despite not being able to merge them yourself).
28
+
29
+ ## Admins
30
+
31
+ Admins are committers who also have the responsibility, privilege, and burden of selecting committers and making sure the project itself runs smoothly, which includes community maintenance, governance, dispute resolution, and so on. (Letting the contributors easily enter into, and work within, the project to begin contributing, with as little friction as possible.)
32
+
33
+ ## Publishers
34
+
35
+ Publishers are admins who also have the responsibility, privilege, and burden of publishing the new releases to NPMJS and performing outreach and external stakeholder communications. Further, when things goes pear-shaped, they're the ones taking most of the heat. Finally, when things go well, they're the primary ones praising the contributors who made it possible.
36
+
37
+ (In other words, while admins are focused primarily on the internal workings of the project, Publishers are focused on internal *and* external concerns.)
38
+
39
+ - Josh Bruce @joshbruce
40
+
41
+ ## Original author
42
+
43
+ The original author is the publisher who started it all.
44
+
45
+ Christopher Jeffrey @chjj
@@ -0,0 +1,95 @@
1
+ # Contributing to Marked
2
+
3
+ - [ ] Fork `markedjs/marked`.
4
+ - [ ] Clone the library locally using GitHub Desktop or the command line.
5
+ - [ ] Make sure you are on the `master` branch.
6
+ - [ ] Be sure to run `npm install` or `npm update`.
7
+ - [ ] Create a branch.
8
+ - [ ] Make as small a change as possible.
9
+ - [ ] Run `npm test`, fix any broken things (for linting, you can run `npm run lint` to have the linter fix them for you).
10
+ - [ ] Submit a PR.
11
+
12
+ ## Design principles
13
+
14
+ Marked tends to favor following the SOLID set of software design and development principles; mainly the [single responsibility](https://en.wikipedia.org/wiki/Single_responsibility_principle) and [open/closed principles](https://en.wikipedia.org/wiki/Open/closed_principle):
15
+
16
+ - **Single responsibility:** Marked, and the components of Marked, have the single responsibility of converting Markdown strings into HTML.
17
+ - **Open/closed:** Marked favors giving developers the means to easily extend the library and its components over changing Marked's behavior through configuration options.
18
+
19
+ ## Priorities
20
+
21
+ We think we have our priorities sorted to build quality in.
22
+
23
+ The following table lists the ticket type labels we use when there is work to be done on the code either through an Issue or a PR; in priority order.
24
+
25
+ |Ticket type label |Description |
26
+ |:----------------------------------|:--------------------------------------------------------------------------------------------------------------------------------------|
27
+ |L0 - security |A security vulnerability within the Marked library is discovered. |
28
+ |L1 - broken |Valid usage results in incorrect output compared to [supported specifications](https://github.com/markedjs/marked/blob/master/AUTHORS.md#specifications) OR causes marked to crash AND there is no known workaround for the issue. |
29
+ |L2 - annoying |Similar to L1 - broken only there is a known workaround avaialable for the issue. |
30
+ |RR - refactor and re-engineer |Results in an improvement to developers using Marked (improved readability) or end-users (faster performance) or both. |
31
+ |NFS - new feature (spec related) |A capability Marked does not currently provide but is in one of the [supported specifications](https://github.com/markedjs/marked/blob/master/AUTHORS.md#specifications)|
32
+ |NFU - new feature (user requested) |A capability Marked does not currently provide but has been requested by users of Marked. |
33
+
34
+ ## Test early, often, and everything
35
+
36
+ We try to write test cases to validate output (writing tests based on the [supported specifications](https://github.com/markedjs/marked/blob/master/AUTHORS.md#specifications)) and minimize regression (writing tests for issues fixed). Therefore, if you would like to contribute, some things you should know regarding the test harness.
37
+
38
+ |Location |Description |
39
+ |:-------------|:---------------------------------------------------|
40
+ |/test/browser |For testing Marked in a client-side implementation. |
41
+ |/test/new |Tests not related to the original `markdown.pl`. |
42
+ |/test/original|Tests validating against the original `markdown.pl`.|
43
+
44
+ If your test uses features or options, assuming `gfm` is set to `false`, for example, you can add [front-matter](https://www.npmjs.com/package/front-matter) to the top of
45
+ your `.md` file
46
+
47
+ ``` yml
48
+ ---
49
+ gfm: false
50
+ ---
51
+ ```
52
+
53
+ ## Submitting PRs and Issues
54
+
55
+ Marked provides templates for submitting both pull requests and issues. When you begin creating a new PR or issue, you will see instructions on using the template.
56
+
57
+ The PR templates include checklists for both the submitter and the reviewer, which, in most cases, will not be the same person.
58
+
59
+ ## Scripts
60
+
61
+ When it comes to NPM commands, we try to use the native scripts provided by the NPM framework.
62
+
63
+ To run the tests:
64
+
65
+ ``` bash
66
+ npm test
67
+ ```
68
+
69
+ To test whether you are using the standard syntax rules for the project:
70
+
71
+ ```bash
72
+ npm run test:lint
73
+ ```
74
+
75
+ To see time comparisons between Marked and other popular Markdown libraries:
76
+
77
+ ```bash
78
+ npm run bench
79
+ ```
80
+
81
+ To check for (and fix) standardized syntax (lint):
82
+
83
+ ```bash
84
+ npm run lint
85
+ ```
86
+
87
+ To build your own minified version of Marked:
88
+
89
+ ```bash
90
+ npm run build
91
+ ```
92
+
93
+ ## Releasing
94
+
95
+ Creating GitHub releases and publishing to NPM is limited to conributors and owners. If you would like more information, please see our [releasing documentation](https://github.com/markedjs/marked/blob/master/RELEASING.md).
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.