Skip to content

Commit

Permalink
Merge branch 'master' into defib-challenge
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh Bruce committed Apr 20, 2018
2 parents a3ff538 + 1000d92 commit 3049bde
Show file tree
Hide file tree
Showing 12 changed files with 311 additions and 12 deletions.
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ jobs:
- node_js: lts/*
- node_js: node

- stage: security scan 🔐
script: npm run test:redos
node_js: lts/*

- stage: lint ✨
script: npm run test:lint
node_js: lts/*
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@

# Marked

[![npm](https://img.shields.io/npm/v/marked.svg)](https://www.npmjs.com/package/marked)
[![gzip size](http://img.badgesize.io/https://cdn.jsdelivr.net/npm/marked@0.3.19/marked.min.js?compression=gzip)](https://cdn.jsdelivr.net/npm/marked@0.3.19/marked.min.js)
[![install size](https://packagephobia.now.sh/badge?p=marked@0.3.19)](https://packagephobia.now.sh/result?p=marked@0.3.19)
[![downloads](https://img.shields.io/npm/dt/marked.svg)](https://www.npmjs.com/package/marked)
[![travis](https://travis-ci.org/markedjs/marked.svg?branch=master)](https://travis-ci.org/markedjs/marked)

- ⚡ built for speed
- ⬇️ low-level compiler for parsing markdown without caching or blocking for long periods of time
- ⚖️ light-weight while implementing all markdown features from the supported flavors & specifications
Expand Down
10 changes: 7 additions & 3 deletions docs/AUTHORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ Marked takes an encompassing approach to its community. As such, you can think o

Users are anyone using Marked in some fashion, without them, there's no reason for us to exist.

|Individual or Organization |Website |Project |Submitted by |
|:-------------------------------------------|:--------------------------|:------------------------------------------------|:-----------------------------------------------------------|
|[OpenUserJS](https://github.com/OpenUserJS) |https://openuserjs.org |[OpenUserJS.org](https://github.com/OpenUserJS/OpenUserJS.org) | Marti Martz (@Martii) Co-Owner / Active Maintainer |

To be listed: please let us know or submit a PR.

To be removed: please let us know or submit a PR.
Expand Down Expand Up @@ -91,7 +95,7 @@ Christopher Jeffrey @chjj

<h2 id="badges">Badges</h2>

Badges? You don't *need* no stinkin' badges.
Badges? You don't *need* no stinkin' badges.

Movie references aside. (It was either that or, "Let's play a game", but that would have been creepy&hellip;that's why it will most likely come later.)

Expand All @@ -108,9 +112,9 @@ Badges? If you *want* 'em, we got 'em, and here's how you get 'em (and&hellip;dr
<dd>A contributor with less than one year on this page who is actively engaged in submitting PRs, Issues, making recommendations, sharing thoughts&hellip;without being too annoying about it (let's be clear, submitting 100 Issues recommending the Marked Committers send everyone candy is trying for the badge, not honestly earning it).</dd>
<dt>Dr. DevOps</dt>
<dd>
<p>Someone who understands and contributes to improving the developer experience and flow of Marked into the world.</p>
<p>Someone who understands and contributes to improving the developer experience and flow of Marked into the world.</p>
<blockquote>
"The main characteristic of the DevOps movement is to strongly advocate automation and monitoring at all steps of software construction, from integration, testing, releasing to deployment and infrastructure management. DevOps aims at shorter development cycles, increased deployment frequency, more dependable releases, in close alignment with business objectives." ~ <a href="https://en.wikipedia.org/wiki/DevOps">Wikipedia</a>
"The main characteristic of the DevOps movement is to strongly advocate automation and monitoring at all steps of software construction, from integration, testing, releasing to deployment and infrastructure management. DevOps aims at shorter development cycles, increased deployment frequency, more dependable releases, in close alignment with business objectives." ~ <a href="https://www.wikipedia.org/wiki/DevOps">Wikipedia</a>
</blockquote>
</dd>
<dt>Eye for the CLI</dt>
Expand Down
19 changes: 15 additions & 4 deletions lib/marked.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ var block = {
code: /^( {4}[^\n]+\n*)+/,
fences: noop,
hr: /^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,
heading: /^ *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/,
heading: /^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,
nptable: noop,
blockquote: /^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,
list: /^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,
Expand Down Expand Up @@ -554,7 +554,7 @@ inline.normal = merge({}, inline);
inline.pedantic = merge({}, inline.normal, {
strong: /^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,
em: /^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/,
link: edit(/^!?\[(label)\]\(\s*<?([\s\S]*?)>?(?:\s+(['"][\s\S]*?['"]))?\s*\)/)
link: edit(/^!?\[(label)\]\((.*?)\)/)
.replace('label', inline._label)
.getRegex(),
reflink: edit(/^!?\[(label)\]\s*\[([^\]]*)\]/)
Expand Down Expand Up @@ -703,8 +703,19 @@ InlineLexer.prototype.output = function(src) {
src = src.substring(cap[0].length);
this.inLink = true;
href = cap[2];
href = href[0] === '<' ? href.substring(1, href.length - 1) : href;
title = cap[3] ? cap[3].substring(1, cap[3].length - 1) : cap[3];
if (this.options.pedantic) {
link = /^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(href);

if (link) {
href = link[1];
title = link[3];
} else {
title = '';
}
} else {
title = cap[3] ? cap[3].slice(1, -1) : '';
}
href = href.trim().replace(/^<([\s\S]*)>$/, '$1');
out += this.outputLink(cap, {
href: InlineLexer.escapes(href),
title: InlineLexer.escapes(title)
Expand Down
2 changes: 1 addition & 1 deletion marked.min.js

Large diffs are not rendered by default.

Loading

0 comments on commit 3049bde

Please sign in to comment.