From cd0e34677f4de48bfe3cfd90f1672597964c0cd4 Mon Sep 17 00:00:00 2001 From: Josh Bruce Date: Sun, 18 Feb 2018 22:19:37 -0600 Subject: [PATCH 01/44] Update read me with TOC & other changes --- LICENSE | 14 ++++++++ README.md | 103 +++++++++++++++++++++++++++++++++++++----------------- 2 files changed, 84 insertions(+), 33 deletions(-) diff --git a/LICENSE b/LICENSE index a7b812ed61..020db880d3 100644 --- a/LICENSE +++ b/LICENSE @@ -17,3 +17,17 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +## Markdown + +Copyright © 2004, John Gruber +http://daringfireball.net/ +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +* 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. +* 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. + +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. diff --git a/README.md b/README.md index 94ab0b9081..e6e769f9d8 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,40 @@ [![NPM version](https://badge.fury.io/js/marked.svg)][badge] -## Install + + +

Philosophy behind marked

+ +The point of marked was to create a markdown compiler where it was possible to +frequently parse huge chunks of markdown without having to worry about +caching the compiled output somehow...or blocking for an unnecessarily long time. + +marked is very concise and still implements all markdown features. It is also +now fully compatible with the client-side. + +marked more or less passes the official markdown test suite in its +entirety. This is important because a surprising number of markdown compilers +cannot pass more than a few tests. It was very difficult to get marked as +compliant as it is. It could have cut corners in several areas for the sake +of performance, but did not in order to be exactly what you expect in terms +of a markdown rendering. In fact, this is why marked could be considered at a +disadvantage in the benchmarks. + +Along with implementing every markdown feature, marked also implements [GFM +features][gfmf]. + +

Install

``` bash npm install marked --save @@ -17,7 +50,7 @@ or if you want to use the `marked` CLI tool (not necessary when using npm run-sc npm install -g marked ``` -## Usage +

Usage

Minimal usage: @@ -66,7 +99,7 @@ console.log(marked('I am using __markdown__.')); ``` -## marked(markdownString [,options] [,callback]) +

marked(markdownString [,options] [,callback])

### markdownString @@ -89,7 +122,7 @@ Function called when the `markdownString` has been fully parsed when using async highlighting. If the `options` argument is omitted, this can be used as the second argument. -## Options +

Options

### highlight @@ -282,7 +315,7 @@ Default: `false` Self-close the tags for void elements (<br/>, <img/>, etc.) with a "/" as required by XHTML. -## Access to lexer and parser +

Access to lexer and parser

You also have direct access to the lexer and parser if you so desire. @@ -298,7 +331,7 @@ console.log(tokens); console.log(lexer.rules); ``` -## CLI +

CLI

``` bash $ marked -o hello.html @@ -308,27 +341,7 @@ $ cat hello.html

hello world

``` -## Philosophy behind marked - -The point of marked was to create a markdown compiler where it was possible to -frequently parse huge chunks of markdown without having to worry about -caching the compiled output somehow...or blocking for an unnecessarily long time. - -marked is very concise and still implements all markdown features. It is also -now fully compatible with the client-side. - -marked more or less passes the official markdown test suite in its -entirety. This is important because a surprising number of markdown compilers -cannot pass more than a few tests. It was very difficult to get marked as -compliant as it is. It could have cut corners in several areas for the sake -of performance, but did not in order to be exactly what you expect in terms -of a markdown rendering. In fact, this is why marked could be considered at a -disadvantage in the benchmarks. - -Along with implementing every markdown feature, marked also implements [GFM -features][gfmf]. - -## Benchmarks +

Benchmarks

node v8.9.4 @@ -369,10 +382,12 @@ $ node links: {} ] ``` -## Running Tests & Contributing +

Contributing

+ +1. If the code in a pull request can have a test written for it, it should have it. (If the test already exists, please reference the test which should pass.) +2. Do not merge your own. Mainly for collaborators and owners, please do not review and merge your own PRs. -If you want to submit a pull request, make sure your changes pass the test -suite. If you're adding a new feature, be sure to add your own test. +### Tests The marked test suite is set up slightly strangely: `test/new` is for all tests that are not part of the original markdown.pl test suite (this is where your @@ -396,17 +411,39 @@ To run the tests: npm run test ``` -### Contribution and License Agreement +### Contribution License Agreement If you contribute code to this project, you are implicitly allowing your code to be distributed under the MIT license. You are also implicitly verifying that all code is your original work. `` -## License +

Releasing

+ +**Master is alwasys shippable:** We try to merge PRs in such a way that `master` is the only branch to really be concerned about *and* `master` can always be released. This allows smoother flow between new fetures, bug fixes, and so on. (Almost a continuous deployment setup, without automation.) + +**Version naming:** relatively standard [major].[minor].[patch] where `major` releases represent known breaking changes to the previous release, `minor` represent additions of new funcitonality without breaking changes, and `patch` releases represent changes meant to fix previously released functionality with no new functionality. Note: When the major is a zero, it means the library is still in a beta state wherein the `major` does not get updated; therefore, `minor` releases may introduce breaking changes, and `patch` releases may contain new features. + +**Release process:** + +1. Check out library +2. Make sure you are on the `master` branch +3. Fork from `master` to create a release branch +4. `$ npm run build` (builds minified version and whatnot) +5. `$ npm version [major|minor|patch]` (updates `package.json`) +6. `$ npm publish` (publishes package to NPM) +7. Submit PR +8. Merge PR (only time where submitter should be "allowed" to merge his or her own) +9. Navigate to the "Releases" tab on the project main page -> "Draft new release" +10. Add version number matching the one in the `package.json` file after publishing the release +11. Make sure `master` is the branch from which the release will be made +12. Add notes regarding what users should expect from the release +13. Click "Publish release" + +

License

Copyright (c) 2011-2018, Christopher Jeffrey. (MIT License) -See LICENSE for more info. +See [LICENSE](https://github.com/markedjs/marked/blob/master/LICENSE) for more details. [gfm]: https://help.github.com/articles/github-flavored-markdown [gfmf]: http://github.github.com/github-flavored-markdown/ From e64f9a9c9bb5cc7e0757a703084e60e40e19b697 Mon Sep 17 00:00:00 2001 From: Josh Bruce Date: Sun, 18 Feb 2018 22:22:20 -0600 Subject: [PATCH 02/44] typos --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e6e769f9d8..9db5cb54b4 100644 --- a/README.md +++ b/README.md @@ -419,7 +419,7 @@ all code is your original work. ``

Releasing

-**Master is alwasys shippable:** We try to merge PRs in such a way that `master` is the only branch to really be concerned about *and* `master` can always be released. This allows smoother flow between new fetures, bug fixes, and so on. (Almost a continuous deployment setup, without automation.) +**Master is always shippable:** We try to merge PRs in such a way that `master` is the only branch to really be concerned about *and* `master` can always be released. This allows smoother flow between new fetures, bug fixes, and so on. (Almost a continuous deployment setup, without automation.) **Version naming:** relatively standard [major].[minor].[patch] where `major` releases represent known breaking changes to the previous release, `minor` represent additions of new funcitonality without breaking changes, and `patch` releases represent changes meant to fix previously released functionality with no new functionality. Note: When the major is a zero, it means the library is still in a beta state wherein the `major` does not get updated; therefore, `minor` releases may introduce breaking changes, and `patch` releases may contain new features. @@ -427,7 +427,7 @@ all code is your original work. `` 1. Check out library 2. Make sure you are on the `master` branch -3. Fork from `master` to create a release branch +3. Create release branch from `master` 4. `$ npm run build` (builds minified version and whatnot) 5. `$ npm version [major|minor|patch]` (updates `package.json`) 6. `$ npm publish` (publishes package to NPM) From ab13c99cff7609fa3a58a782af919817401f48f2 Mon Sep 17 00:00:00 2001 From: Josh Bruce Date: Sun, 25 Feb 2018 14:18:59 -0500 Subject: [PATCH 03/44] Initial product vision --- README.md | 34 +++++++++++----------------------- 1 file changed, 11 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index 9db5cb54b4..f2fb222639 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,17 @@ # marked -> A full-featured markdown parser and compiler, written in JavaScript. Built -> for speed. +[![NPM version](https://badge.fury.io/js/marked.svg)][badge] [![NPM dependencies](https://david-dm.org/markedjs/marked.svg)][badge] -[![NPM version](https://badge.fury.io/js/marked.svg)][badge] +Marked is + +1. built for speed.* +2. a low-level markdown compiler that allows frequent parsing of large chunks of markdown without caching or blocking for long periods of time.** +3. light-weight while implementing all markdown features from the supported flavors & specifications.*** +4. available as a command line interface and running in client- or server-side JavaScript projects. + +- * Still working on metrics for comparative analysis and definition. +- ** As few dependencies as possible. +- *** Strict compliance could result in slower processing when running comparative benchmarking. -

Philosophy behind marked

- -The point of marked was to create a markdown compiler where it was possible to -frequently parse huge chunks of markdown without having to worry about -caching the compiled output somehow...or blocking for an unnecessarily long time. - -marked is very concise and still implements all markdown features. It is also -now fully compatible with the client-side. - -marked more or less passes the official markdown test suite in its -entirety. This is important because a surprising number of markdown compilers -cannot pass more than a few tests. It was very difficult to get marked as -compliant as it is. It could have cut corners in several areas for the sake -of performance, but did not in order to be exactly what you expect in terms -of a markdown rendering. In fact, this is why marked could be considered at a -disadvantage in the benchmarks. - -Along with implementing every markdown feature, marked also implements [GFM -features][gfmf]. -

Install

``` bash From d1fcb355a30dc5e6a454d157011da9ebd51a794f Mon Sep 17 00:00:00 2001 From: Josh Bruce Date: Sun, 25 Feb 2018 15:17:16 -0500 Subject: [PATCH 04/44] Add advanced usage --- README.md | 274 +++------------------------------------------- USAGE_ADVANCED.md | 180 ++++++++++++++++++++++++++++++ 2 files changed, 194 insertions(+), 260 deletions(-) create mode 100644 USAGE_ADVANCED.md diff --git a/README.md b/README.md index f2fb222639..8d38d5ec45 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ Marked is 1. built for speed.* 2. a low-level markdown compiler that allows frequent parsing of large chunks of markdown without caching or blocking for long periods of time.** 3. light-weight while implementing all markdown features from the supported flavors & specifications.*** -4. available as a command line interface and running in client- or server-side JavaScript projects. +4. available as a command line interface (CLI) and running in client- or server-side JavaScript projects. - * Still working on metrics for comparative analysis and definition. - ** As few dependencies as possible. @@ -26,48 +26,25 @@ Marked is
  • License
  • -

    Install

    +

    Installation

    -``` bash -npm install marked --save -``` - -or if you want to use the `marked` CLI tool (not necessary when using npm run-scripts): +**CLI:** `npm install -g marked` -``` bash -npm install -g marked -``` +**In-browser:** `npm install marked --save`

    Usage

    -Minimal usage: - -```js -var marked = require('marked'); -console.log(marked('I am using __markdown__.')); -// Outputs:

    I am using markdown.

    -``` +**CLI** -Example setting options: - -```js -var marked = require('marked'); -marked.setOptions({ - renderer: new marked.Renderer(), - gfm: true, - tables: true, - breaks: false, - pedantic: false, - sanitize: false, - smartLists: true, - smartypants: false, - xhtml: false -}); - -console.log(marked('I am using __markdown__.')); +``` bash +$ marked -o hello.html +hello world +^D +$ cat hello.html +

    hello world

    ``` -### Browser +**Browser** ```html @@ -75,7 +52,7 @@ console.log(marked('I am using __markdown__.')); Marked in the browser - +
    @@ -87,221 +64,8 @@ console.log(marked('I am using __markdown__.')); ``` -

    marked(markdownString [,options] [,callback])

    - -### markdownString - -Type: `string` - -String of markdown source to be compiled. - -### options - -Type: `object` - -Hash of options. Can also be set using the `marked.setOptions` method as seen -above. - -### callback - -Type: `function` - -Function called when the `markdownString` has been fully parsed when using -async highlighting. If the `options` argument is omitted, this can be used as -the second argument. - -

    Options

    - -### highlight - -Type: `function` - -A function to highlight code blocks. The first example below uses async highlighting with -[node-pygmentize-bundled][pygmentize], and the second is a synchronous example using -[highlight.js][highlight]: - -```js -var marked = require('marked'); - -var markdownString = '```js\n console.log("hello"); \n```'; - -// Async highlighting with pygmentize-bundled -marked.setOptions({ - highlight: function (code, lang, callback) { - require('pygmentize-bundled')({ lang: lang, format: 'html' }, code, function (err, result) { - callback(err, result.toString()); - }); - } -}); - -// Using async version of marked -marked(markdownString, function (err, content) { - if (err) throw err; - console.log(content); -}); - -// Synchronous highlighting with highlight.js -marked.setOptions({ - highlight: function (code) { - return require('highlight.js').highlightAuto(code).value; - } -}); - -console.log(marked(markdownString)); -``` - -#### highlight arguments - -`code` - -Type: `string` - -The section of code to pass to the highlighter. - -`lang` - -Type: `string` - -The programming language specified in the code block. - -`callback` - -Type: `function` - -The callback function to call when using an async highlighter. - -### renderer - -Type: `object` -Default: `new Renderer()` - -An object containing functions to render tokens to HTML. -#### Overriding renderer methods - -The renderer option allows you to render tokens in a custom manner. Here is an -example of overriding the default heading token rendering by adding an embedded anchor tag like on GitHub: - -```javascript -var marked = require('marked'); -var renderer = new marked.Renderer(); - -renderer.heading = function (text, level) { - var escapedText = text.toLowerCase().replace(/[^\w]+/g, '-'); - - return '' + - text + ''; -}; - -console.log(marked('# heading+', { renderer: renderer })); -``` -This code will output the following HTML: -```html -

    - - - - heading+ -

    -``` - -#### Block level renderer methods - -- code(*string* code, *string* language) -- blockquote(*string* quote) -- html(*string* html) -- heading(*string* text, *number* level) -- hr() -- list(*string* body, *boolean* ordered) -- listitem(*string* text) -- paragraph(*string* text) -- table(*string* header, *string* body) -- tablerow(*string* content) -- tablecell(*string* content, *object* flags) - -`flags` has the following properties: - -```js -{ - header: true || false, - align: 'center' || 'left' || 'right' -} -``` - -#### Inline level renderer methods - -- strong(*string* text) -- em(*string* text) -- codespan(*string* code) -- br() -- del(*string* text) -- link(*string* href, *string* title, *string* text) -- image(*string* href, *string* title, *string* text) -- text(*string* text) - -### gfm - -Type: `boolean` -Default: `true` - -Enable [GitHub flavored markdown][gfm]. - -### tables - -Type: `boolean` -Default: `true` - -Enable GFM [tables][tables]. -This option requires the `gfm` option to be true. - -### breaks - -Type: `boolean` -Default: `false` - -Enable GFM [line breaks][breaks]. -This option requires the `gfm` option to be true. - -### pedantic - -Type: `boolean` -Default: `false` - -Conform to obscure parts of `markdown.pl` as much as possible. Don't fix any of -the original markdown bugs or poor behavior. - -### sanitize - -Type: `boolean` -Default: `false` - -Sanitize the output. Ignore any HTML that has been input. - -### smartLists - -Type: `boolean` -Default: `true` - -Use smarter list behavior than the original markdown. May eventually be -default with the old behavior moved into `pedantic`. - -### smartypants - -Type: `boolean` -Default: `false` - -Use "smart" typographic punctuation for things like quotes and dashes. - -### xhtml - -Type: `boolean` -Default: `false` - -Self-close the tags for void elements (<br/>, <img/>, etc.) with a "/" as required by XHTML. +Marked offers [advanced configurations](https://github.com/markedjs/marked/blob/master/USAGE_ADVANCED.md) and extensibility as well.

    Access to lexer and parser

    @@ -319,16 +83,6 @@ console.log(tokens); console.log(lexer.rules); ``` -

    CLI

    - -``` bash -$ marked -o hello.html -hello world -^D -$ cat hello.html -

    hello world

    -``` -

    Benchmarks

    node v8.9.4 diff --git a/USAGE_ADVANCED.md b/USAGE_ADVANCED.md new file mode 100644 index 0000000000..d8e3caf235 --- /dev/null +++ b/USAGE_ADVANCED.md @@ -0,0 +1,180 @@ +## The `marked` function + +```js +marked(markdownString [,options] [,callback]) +``` + +|Argument |Type |Notes | +|:--------------------:|:-----------:|:---------------------------------------------------------------------------------------------------:| +|markdownString |`string` |String of markdown source to be compiled. | +|options|`object`|Hash of options. Can also use `marked.setOptions`. | +|callback |`function` |Called when `markdownString` has been parsed. Can be used as second argument if no `options` present.| + +### Alternative + +```js +// Create reference instance +var myMarked = require('marked'); + +// Set options +// `highlight` example uses `highlight.js` +myMarked.setOptions({ + renderer: new marked.Renderer(), + highlight: function(code) { + return require('highlight.js').highlightAuto(code).value; + }, + pedantic: false, + gfm: true, + tables: true, + breaks: false, + sanitize: false, + smartLists: true, + smartypants: false, + xhtml: false +}); + +// Compile +console.log(myMarked('I am using __markdown__.')); +``` + +

    Options

    + +|Member |Type |Notes | +|:---------:|:--------:|:---------------------------------------------------------------------------------------------------------------------------:| +|highlight |`function`|A function to highlight code blocks. | +|renderer |`object` |An object containing functions to render tokens to HTML. Default: `new Renderer()` | +|pedantic |`boolean` |Conform to obscure parts of `markdown.pl` as much as possible. Don't fix original markdown bugs or behavior. Default: `false`| +|gfm |`boolean` |Use approved [GitHub Flavored Markdown (GFM) specification](https://github.github.com/gfm/). | +|tables |`boolean` |Use [GFM Tables extension](https://github.github.com/gfm/#tables-extension-). Requires `gfm` be `true`. | +|breaks |`boolean` |Use GFM [hard](https://github.github.com/gfm/#hard-line-breaks) and [soft](https://github.github.com/gfm/#soft-line-breaks) line breaks. Requires `gfm` be `true`. Default: `false`| +|sanitize |`boolean` |Ignore HTML passed into `markdownString` (sanitize the input). Default: `false` | +|smartlists |`boolean` |Use smarter list behavior than those found in `markdown.pl`. Default: `true` | +|smartypants|`boolean` |Use "smart" typographic punctuation for things like quotes and dashes. | +|xhtml |`boolean` |Self-close the tags for void elements (<br/>, <img/>, etc.) with a "/" as required by XHTML. Default: `false` | + +### highlight + +Captured...?? + + The first example below uses async highlighting with +[node-pygmentize-bundled][pygmentize], and the second is a synchronous example using +[highlight.js][highlight]: + +```js +var marked = require('marked'); + +var markdownString = '```js\n console.log("hello"); \n```'; + +// Async highlighting with pygmentize-bundled +marked.setOptions({ + highlight: function (code, lang, callback) { + require('pygmentize-bundled')({ lang: lang, format: 'html' }, code, function (err, result) { + callback(err, result.toString()); + }); + } +}); + +// Using async version of marked +marked(markdownString, function (err, content) { + if (err) throw err; + console.log(content); +}); + +// Synchronous highlighting with highlight.js +marked.setOptions({ + highlight: function (code) { + return require('highlight.js').highlightAuto(code).value; + } +}); + +console.log(marked(markdownString)); +``` + +#### highlight arguments + +`code` + +Type: `string` + +The section of code to pass to the highlighter. + +`lang` + +Type: `string` + +The programming language specified in the code block. + +`callback` + +Type: `function` + +The callback function to call when using an async highlighter. + +### renderer + +#### Overriding renderer methods + +The renderer option allows you to render tokens in a custom manner. Here is an +example of overriding the default heading token rendering by adding an embedded anchor tag like on GitHub: + +```javascript +var marked = require('marked'); +var renderer = new marked.Renderer(); + +renderer.heading = function (text, level) { + var escapedText = text.toLowerCase().replace(/[^\w]+/g, '-'); + + return '' + + text + ''; +}; + +console.log(marked('# heading+', { renderer: renderer })); +``` +This code will output the following HTML: +```html +

    + + + + heading+ +

    +``` + +#### Block level renderer methods + +- code(*string* code, *string* language) +- blockquote(*string* quote) +- html(*string* html) +- heading(*string* text, *number* level) +- hr() +- list(*string* body, *boolean* ordered) +- listitem(*string* text) +- paragraph(*string* text) +- table(*string* header, *string* body) +- tablerow(*string* content) +- tablecell(*string* content, *object* flags) + +`flags` has the following properties: + +```js +{ + header: true || false, + align: 'center' || 'left' || 'right' +} +``` + +#### Inline level renderer methods + +- strong(*string* text) +- em(*string* text) +- codespan(*string* code) +- br() +- del(*string* text) +- link(*string* href, *string* title, *string* text) +- image(*string* href, *string* title, *string* text) +- text(*string* text) + From f8fe4e4f7f3003e76e82218e5eca16228a08dcca Mon Sep 17 00:00:00 2001 From: Josh Bruce Date: Sun, 25 Feb 2018 15:19:15 -0500 Subject: [PATCH 05/44] Table alignments --- USAGE_ADVANCED.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/USAGE_ADVANCED.md b/USAGE_ADVANCED.md index d8e3caf235..c12c22c68b 100644 --- a/USAGE_ADVANCED.md +++ b/USAGE_ADVANCED.md @@ -39,8 +39,8 @@ console.log(myMarked('I am using __markdown__.'));

    Options

    -|Member |Type |Notes | -|:---------:|:--------:|:---------------------------------------------------------------------------------------------------------------------------:| +|:Member :|:Type :|:Notes :| +|:----------|:---------|:----------------------------------------------------------------------------------------------------------------------------| |highlight |`function`|A function to highlight code blocks. | |renderer |`object` |An object containing functions to render tokens to HTML. Default: `new Renderer()` | |pedantic |`boolean` |Conform to obscure parts of `markdown.pl` as much as possible. Don't fix original markdown bugs or behavior. Default: `false`| From 2f245d059d0c59a70192175ade93b2c516feeec4 Mon Sep 17 00:00:00 2001 From: Josh Bruce Date: Sun, 25 Feb 2018 15:20:38 -0500 Subject: [PATCH 06/44] Table alignments --- USAGE_ADVANCED.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/USAGE_ADVANCED.md b/USAGE_ADVANCED.md index c12c22c68b..4917526e24 100644 --- a/USAGE_ADVANCED.md +++ b/USAGE_ADVANCED.md @@ -39,7 +39,8 @@ console.log(myMarked('I am using __markdown__.'));

    Options

    -|:Member :|:Type :|:Notes :| +|:---------:|:--------:|:---------------------------------------------------------------------------------------------------------------------------:| +|Member |Type |Notes | |:----------|:---------|:----------------------------------------------------------------------------------------------------------------------------| |highlight |`function`|A function to highlight code blocks. | |renderer |`object` |An object containing functions to render tokens to HTML. Default: `new Renderer()` | From bc8854653a8965b40bb1f67313f15643bcc171db Mon Sep 17 00:00:00 2001 From: Josh Bruce Date: Sun, 25 Feb 2018 15:21:59 -0500 Subject: [PATCH 07/44] Table alignment --- USAGE_ADVANCED.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/USAGE_ADVANCED.md b/USAGE_ADVANCED.md index 4917526e24..0d2c53fe59 100644 --- a/USAGE_ADVANCED.md +++ b/USAGE_ADVANCED.md @@ -5,7 +5,7 @@ marked(markdownString [,options] [,callback]) ``` |Argument |Type |Notes | -|:--------------------:|:-----------:|:---------------------------------------------------------------------------------------------------:| +|:---------------------|:------------|:----------------------------------------------------------------------------------------------------| |markdownString |`string` |String of markdown source to be compiled. | |options|`object`|Hash of options. Can also use `marked.setOptions`. | |callback |`function` |Called when `markdownString` has been parsed. Can be used as second argument if no `options` present.| @@ -39,7 +39,6 @@ console.log(myMarked('I am using __markdown__.'));

    Options

    -|:---------:|:--------:|:---------------------------------------------------------------------------------------------------------------------------:| |Member |Type |Notes | |:----------|:---------|:----------------------------------------------------------------------------------------------------------------------------| |highlight |`function`|A function to highlight code blocks. | From 9587c3c78abee6916b1e3c2e29f311fba2618a19 Mon Sep 17 00:00:00 2001 From: Josh Bruce Date: Sun, 25 Feb 2018 15:32:52 -0500 Subject: [PATCH 08/44] Highlight consolidated --- USAGE_ADVANCED.md | 56 +++++++---------------------------------------- 1 file changed, 8 insertions(+), 48 deletions(-) diff --git a/USAGE_ADVANCED.md b/USAGE_ADVANCED.md index 0d2c53fe59..506291afca 100644 --- a/USAGE_ADVANCED.md +++ b/USAGE_ADVANCED.md @@ -10,7 +10,7 @@ marked(markdownString [,options] [,callback]) |options|`object`|Hash of options. Can also use `marked.setOptions`. | |callback |`function` |Called when `markdownString` has been parsed. Can be used as second argument if no `options` present.| -### Alternative +### Alternative using reference ```js // Create reference instance @@ -41,7 +41,7 @@ console.log(myMarked('I am using __markdown__.')); |Member |Type |Notes | |:----------|:---------|:----------------------------------------------------------------------------------------------------------------------------| -|highlight |`function`|A function to highlight code blocks. | +|highlight |`function`|A function to highlight code blocks. See also: Asynchronous highlighting. | |renderer |`object` |An object containing functions to render tokens to HTML. Default: `new Renderer()` | |pedantic |`boolean` |Conform to obscure parts of `markdown.pl` as much as possible. Don't fix original markdown bugs or behavior. Default: `false`| |gfm |`boolean` |Use approved [GitHub Flavored Markdown (GFM) specification](https://github.github.com/gfm/). | @@ -52,63 +52,23 @@ console.log(myMarked('I am using __markdown__.')); |smartypants|`boolean` |Use "smart" typographic punctuation for things like quotes and dashes. | |xhtml |`boolean` |Self-close the tags for void elements (<br/>, <img/>, etc.) with a "/" as required by XHTML. Default: `false` | -### highlight +

    Asynchronous highlighting

    -Captured...?? - - The first example below uses async highlighting with -[node-pygmentize-bundled][pygmentize], and the second is a synchronous example using -[highlight.js][highlight]: +Unlike `highlight.js` the `pygmatize.js` library uses asynchronous highlighting. This example demonstrates that marked is agnostic when it comes to the highlighter you use. ```js -var marked = require('marked'); - -var markdownString = '```js\n console.log("hello"); \n```'; - -// Async highlighting with pygmentize-bundled -marked.setOptions({ - highlight: function (code, lang, callback) { +myMarked.setOption({ + highlight: function(code, lang, callback) { require('pygmentize-bundled')({ lang: lang, format: 'html' }, code, function (err, result) { callback(err, result.toString()); }); } }); -// Using async version of marked -marked(markdownString, function (err, content) { - if (err) throw err; - console.log(content); -}); - -// Synchronous highlighting with highlight.js -marked.setOptions({ - highlight: function (code) { - return require('highlight.js').highlightAuto(code).value; - } -}); - -console.log(marked(markdownString)); +console.log(myMarked(markdownString)); ``` -#### highlight arguments - -`code` - -Type: `string` - -The section of code to pass to the highlighter. - -`lang` - -Type: `string` - -The programming language specified in the code block. - -`callback` - -Type: `function` - -The callback function to call when using an async highlighter. +In both examples, `code` is a `string` representing the section of code to pass to the highlighter. In this example, `lang` is a `string` informing the highlighter what programming lnaguage to use for the `code` and `callback` is the `function` the asynchronous highlighter will call once complete. ### renderer From f711f3686549d02f5d841cd5b5db0fb1c49233af Mon Sep 17 00:00:00 2001 From: Josh Bruce Date: Sun, 25 Feb 2018 16:01:22 -0500 Subject: [PATCH 09/44] Base README --- CONTRIBUTING.md | 55 +++++++++++++++++ LICENSE => LICENSE.md | 8 +++ README.md | 135 +++++------------------------------------ USAGE_ADVANCED.md | 71 +--------------------- USAGE_EXTENSIBILITY.md | 109 +++++++++++++++++++++++++++++++++ 5 files changed, 187 insertions(+), 191 deletions(-) create mode 100644 CONTRIBUTING.md rename LICENSE => LICENSE.md (91%) create mode 100644 USAGE_EXTENSIBILITY.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000000..05fe966e8f --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,55 @@ +The marked library tends to favor following the SOLID set of software design and development principles. + +## Priorities + +We think we have our priorities straight. + + +1. If the code in a pull request can have a test written for it, it should have it. (If the test already exists, please reference the test which should pass.) +2. Do not merge your own. Mainly for collaborators and owners, please do not review and merge your own PRs. + +### Tests + +The marked test suite is set up slightly strangely: `test/new` is for all tests +that are not part of the original markdown.pl test suite (this is where your +test should go if you make one). `test/original` is only for the original +markdown.pl tests. + +In other words, if you have a test to add, add it to `test/new/`. If your test +uses a certain feature, for example, maybe it assumes GFM is *not* enabled, you +can add [front-matter](https://www.npmjs.com/package/front-matter) to the top of +your `.md` file + +``` yml +--- +gfm: false +--- +``` + +To run the tests: + +``` bash +npm run test +``` + +

    Releasing

    + +**Master is always shippable:** We try to merge PRs in such a way that `master` is the only branch to really be concerned about *and* `master` can always be released. This allows smoother flow between new fetures, bug fixes, and so on. (Almost a continuous deployment setup, without automation.) + +**Version naming:** relatively standard [major].[minor].[patch] where `major` releases represent known breaking changes to the previous release, `minor` represent additions of new funcitonality without breaking changes, and `patch` releases represent changes meant to fix previously released functionality with no new functionality. Note: When the major is a zero, it means the library is still in a beta state wherein the `major` does not get updated; therefore, `minor` releases may introduce breaking changes, and `patch` releases may contain new features. + +**Release process:** + +1. Check out library +2. Make sure you are on the `master` branch +3. Create release branch from `master` +4. `$ npm run build` (builds minified version and whatnot) +5. `$ npm version [major|minor|patch]` (updates `package.json`) +6. `$ npm publish` (publishes package to NPM) +7. Submit PR +8. Merge PR (only time where submitter should be "allowed" to merge his or her own) +9. Navigate to the "Releases" tab on the project main page -> "Draft new release" +10. Add version number matching the one in the `package.json` file after publishing the release +11. Make sure `master` is the branch from which the release will be made +12. Add notes regarding what users should expect from the release +13. Click "Publish release" \ No newline at end of file diff --git a/LICENSE b/LICENSE.md similarity index 91% rename from LICENSE rename to LICENSE.md index 020db880d3..aa60b8b180 100644 --- a/LICENSE +++ b/LICENSE.md @@ -1,3 +1,11 @@ +## Contribution License Agreement + +If you contribute code to this project, you are implicitly allowing your code +to be distributed under the MIT license. You are also implicitly verifying that +all code is your original work. `` + +## Marked + Copyright (c) 2011-2014, Christopher Jeffrey (https://github.com/chjj/) Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/README.md b/README.md index 8d38d5ec45..95dfda31f3 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # marked -[![NPM version](https://badge.fury.io/js/marked.svg)][badge] [![NPM dependencies](https://david-dm.org/markedjs/marked.svg)][badge] +[![NPM version](https://badge.fury.io/js/marked.svg)] [![NPM dependencies](https://david-dm.org/markedjs/marked.svg)] Marked is @@ -16,12 +16,7 @@ Marked is @@ -65,132 +60,30 @@ $ cat hello.html ``` -Marked offers [advanced configurations](https://github.com/markedjs/marked/blob/master/USAGE_ADVANCED.md) and extensibility as well. +Marked offers [advanced configurations](https://github.com/markedjs/marked/blob/master/USAGE_ADVANCED.md) and [extensibility](https://github.com/markedjs/marked/blob/master/USAGE_EXTENSIBILITY.md) as well. -

    Access to lexer and parser

    +

    Supported Markdown specifications

    -You also have direct access to the lexer and parser if you so desire. +We actively support the features of the following [Markdown flavors](https://github.com/commonmark/CommonMark/wiki/Markdown-Flavors). -``` js -var tokens = marked.lexer(text, options); -console.log(marked.parser(tokens)); -``` - -``` js -var lexer = new marked.Lexer(options); -var tokens = lexer.lex(text); -console.log(tokens); -console.log(lexer.rules); -``` - -

    Benchmarks

    - -node v8.9.4 - -``` bash -$ npm run bench -marked completed in 3408ms. -marked (gfm) completed in 3465ms. -marked (pedantic) completed in 3032ms. -showdown (reuse converter) completed in 21444ms. -showdown (new converter) completed in 23058ms. -markdown-it completed in 3364ms. -markdown.js completed in 12090ms. -``` +|Flavor |Version | +|:----------------------------------------------------------|:----------| +|The original markdown.pl |-- | +|[CommonMark](http://spec.commonmark.org/0.28/) |0.28 | +|[GitHub Flavored Markdown](https://github.github.com/gfm/) |0.28 | -### Pro level +By supporting the above Markdown flavors, it's possible that Marked can help you use other flavors as well; however, these are not actively supported by the community. -You also have direct access to the lexer and parser if you so desire. - -``` js -var tokens = marked.lexer(text, options); -console.log(marked.parser(tokens)); -``` - -``` js -var lexer = new marked.Lexer(options); -var tokens = lexer.lex(text); -console.log(tokens); -console.log(lexer.rules); -``` - -``` bash -$ node -> require('marked').lexer('> i am using marked.') -[ { type: 'blockquote_start' }, - { type: 'paragraph', - text: 'i am using marked.' }, - { type: 'blockquote_end' }, - links: {} ] -```

    Contributing

    -1. If the code in a pull request can have a test written for it, it should have it. (If the test already exists, please reference the test which should pass.) -2. Do not merge your own. Mainly for collaborators and owners, please do not review and merge your own PRs. - -### Tests - -The marked test suite is set up slightly strangely: `test/new` is for all tests -that are not part of the original markdown.pl test suite (this is where your -test should go if you make one). `test/original` is only for the original -markdown.pl tests. - -In other words, if you have a test to add, add it to `test/new/`. If your test -uses a certain feature, for example, maybe it assumes GFM is *not* enabled, you -can add [front-matter](https://www.npmjs.com/package/front-matter) to the top of -your `.md` file - -``` yml ---- -gfm: false ---- -``` - -To run the tests: - -``` bash -npm run test -``` - -### Contribution License Agreement - -If you contribute code to this project, you are implicitly allowing your code -to be distributed under the MIT license. You are also implicitly verifying that -all code is your original work. `` - -

    Releasing

    - -**Master is always shippable:** We try to merge PRs in such a way that `master` is the only branch to really be concerned about *and* `master` can always be released. This allows smoother flow between new fetures, bug fixes, and so on. (Almost a continuous deployment setup, without automation.) - -**Version naming:** relatively standard [major].[minor].[patch] where `major` releases represent known breaking changes to the previous release, `minor` represent additions of new funcitonality without breaking changes, and `patch` releases represent changes meant to fix previously released functionality with no new functionality. Note: When the major is a zero, it means the library is still in a beta state wherein the `major` does not get updated; therefore, `minor` releases may introduce breaking changes, and `patch` releases may contain new features. - -**Release process:** +The marked community enjoys a spirit of collaboration and contribution from all comers. Whether you're just getting started with Markdown, JavaScript, and Marked or your a veteran with it all, we're here to help you improve as a professional software developer while helping to improve Marked itself. Please see our [contributing documentation](https://github.com/markedjs/marked/blob/master/CONTRIBUTING.md) for more details. -1. Check out library -2. Make sure you are on the `master` branch -3. Create release branch from `master` -4. `$ npm run build` (builds minified version and whatnot) -5. `$ npm version [major|minor|patch]` (updates `package.json`) -6. `$ npm publish` (publishes package to NPM) -7. Submit PR -8. Merge PR (only time where submitter should be "allowed" to merge his or her own) -9. Navigate to the "Releases" tab on the project main page -> "Draft new release" -10. Add version number matching the one in the `package.json` file after publishing the release -11. Make sure `master` is the branch from which the release will be made -12. Add notes regarding what users should expect from the release -13. Click "Publish release" +For our Contribution License Agreement, see our [license](https://github.com/markedjs/marked/blob/master/LICENSE).

    License

    Copyright (c) 2011-2018, Christopher Jeffrey. (MIT License) -See [LICENSE](https://github.com/markedjs/marked/blob/master/LICENSE) for more details. +See [license](https://github.com/markedjs/marked/blob/master/LICENSE) for more details. -[gfm]: https://help.github.com/articles/github-flavored-markdown -[gfmf]: http://github.github.com/github-flavored-markdown/ -[pygmentize]: https://github.com/rvagg/node-pygmentize-bundled -[highlight]: https://github.com/isagalaev/highlight.js -[badge]: http://badge.fury.io/js/marked -[tables]: https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet#wiki-tables -[breaks]: https://help.github.com/articles/github-flavored-markdown#newlines diff --git a/USAGE_ADVANCED.md b/USAGE_ADVANCED.md index 506291afca..3e4ba294f0 100644 --- a/USAGE_ADVANCED.md +++ b/USAGE_ADVANCED.md @@ -68,73 +68,4 @@ myMarked.setOption({ console.log(myMarked(markdownString)); ``` -In both examples, `code` is a `string` representing the section of code to pass to the highlighter. In this example, `lang` is a `string` informing the highlighter what programming lnaguage to use for the `code` and `callback` is the `function` the asynchronous highlighter will call once complete. - -### renderer - -#### Overriding renderer methods - -The renderer option allows you to render tokens in a custom manner. Here is an -example of overriding the default heading token rendering by adding an embedded anchor tag like on GitHub: - -```javascript -var marked = require('marked'); -var renderer = new marked.Renderer(); - -renderer.heading = function (text, level) { - var escapedText = text.toLowerCase().replace(/[^\w]+/g, '-'); - - return '' + - text + ''; -}; - -console.log(marked('# heading+', { renderer: renderer })); -``` -This code will output the following HTML: -```html -

    - - - - heading+ -

    -``` - -#### Block level renderer methods - -- code(*string* code, *string* language) -- blockquote(*string* quote) -- html(*string* html) -- heading(*string* text, *number* level) -- hr() -- list(*string* body, *boolean* ordered) -- listitem(*string* text) -- paragraph(*string* text) -- table(*string* header, *string* body) -- tablerow(*string* content) -- tablecell(*string* content, *object* flags) - -`flags` has the following properties: - -```js -{ - header: true || false, - align: 'center' || 'left' || 'right' -} -``` - -#### Inline level renderer methods - -- strong(*string* text) -- em(*string* text) -- codespan(*string* code) -- br() -- del(*string* text) -- link(*string* href, *string* title, *string* text) -- image(*string* href, *string* title, *string* text) -- text(*string* text) - +In both examples, `code` is a `string` representing the section of code to pass to the highlighter. In this example, `lang` is a `string` informing the highlighter what programming lnaguage to use for the `code` and `callback` is the `function` the asynchronous highlighter will call once complete. \ No newline at end of file diff --git a/USAGE_EXTENSIBILITY.md b/USAGE_EXTENSIBILITY.md new file mode 100644 index 0000000000..10c639400a --- /dev/null +++ b/USAGE_EXTENSIBILITY.md @@ -0,0 +1,109 @@ +### renderer + +#### Overriding renderer methods + +The renderer option allows you to render tokens in a custom manner. Here is an +example of overriding the default heading token rendering by adding an embedded anchor tag like on GitHub: + +```javascript +var marked = require('marked'); +var renderer = new marked.Renderer(); + +renderer.heading = function (text, level) { + var escapedText = text.toLowerCase().replace(/[^\w]+/g, '-'); + + return '' + + text + ''; +}; + +console.log(marked('# heading+', { renderer: renderer })); +``` +This code will output the following HTML: +```html +

    + + + + heading+ +

    +``` + +#### Block level renderer methods + +- code(*string* code, *string* language) +- blockquote(*string* quote) +- html(*string* html) +- heading(*string* text, *number* level) +- hr() +- list(*string* body, *boolean* ordered) +- listitem(*string* text) +- paragraph(*string* text) +- table(*string* header, *string* body) +- tablerow(*string* content) +- tablecell(*string* content, *object* flags) + +`flags` has the following properties: + +```js +{ + header: true || false, + align: 'center' || 'left' || 'right' +} +``` + +#### Inline level renderer methods + +- strong(*string* text) +- em(*string* text) +- codespan(*string* code) +- br() +- del(*string* text) +- link(*string* href, *string* title, *string* text) +- image(*string* href, *string* title, *string* text) +- text(*string* text) + +

    Access to lexer and parser

    + +You also have direct access to the lexer and parser if you so desire. + +``` js +var tokens = marked.lexer(text, options); +console.log(marked.parser(tokens)); +``` + +``` js +var lexer = new marked.Lexer(options); +var tokens = lexer.lex(text); +console.log(tokens); +console.log(lexer.rules); +``` + +### Pro level + +You also have direct access to the lexer and parser if you so desire. + +``` js +var tokens = marked.lexer(text, options); +console.log(marked.parser(tokens)); +``` + +``` js +var lexer = new marked.Lexer(options); +var tokens = lexer.lex(text); +console.log(tokens); +console.log(lexer.rules); +``` + +``` bash +$ node +> require('marked').lexer('> i am using marked.') +[ { type: 'blockquote_start' }, + { type: 'paragraph', + text: 'i am using marked.' }, + { type: 'blockquote_end' }, + links: {} ] +``` \ No newline at end of file From f33b635bd4fa506f0ad40471b0f6f8c5a5119b1a Mon Sep 17 00:00:00 2001 From: Josh Bruce Date: Sun, 25 Feb 2018 16:20:20 -0500 Subject: [PATCH 10/44] Add AUTHORS page --- AUTHORS.md | 13 +++++++++++++ README.md | 18 +++++++++--------- 2 files changed, 22 insertions(+), 9 deletions(-) create mode 100644 AUTHORS.md diff --git a/AUTHORS.md b/AUTHORS.md new file mode 100644 index 0000000000..f98d639800 --- /dev/null +++ b/AUTHORS.md @@ -0,0 +1,13 @@ +## Original developer + +Christopher Jeffrey + +## Contribution credits + +The following is a non-exhaustive list of those who have contributed in major ways to the Marked open source project, particularly in bringing it back to life. In no particular order. + +- Tony Brix @UziTech +- Federico Soave @Feder1co5oave +- Костя Третяк @KostyaTretyak +- Steven @styfle +- Josh Bruce @joshbruce \ No newline at end of file diff --git a/README.md b/README.md index 95dfda31f3..4810b5d19b 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,3 @@ -# marked - -[![NPM version](https://badge.fury.io/js/marked.svg)] [![NPM dependencies](https://david-dm.org/markedjs/marked.svg)] - Marked is 1. built for speed.* @@ -9,9 +5,9 @@ Marked is 3. light-weight while implementing all markdown features from the supported flavors & specifications.*** 4. available as a command line interface (CLI) and running in client- or server-side JavaScript projects. -- * Still working on metrics for comparative analysis and definition. -- ** As few dependencies as possible. -- *** Strict compliance could result in slower processing when running comparative benchmarking. +* Still working on metrics for comparative analysis and definition. +** As few dependencies as possible. +*** Strict compliance could result in slower processing when running comparative benchmarking. -

    About

    +

    Marked

    Marked is From 2a31ba4d00f7eb5f2008244da18e0605d48f8874 Mon Sep 17 00:00:00 2001 From: Josh Bruce Date: Sun, 25 Feb 2018 18:17:01 -0500 Subject: [PATCH 19/44] Miinor update to AUTHORS --- AUTHORS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AUTHORS.md b/AUTHORS.md index f98d639800..8b664059f3 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -4,7 +4,7 @@ Christopher Jeffrey ## Contribution credits -The following is a non-exhaustive list of those who have contributed in major ways to the Marked open source project, particularly in bringing it back to life. In no particular order. +The following is a non-exhaustive list of those who have contributed in major ways to the Marked open source project, particularly in bringing it back to life (in no particular order): - Tony Brix @UziTech - Federico Soave @Feder1co5oave From 8744859f55a52ac476a66b8cec2705778c09ef00 Mon Sep 17 00:00:00 2001 From: Josh Bruce Date: Sun, 25 Feb 2018 18:17:55 -0500 Subject: [PATCH 20/44] Design principles --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d9344b6a8a..0b5254f77e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -9,7 +9,7 @@ ## Design principles -Marked tends to favor following the SOLID (mainly the [single responsibility](https://en.wikipedia.org/wiki/Single_responsibility_principle) and [open/closed principles](https://en.wikipedia.org/wiki/Open/closed_principle)) set of software design and development principles: +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): - **Single responsibility:** Marked, and the components of Marked, have the single responsibility of converting Markdown strings into HTML. - **Open/closed:** Marked favors giving developers the means to easily extend the library and its components over changing Marked's behavior through configuration options. From bcd22552fed715a622863f785b8d8d415f33cd8e Mon Sep 17 00:00:00 2001 From: Josh Bruce Date: Sun, 25 Feb 2018 18:19:28 -0500 Subject: [PATCH 21/44] Typo --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0b5254f77e..3862294007 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -84,4 +84,4 @@ npm run build ## Releasing -Create 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). +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). From a7f55db260b17a41285774b73e3b8c2733cdbe3e Mon Sep 17 00:00:00 2001 From: Josh Bruce Date: Sun, 25 Feb 2018 18:32:44 -0500 Subject: [PATCH 22/44] Add Chris's GitHub handle --- AUTHORS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AUTHORS.md b/AUTHORS.md index 8b664059f3..363a852738 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -1,6 +1,6 @@ ## Original developer -Christopher Jeffrey +Christopher Jeffrey @chjj ## Contribution credits From d7cf9e4fcdd6c9ed29874cd10e1454c4a066ef2b Mon Sep 17 00:00:00 2001 From: Josh Bruce Date: Sun, 25 Feb 2018 18:56:03 -0500 Subject: [PATCH 23/44] Update high-level release checklist --- RELEASE.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/RELEASE.md b/RELEASE.md index bfe920f4f3..89db478bab 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -1,8 +1,9 @@ # Releasing Marked - [ ] See [contributing](https://github.com/markedjs/marked/blob/master/CONTRIBUTING.md) -- [ ] Create release branch from `master` (`release-##.##.##`) -> Submit PR -- [ ] Complete PR checklist +- [ ] Create release branch from `master` (`release-x.y.z`) +- [ ] Submit PR with minimal name: Release x.y.z +- [ ] Complete PR checklists ## Overall strategy From 62848f030d24ad5be521865544bab997ee5eabf4 Mon Sep 17 00:00:00 2001 From: Josh Bruce Date: Sun, 25 Feb 2018 18:57:04 -0500 Subject: [PATCH 24/44] Complete separation between pre and post 1.0 --- RELEASE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RELEASE.md b/RELEASE.md index 89db478bab..82a45d4bd3 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -11,7 +11,7 @@ ## Versioning -We follow [semantic versioning](https://semver.org) where the following sequence is true `[major].[minor].[patch]` (further, while in beta, you may see this `0.[major|minor].[minor|patch]`); therefore, consider the following implications of the release you are preparing: +We follow [semantic versioning](https://semver.org) where the following sequence is true `[major].[minor].[patch]`; therefore, consider the following implications of the release you are preparing: 1. **Major:** There is at least one change not deemed backward compatible. 2. **Minor:** There is at least one new feature added to the release. From 1d7dd0286474a9532ffc56c0e220eb8c346ae79b Mon Sep 17 00:00:00 2001 From: Josh Bruce Date: Sun, 25 Feb 2018 19:11:59 -0500 Subject: [PATCH 25/44] Make Contributing text in README less pretentious sounding --- CONTRIBUTING.md | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 3862294007..f613e3c405 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -31,7 +31,7 @@ The following table lists the ticket type labels we use when there is work to be ## Test early, often, and everything -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, somethings you should regarding the test harness. +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. |Location |Description | |:-------------|:---------------------------------------------------| diff --git a/README.md b/README.md index bd84c1edef..4509d2eab6 100644 --- a/README.md +++ b/README.md @@ -77,7 +77,7 @@ By supporting the above Markdown flavors, it's possible that Marked can help you

    Contributing

    -The marked community enjoys a spirit of collaboration and contribution from all comers. Whether you're just getting started with Markdown, JavaScript, and Marked or you're a veteran with it all figured out, we're here to help you improve as a professionally while helping improve Marked technically. Please see our [contributing documentation](https://github.com/markedjs/marked/blob/master/CONTRIBUTING.md) for more details. +The marked community enjoys a spirit of collaboration and contribution from all comers. Whether you're just getting started with Markdown, JavaScript, and Marked or you're a veteran with it all figured out, we're here to help each other improve as professionals while helping Marked improve technically. Please see our [contributing documentation](https://github.com/markedjs/marked/blob/master/CONTRIBUTING.md) for more details. For our Contribution License Agreement, see our [license](https://github.com/markedjs/marked/blob/master/LICENSE.md). From 8a9e5fc93ad1f3f687c89cad3d19910e333a9300 Mon Sep 17 00:00:00 2001 From: Josh Bruce Date: Sun, 25 Feb 2018 20:28:21 -0500 Subject: [PATCH 26/44] Add security section to README --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 4509d2eab6..7ce619a503 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,7 @@
  • Installation
  • Usage
  • Supported Markdown specifications
  • +
  • Security
  • Contributing
  • Authors
  • License
  • @@ -74,6 +75,9 @@ We actively support the features of the following [Markdown flavors](https://git By supporting the above Markdown flavors, it's possible that Marked can help you use other flavors as well; however, these are not actively supported by the community. +

    Security

    + +The only completely secure system is the one that doesn't exist in the first place. Having said that, we take the security of Marked very seriously; however, none of us are necessarily security experts, so to speak. Therefore, if you find something, [say something](https://github.com/markedjs/marked/issues).

    Contributing

    From 35d3c5ddabcb916cc5a26e227af44b3a076b5e01 Mon Sep 17 00:00:00 2001 From: Josh Bruce Date: Sun, 25 Feb 2018 21:56:00 -0500 Subject: [PATCH 27/44] Typos and grammar --- CONTRIBUTING.md | 2 +- USAGE_EXTENSIBILITY.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f613e3c405..8f05cb4796 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -16,7 +16,7 @@ Marked tends to favor following the SOLID set of software design and development ## Priorities -We think we have our priorities straight for building quality in. +We think we have our priorities sorted to build quality in. 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. diff --git a/USAGE_EXTENSIBILITY.md b/USAGE_EXTENSIBILITY.md index 19afbd9d5e..20bd13ea92 100644 --- a/USAGE_EXTENSIBILITY.md +++ b/USAGE_EXTENSIBILITY.md @@ -8,7 +8,7 @@ To champion the single-reponsibility and open/closed prinicples, we have tried t
  • The parser
  • -

    The renderer

    +

    The renderer

    The renderer is... From 7605ac1ce77aa911abc175b55204a598c1e0ada4 Mon Sep 17 00:00:00 2001 From: Josh Bruce Date: Sun, 25 Feb 2018 21:58:23 -0500 Subject: [PATCH 28/44] Typos --- CONTRIBUTING.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8f05cb4796..1d9a3d5512 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -24,7 +24,7 @@ The following table lists the ticket type labels we use when there is work to be |:----------------------------------|:--------------------------------------------------------------------------------------------------------------------------------------| |L0 - security |A security vulnerability within the Marked library is discovered. | |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. | -|L2 - annoying |Similar to L1 - borken only there is a known workaround avaialable for the issue. | +|L2 - annoying |Similar to L1 - broken only there is a known workaround avaialable for the issue. | |RR - refactor and re-engineer |Results in an improvement to developers using Marked (improved readability) or end-users (faster performance) or both. | |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)| |NFU - new feature (user requested) |A capability Marked does not currently provide but has been requested by users of Marked. | @@ -56,7 +56,7 @@ The PR templates include checklists for both the submitter and the reviewer, whi ## Scripts -When it comes to NPM scripts, we try to use the native scripts provided by the NPM framework. +When it comes to NPM commands, we try to use the native scripts provided by the NPM framework. To run the tests: From e7a475c8e183b114eee348ccf1c4d2e5d8c6cbc4 Mon Sep 17 00:00:00 2001 From: Josh Bruce Date: Sun, 25 Feb 2018 22:04:16 -0500 Subject: [PATCH 29/44] Typo JS seems off for USAGE_ADVANCED asyn highlighting --- USAGE_ADVANCED.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/USAGE_ADVANCED.md b/USAGE_ADVANCED.md index 6943187722..eef4c2c1ba 100644 --- a/USAGE_ADVANCED.md +++ b/USAGE_ADVANCED.md @@ -57,9 +57,9 @@ console.log(myMarked('I am using __markdown__.')); Unlike `highlight.js` the `pygmatize.js` library uses asynchronous highlighting. This example demonstrates that marked is agnostic when it comes to the highlighter you use. ```js -myMarked.setOption({ +myMarked.setOptions({ highlight: function(code, lang, callback) { - require('pygmentize-bundled')({ lang: lang, format: 'html' }, code, function (err, result) { + require('pygmentize-bundled') ({ lang: lang, format: 'html' }, code, function (err, result) { callback(err, result.toString()); }); } From 1506fe9e028af70b094e9ec1b1aa0c916a088cfb Mon Sep 17 00:00:00 2001 From: Josh Bruce Date: Sun, 25 Feb 2018 22:06:18 -0500 Subject: [PATCH 30/44] Replace tabs with spaces --- USAGE_EXTENSIBILITY.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/USAGE_EXTENSIBILITY.md b/USAGE_EXTENSIBILITY.md index 20bd13ea92..6981500fd0 100644 --- a/USAGE_EXTENSIBILITY.md +++ b/USAGE_EXTENSIBILITY.md @@ -26,11 +26,11 @@ renderer.heading = function (text, level) { var escapedText = text.toLowerCase().replace(/[^\w]+/g, '-'); return ` - - - - ${text} - `; + + + + ${text} + `; }; // Run marked From a6320a46cac341c22ca5a946be6b9d7c5e1ea41c Mon Sep 17 00:00:00 2001 From: Josh Bruce Date: Mon, 26 Feb 2018 14:49:15 -0500 Subject: [PATCH 31/44] Add different membership types to the community --- AUTHORS.md | 37 +++++++++++++++++++++++++++++++------ 1 file changed, 31 insertions(+), 6 deletions(-) diff --git a/AUTHORS.md b/AUTHORS.md index 363a852738..22cfcc459b 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -1,13 +1,38 @@ -## Original developer +## Users -Christopher Jeffrey @chjj +Users are anyone using Marked in some fashion. If you use Marked and would like to be added to a list of users, please do so. + +## Contributors + +Contributors are users who submit a PR, Issue, or collaborates in making Marked a better product and experience for all the users. -## Contribution credits +To be listed here, just make a contribution and, if it has significant impact, the committers and publishers may be able to add you here. If you're name is here, and you would rather it not be, just let us know. + +- Jamie Davis @davisjam - Thank you for the DOS contribution! +- Костя Третяк @KostyaTretyak -The following is a non-exhaustive list of those who have contributed in major ways to the Marked open source project, particularly in bringing it back to life (in no particular order): +## Committers + +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 they're own). - Tony Brix @UziTech - Federico Soave @Feder1co5oave -- Костя Третяк @KostyaTretyak - Steven @styfle -- Josh Bruce @joshbruce \ No newline at end of file + +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). + +## Admins + +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 the project and begin contributing, with minimal friction.) + +## Publishers + +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. (Admins are focused primarily on the internal workings of the project, Publishers are focused on internal *and* external issues.) + +- Josh Bruce @joshbruce + +## Original author + +The original author is the publisher who started it all. + +Christopher Jeffrey @chjj From 9be81bf188c9f1db6396868fc1c6a610728b8b0a Mon Sep 17 00:00:00 2001 From: Josh Bruce Date: Mon, 26 Feb 2018 14:52:11 -0500 Subject: [PATCH 32/44] Update authors and security-related readme --- AUTHORS.md | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/AUTHORS.md b/AUTHORS.md index 22cfcc459b..79f54a0b23 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -8,7 +8,7 @@ Contributors are users who submit a PR, Issue, or collaborates in making Marked To be listed here, just make a contribution and, if it has significant impact, the committers and publishers may be able to add you here. If you're name is here, and you would rather it not be, just let us know. -- Jamie Davis @davisjam - Thank you for the DOS contribution! +- Jamie Davis @davisjam - Thank you for the security-related contributions! - Костя Третяк @KostyaTretyak ## Committers diff --git a/README.md b/README.md index 7ce619a503..73453c640f 100644 --- a/README.md +++ b/README.md @@ -77,7 +77,7 @@ By supporting the above Markdown flavors, it's possible that Marked can help you

    Security

    -The only completely secure system is the one that doesn't exist in the first place. Having said that, we take the security of Marked very seriously; however, none of us are necessarily security experts, so to speak. Therefore, if you find something, [say something](https://github.com/markedjs/marked/issues). +The only completely secure system is the one that doesn't exist in the first place. Having said that, we take the security of Marked very seriously; however, none of us are necessarily security experts, so to speak. Therefore, if you find something, [say something](https://github.com/markedjs/marked/issues), or, better yet, fix the thing! :)

    Contributing

    From dc4a03b4d1cca4abcb20514c3b5215656a63400e Mon Sep 17 00:00:00 2001 From: Josh Bruce Date: Mon, 26 Feb 2018 16:34:42 -0500 Subject: [PATCH 33/44] What we're good at --- AUTHORS.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AUTHORS.md b/AUTHORS.md index 79f54a0b23..66d1604014 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -15,8 +15,8 @@ To be listed here, just make a contribution and, if it has significant impact, t 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 they're own). -- Tony Brix @UziTech -- Federico Soave @Feder1co5oave +- Tony Brix @UziTech - really good at the test harness and environment setup +- Federico Soave @Feder1co5oave - really good at the regex things - Steven @styfle 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). From 2b6380e9aa1adaf5b80477d3a61fbf5f8e5d94a1 Mon Sep 17 00:00:00 2001 From: Josh Bruce Date: Mon, 26 Feb 2018 18:27:45 -0500 Subject: [PATCH 34/44] typo --- AUTHORS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AUTHORS.md b/AUTHORS.md index 66d1604014..90a452fd7a 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -13,7 +13,7 @@ To be listed here, just make a contribution and, if it has significant impact, t ## Committers -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 they're own). +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). - Tony Brix @UziTech - really good at the test harness and environment setup - Federico Soave @Feder1co5oave - really good at the regex things From 9dc67ffb503e46bcd880900481120bcb7dee9e0a Mon Sep 17 00:00:00 2001 From: Josh Bruce Date: Mon, 26 Feb 2018 18:29:11 -0500 Subject: [PATCH 35/44] Expound on publishers responsibilities --- AUTHORS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AUTHORS.md b/AUTHORS.md index 90a452fd7a..10c8440a45 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -27,7 +27,7 @@ Admins are committers who also have the responsibility, privilege, and burden of ## Publishers -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. (Admins are focused primarily on the internal workings of the project, Publishers are focused on internal *and* external issues.) +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. Also, when stuff goes pear-shaped, we're the ones who take the most heat. (Admins are focused primarily on the internal workings of the project, Publishers are focused on internal *and* external issues.) - Josh Bruce @joshbruce From 3eb947687abbd10f09e860147b9292dae5aa9cd1 Mon Sep 17 00:00:00 2001 From: Josh Bruce Date: Mon, 26 Feb 2018 18:33:29 -0500 Subject: [PATCH 36/44] Make sure running tests is part of contributing --- CONTRIBUTING.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1d9a3d5512..8e0f81282d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -5,6 +5,7 @@ - [ ] Make sure you are on the `master` branch. - [ ] Create a branch. - [ ] Make as small a change as possible. +- [ ] Run `npm run test`, fix any broken things (for linting, you can run `npm run lint` to have the linter fix them for you). - [ ] Submit a PR. ## Design principles From ec8e502b947da24723a543d3968fe9cdd14dfea9 Mon Sep 17 00:00:00 2001 From: Josh Bruce Date: Mon, 26 Feb 2018 18:36:03 -0500 Subject: [PATCH 37/44] Don't need run --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8e0f81282d..90e728cea9 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -5,7 +5,7 @@ - [ ] Make sure you are on the `master` branch. - [ ] Create a branch. - [ ] Make as small a change as possible. -- [ ] Run `npm run test`, fix any broken things (for linting, you can run `npm run lint` to have the linter fix them for you). +- [ ] Run `npm test`, fix any broken things (for linting, you can run `npm run lint` to have the linter fix them for you). - [ ] Submit a PR. ## Design principles From ca77253d10295f8f91c504d5cefe24d557eafcc0 Mon Sep 17 00:00:00 2001 From: Josh Bruce Date: Mon, 26 Feb 2018 18:37:26 -0500 Subject: [PATCH 38/44] Add test:lint and update lint --- CONTRIBUTING.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 90e728cea9..11c99ea4ab 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -65,13 +65,19 @@ To run the tests: npm test ``` +To test whether you are using the standard syntax rules for the project: + +```bash +npm run test:lint +``` + To see time comparisons between Marked and other popular Markdown libraries: ```bash npm run bench ``` -To check for proper syntax (lint): +To check for (and fix) standardized syntax (lint): ```bash npm run lint From 0debea97761acff5fed4be7b88d4ad295947b944 Mon Sep 17 00:00:00 2001 From: Josh Bruce Date: Mon, 26 Feb 2018 20:54:43 -0500 Subject: [PATCH 39/44] Update users definition --- AUTHORS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AUTHORS.md b/AUTHORS.md index 10c8440a45..da12fee2fb 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -1,6 +1,6 @@ ## Users -Users are anyone using Marked in some fashion. If you use Marked and would like to be added to a list of users, please do so. +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. ## Contributors From 7cfb50c15ea8bdfff28db335d5d143063f4ade26 Mon Sep 17 00:00:00 2001 From: Josh Bruce Date: Mon, 26 Feb 2018 20:56:48 -0500 Subject: [PATCH 40/44] grammar --- AUTHORS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AUTHORS.md b/AUTHORS.md index da12fee2fb..b959e1ce6f 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -4,7 +4,7 @@ Users are anyone using Marked in some fashion. If you use Marked and would like ## Contributors -Contributors are users who submit a PR, Issue, or collaborates in making Marked a better product and experience for all the users. +Contributors are users who submit a PR, Issue, or collaborate in making Marked a better product and experience for all the users. To be listed here, just make a contribution and, if it has significant impact, the committers and publishers may be able to add you here. If you're name is here, and you would rather it not be, just let us know. From 6d283d818f1dc66b86ce9a5373b67a361cb7fa02 Mon Sep 17 00:00:00 2001 From: Josh Bruce Date: Mon, 26 Feb 2018 22:03:12 -0500 Subject: [PATCH 41/44] Add npm install to setting up local checklist --- CONTRIBUTING.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 11c99ea4ab..83d2548ef6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -3,6 +3,7 @@ - [ ] Fork `markedjs/marked`. - [ ] Clone the library locally using GitHub Desktop or the command line. - [ ] Make sure you are on the `master` branch. +- [ ] Be sure to run `npm install` or `npm update`. - [ ] Create a branch. - [ ] Make as small a change as possible. - [ ] Run `npm test`, fix any broken things (for linting, you can run `npm run lint` to have the linter fix them for you). From d68f5a90df2eb785ebcce192d07d06f46cc06e8d Mon Sep 17 00:00:00 2001 From: Josh Bruce Date: Mon, 26 Feb 2018 22:24:30 -0500 Subject: [PATCH 42/44] Add intro and remove publishers metnion as all publishers are committers --- AUTHORS.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/AUTHORS.md b/AUTHORS.md index b959e1ce6f..475ca832ee 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -1,3 +1,7 @@ +# Authors + +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. + ## Users 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. @@ -6,7 +10,7 @@ Users are anyone using Marked in some fashion. If you use Marked and would like Contributors are users who submit a PR, Issue, or collaborate in making Marked a better product and experience for all the users. -To be listed here, just make a contribution and, if it has significant impact, the committers and publishers may be able to add you here. If you're name is here, and you would rather it not be, just let us know. +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. - Jamie Davis @davisjam - Thank you for the security-related contributions! - Костя Третяк @KostyaTretyak From 00d709c500945c29ccc8c8c396c3ae5a50358c2e Mon Sep 17 00:00:00 2001 From: Josh Bruce Date: Mon, 26 Feb 2018 22:27:22 -0500 Subject: [PATCH 43/44] Add links to Issues and PRs --- AUTHORS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AUTHORS.md b/AUTHORS.md index 475ca832ee..2e7b696c96 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -8,7 +8,7 @@ Users are anyone using Marked in some fashion. If you use Marked and would like ## Contributors -Contributors are users who submit a PR, Issue, or collaborate in making Marked a better product and experience for all the users. +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. 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. From 86c32a835693a9fc59cde6d0e1fbef0e20f538ee Mon Sep 17 00:00:00 2001 From: Josh Bruce Date: Tue, 27 Feb 2018 00:20:58 -0500 Subject: [PATCH 44/44] Changing the voice for publishers section and minor grammar in admins --- AUTHORS.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/AUTHORS.md b/AUTHORS.md index 2e7b696c96..297ea32f7b 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -27,11 +27,13 @@ Committers are usually selected from contributors who enter the discussions rega ## Admins -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 the project and begin contributing, with minimal friction.) +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.) ## Publishers -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. Also, when stuff goes pear-shaped, we're the ones who take the most heat. (Admins are focused primarily on the internal workings of the project, Publishers are focused on internal *and* external issues.) +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. + +(In other words, while admins are focused primarily on the internal workings of the project, Publishers are focused on internal *and* external concerns.) - Josh Bruce @joshbruce