pax_global_header 0000666 0000000 0000000 00000000064 13510017556 0014515 g ustar 00root root 0000000 0000000 52 comment=26ae990e231c6acee689d08f02118b58671452b0
marked-0.7.0/ 0000775 0000000 0000000 00000000000 13510017556 0012764 5 ustar 00root root 0000000 0000000 marked-0.7.0/.editorconfig 0000664 0000000 0000000 00000000420 13510017556 0015435 0 ustar 00root root 0000000 0000000 root = true
[*.{json,js}]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 2
[*.md, !test/*.md]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = tab
indent_size = 4 marked-0.7.0/.eslintignore 0000664 0000000 0000000 00000000011 13510017556 0015457 0 ustar 00root root 0000000 0000000 *.min.js
marked-0.7.0/.eslintrc.json 0000664 0000000 0000000 00000001175 13510017556 0015564 0 ustar 00root root 0000000 0000000 {
"extends": "standard",
"plugins": [
"standard"
],
"parserOptions": {
"ecmaVersion": 5,
"sourceType": "script"
},
"rules": {
"semi": ["error", "always"],
"indent": ["error", 2, {
"SwitchCase": 1,
"VariableDeclarator": { "var": 2 },
"outerIIFEBody": 0
}],
"operator-linebreak": ["error", "before", { "overrides": { "=": "after" } }],
"space-before-function-paren": ["error", "never"],
"no-cond-assign": "off",
"no-useless-escape": "off",
"one-var": "off",
"no-control-regex": "off"
},
"env": {
"node": true,
"browser": true,
"amd": true
}
}
marked-0.7.0/.gitattributes 0000664 0000000 0000000 00000000032 13510017556 0015652 0 ustar 00root root 0000000 0000000 test/* linguist-vendored
marked-0.7.0/.github/ 0000775 0000000 0000000 00000000000 13510017556 0014324 5 ustar 00root root 0000000 0000000 marked-0.7.0/.github/ISSUE_TEMPLATE.md 0000664 0000000 0000000 00000001756 13510017556 0017042 0 ustar 00root root 0000000 0000000 **Marked version:**
**Markdown flavor:** Markdown.pl|CommonMark|GitHub Flavored Markdown|n/a
## Expectation
**CommonMark Demo:** [demo](https://spec.commonmark.org/dingus/)
## Result
**Marked Demo:** [demo](https://marked.js.org/demo/)
## What was attempted
marked-0.7.0/.github/ISSUE_TEMPLATE/ 0000775 0000000 0000000 00000000000 13510017556 0016507 5 ustar 00root root 0000000 0000000 marked-0.7.0/.github/ISSUE_TEMPLATE/Bug_report.md 0000664 0000000 0000000 00000001550 13510017556 0021142 0 ustar 00root root 0000000 0000000 ---
name: Bug report
about: Marked says it does this thing but does not
---
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
**Expected behavior**
A clear and concise description of what you expected to happen.
marked-0.7.0/.github/ISSUE_TEMPLATE/Feature_request.md 0000664 0000000 0000000 00000000616 13510017556 0022177 0 ustar 00root root 0000000 0000000 ---
name: Feature request
about: Marked doesn't do this thing and I think it should
---
**Describe the feature**
A clear and concise description of what you would like.
**Why is this feature necessary?**
A clear and concise description of why.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
marked-0.7.0/.github/ISSUE_TEMPLATE/Proposal.md 0000664 0000000 0000000 00000000476 13510017556 0020637 0 ustar 00root root 0000000 0000000 ---
name: Proposal
about: Marked doesn't do this thing and I think it should
---
**What pain point are you perceiving?.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
marked-0.7.0/.github/PULL_REQUEST_TEMPLATE.md 0000664 0000000 0000000 00000002576 13510017556 0020137 0 ustar 00root root 0000000 0000000
**Marked version:**
**Markdown flavor:** Markdown.pl|CommonMark|GitHub Flavored Markdown|n/a
## Description
- Fixes #### (if fixing a known issue; otherwise, describe issue using the following format)
## Contributor
- [ ] Test(s) exist to ensure functionality and minimize regression (if no tests added, list tests covering this PR); or,
- [ ] no tests required for this PR.
- [ ] If submitting new feature, it has been documented in the appropriate places.
## Committer
In most cases, this should be a different person than the contributor.
- [ ] Draft GitHub release notes have been updated.
- [ ] CI is green (no forced merge required).
- [ ] Merge PR
marked-0.7.0/.github/PULL_REQUEST_TEMPLATE/ 0000775 0000000 0000000 00000000000 13510017556 0017603 5 ustar 00root root 0000000 0000000 marked-0.7.0/.github/PULL_REQUEST_TEMPLATE/badges.md 0000664 0000000 0000000 00000006423 13510017556 0021357 0 ustar 00root root 0000000 0000000 **@mention the contributor:**
## Recommendation to:
- [ ] Change user group
- [ ] Add a badge
- [ ] Remove a badge
## As the one mentioned, I would like to:
- [ ] accept the recommendation; or,
- [ ] graciously decline; or,
- [ ] dispute the recommendation
within 30 days, if you have not indicated which option you are taking one of the following will happen:
1. If adding a badge, we will assume you are graciously declining.
2. If removing a badge, we will assume you do not want to dispute the recommendation; therefore, the badge will be removed.
Note: All committers must approve via review before merging, the disapproving committer can simply close the PR. marked-0.7.0/.github/PULL_REQUEST_TEMPLATE/release.md 0000664 0000000 0000000 00000002172 13510017556 0021547 0 ustar 00root root 0000000 0000000 ## Publisher
- [ ] `$ npm version` has been run.
- [ ] Release notes in [draft GitHub release](https://github.com/markedjs/marked/releases) are up to date
- [ ] Release notes include which flavors and versions of Markdown are supported by this release
- [ ] Committer checklist is complete.
- [ ] Merge PR.
- [ ] Publish GitHub release using `master` with correct version number.
- [ ] `$ npm publish` has been run.
- [ ] Create draft GitHub release to prepare next release.
Note: If merges to `master` occur after submitting this PR and before running `$ npm pubish` you should be able to
1. pull from `upstream/master` (`git pull upstream master`) into the branch holding this version,
2. run `$ npm run build` to regenerate the `min` file, and
3. commit and push the updated changes.
## Committer
In most cases, this should be someone different than the publisher.
- [ ] Version in `package.json` has been updated (see [PUBLISHING.md](https://github.com/markedjs/marked/blob/master/docs/PUBLISHING.md)).
- [ ] The `marked.min.js` has been updated; or,
- [ ] release does not change library.
- [ ] CI is green (no forced merge required).
marked-0.7.0/.gitignore 0000664 0000000 0000000 00000000054 13510017556 0014753 0 ustar 00root root 0000000 0000000 .DS_Store
node_modules/
test/compiled_tests
marked-0.7.0/.travis.yml 0000664 0000000 0000000 00000002103 13510017556 0015071 0 ustar 00root root 0000000 0000000 language: node_js
jobs:
fast_finish: true
allow_failures:
- stage: security scan π
include:
- stage: unit tests π©π½βπ»
script: npm run test:unit
node_js: lts/*
- stage: spec tests π©π½βπ»
script: npm run test:specs
node_js: v4
- node_js: lts/*
- node_js: node
- stage: lint β¨
script: npm run test:lint
node_js: lts/*
- stage: minify ποΈ
script: |
npm run build
if ! git diff --quiet; then
git config --global user.email "travis@travis-ci.org"
git config --global user.name "Travis-CI"
git config credential.helper "store --file=.git/credentials"
echo "https://${GITHUB_TOKEN}:@github.com" > .git/credentials
git commit -am 'ποΈ minify [skip ci]'
git push origin HEAD:${TRAVIS_BRANCH}
fi
node_js: lts/*
if: branch = master AND type = push
- stage: security scan π
script: npm run test:redos
node_js: lts/*
cache:
directories:
- node_modules
git:
depth: 3
marked-0.7.0/LICENSE.md 0000664 0000000 0000000 00000005503 13510017556 0014373 0 ustar 00root root 0000000 0000000 # License information
## 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-2018, Christopher Jeffrey (https://github.com/chjj/)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
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.
marked-0.7.0/Makefile 0000664 0000000 0000000 00000000440 13510017556 0014422 0 ustar 00root root 0000000 0000000 all:
@cp lib/marked.js marked.js
@uglifyjs --comments '/\*[^\0]+?Copyright[^\0]+?\*/' -o marked.min.js lib/marked.js
clean:
@rm marked.js
@rm marked.min.js
bench:
@node test --bench
man/marked.1.txt:
groff -man -Tascii man/marked.1 | col -b > man/marked.1.txt
.PHONY: clean all
marked-0.7.0/README.md 0000664 0000000 0000000 00000005106 13510017556 0014245 0 ustar 00root root 0000000 0000000
# Marked
[](https://www.npmjs.com/package/marked)
[](https://cdn.jsdelivr.net/npm/marked/marked.min.js)
[](https://packagephobia.now.sh/result?p=marked)
[](https://www.npmjs.com/package/marked)
[](https://david-dm.org/markedjs/marked)
[](https://david-dm.org/markedjs/marked?type=dev)
[](https://travis-ci.org/markedjs/marked)
[](https://snyk.io/test/npm/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
- π works in a browser, on a server, or from a command line interface (CLI)
## Demo
Checkout the [demo page](https://marked.js.org/demo/) to see marked in action βΉοΈ
## Docs
Our [documentation pages](https://marked.js.org) are also rendered using marked π―
Also read about:
* [Options](https://marked.js.org/#/USING_ADVANCED.md)
* [Extensibility](https://marked.js.org/#/USING_PRO.md)
## Installation
**CLI:** `npm install -g marked`
**In-browser:** `npm install marked`
## Usage
### Warning: π¨ Marked does not [sanitize](https://marked.js.org/#/USING_ADVANCED.md#options) the output HTML. Please use a sanitize library, like [DOMPurify](https://github.com/cure53/DOMPurify) (recommended), [sanitize-html](https://github.com/apostrophecms/sanitize-html) or [insane](https://github.com/bevacqua/insane) on the output HTML! π¨
**CLI**
``` bash
$ marked -o hello.html
hello world
^D
$ cat hello.html
hello world
``` **Browser** ```html
![]() Christopher Jeffrey Original Author
Started the fire
|
![]() Josh Bruce Publisher
Release Wrangler; Humaning Helper; Heckler of Hypertext
|
![]() Steven Publisher
Release Wrangler; Dr. Docs; Open source, of course; GitHub Guru; Humaning Helper
|
![]() Jamie Davis Committer
Seeker of Security
|
![]() Tony Brix Publisher
Release Wrangler; Titan of the test harness; Dr. DevOps
|
![]() Brandon der BlΓ€tter Contributor
Curious Contributor
|
![]() Carlos Valle Contributor
Maker of the Marked mark from 2018 to present
|
![]() Federico Soave Contributor
Regent of the Regex; Master of Marked
|
![]() Karen Yavine Contributor
Snyk's Security Saint
|
![]() ΠΠΎΡΡΡ Π’ΡΠ΅ΡΡΠΊ Contributor
|
![]() Tom Theisen Contributor
Defibrillator
|
![]() Mateus Craveiro Contributor
Defibrillator
|
Someone who understands and contributes to improving the developer experience and flow of Marked into the world.
"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." ~ Wikipedia
Can you demonstrate you understand the following without Google and Stackoverflow?
/^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/
Because this author can't yet. That's who gets these.
* 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.
hello world
``` ``` bash $ marked -s "*hello world*"hello world
``` **Browser** ```html` block. Useful for syntax highlighting.|
|mangle |`boolean` |`true` |v0.3.4 |If true, autolinked email address is escaped with HTML character references.|
|pedantic |`boolean` |`false` |v0.2.1 |If true, conform to the original `markdown.pl` as much as possible. Don't fix original markdown bugs or behavior. Turns off and overrides `gfm`.|
|renderer |`object` |`new Renderer()`|v0.3.0|An object containing functions to render tokens to HTML. See [extensibility](USING_PRO.md) for more details.|
|sanitize |`boolean` |`false` |v0.2.1 |If true, sanitize the HTML passed into `markdownString` with the `sanitizer` function.
**Warning**: This feature is deprecated and it should NOT be used as it cannot be considered secure.
Instead use a sanitize library, like [DOMPurify](https://github.com/cure53/DOMPurify) (recommended), [sanitize-html](https://github.com/apostrophecms/sanitize-html) or [insane](https://github.com/bevacqua/insane) on the output HTML! |
|sanitizer |`function`|`null` |v0.3.4 |A function to sanitize the HTML passed into `markdownString`.|
|silent |`boolean` |`false` |v0.2.7 |If true, the parser does not throw any exception.|
|smartLists |`boolean` |`false` |v0.2.8 |If true, use smarter list behavior than those found in `markdown.pl`.|
|smartypants |`boolean` |`false` |v0.2.9 |If true, use "smart" typographic punctuation for things like quotes and dashes.|
|xhtml |`boolean` |`false` |v0.3.2 |If true, emit self-closing HTML tags for void elements (<br/>, <img/>, etc.) with a "/" as required by XHTML.|
Asynchronous highlighting
Unlike `highlight.js` the `pygmentize.js` library uses asynchronous highlighting. This example demonstrates that marked is agnostic when it comes to the highlighter you use.
```js
marked.setOptions({
highlight: function(code, lang, callback) {
require('pygmentize-bundled') ({ lang: lang, format: 'html' }, code, function (err, result) {
callback(err, result.toString());
});
}
});
console.log(marked(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.
Workers
To prevent ReDoS attacks you can run marked on a worker and terminate it when parsing takes longer than usual.
Marked can be run in a [worker thread](https://nodejs.org/api/worker_threads.html) on a node server, or a [web worker](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API) in a browser.
### Node Worker Thread
> π¨ Node Worker Threads are [experimental](https://nodejs.org/api/worker_threads.html#worker_threads_worker_threads) π¨
>
> This implementation may change.
```js
// markedWorker.js
const marked = require('marked');
const { parentPort } = require('worker_threads');
parentPort.on('message', (markdownString) => {
parentPort.postMessage(marked(markdownString));
});
```
```js
// index.js
const { Worker } = require('worker_threads');
const markedWorker = new Worker('./markedWorker.js');
const markedTimeout = setTimeout(() => {
markedWorker.terminate();
throw new Error('Marked took too long!');
}, timeoutLimit);
markedWorker.on('message', (html) => {
clearTimeout(markedTimeout);
console.log(html);
markedWorker.terminate();
});
markedWorker.postMessage(markdownString);
```
### Web Worker
> **NOTE**: Web Workers send the payload from `postMessage` in an object with the payload in a `.data` property
```js
// markedWorker.js
importScripts('path/to/marked.min.js');
onmessage = (e) => {
const markdownString = e.data
postMessage(marked(markdownString));
};
```
```js
// script.js
const markedWorker = new Worker('./markedWorker.js');
const markedTimeout = setTimeout(() => {
markedWorker.terminate();
throw new Error('Marked took too long!');
}, timeoutLimit);
markedWorker.onmessage = (e) => {
clearTimeout(markedTimeout);
const html = e.data;
console.log(html);
markedWorker.terminate();
};
markedWorker.postMessage(markdownString);
```
marked-0.7.0/docs/USING_PRO.md 0000664 0000000 0000000 00000007074 13510017556 0015653 0 ustar 00root root 0000000 0000000 ## Extending Marked
To champion the single-responsibility and open/closed prinicples, we have tried to make it relatively painless to extend marked. If you are looking to add custom functionality, this is the place to start.
The renderer
The renderer is...
**Example:** Overriding default heading token by adding an embedded anchor tag like on GitHub.
```js
// Create reference instance
var myMarked = require('marked');
// Get reference
var renderer = new myMarked.Renderer();
// Override function
renderer.heading = function (text, level) {
var escapedText = text.toLowerCase().replace(/[^\w]+/g, '-');
return `
${text}
`;
};
// Run marked
console.log(myMarked('# heading+', { renderer: renderer }));
```
**Output:**
```html
heading+
```
### Block level renderer methods
- code(*string* code, *string* infostring, *boolean* escaped)
- blockquote(*string* quote)
- html(*string* html)
- heading(*string* text, *number* level, *string* raw, *Slugger* slugger)
- hr()
- list(*string* body, *boolean* ordered, *number* start)
- listitem(*string* text, *boolean* task, *boolean* checked)
- checkbox(*boolean* checked)
- paragraph(*string* text)
- table(*string* header, *string* body)
- tablerow(*string* content)
- tablecell(*string* content, *object* flags)
`slugger` has the `slug` method to create an unique id from value:
```js
slugger.slug('foo') // foo
slugger.slug('foo') // foo-1
slugger.slug('foo') // foo-2
slugger.slug('foo 1') // foo-1-1
slugger.slug('foo-1') // foo-1-2
...
```
`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)
The lexer
The lexer is...
The parser
The parser is...
***
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);
```
``` bash
$ node
> require('marked').lexer('> i am using marked.')
[ { type: 'blockquote_start' },
{ type: 'paragraph',
text: 'i am using marked.' },
{ type: 'blockquote_end' },
links: {} ]
```
The Lexers build an array of tokens, which will be passed to their respective
Parsers. The Parsers process each token in the token arrays,
which are removed from the array of tokens:
``` js
const marked = require('marked');
const md = `
# heading
[link][1]
[1]: #heading "heading"
`;
const tokens = marked.lexer(md);
console.log(tokens);
const html = marked.parser(tokens);
console.log(html);
console.log(tokens);
```
``` bash
[ { type: 'heading', depth: 1, text: 'heading' },
{ type: 'paragraph', text: ' [link][1]' },
{ type: 'space' },
links: { '1': { href: '#heading', title: 'heading' } } ]
heading
[ links: { '1': { href: '#heading', title: 'heading' } } ]
```
marked-0.7.0/docs/broken.md 0000664 0000000 0000000 00000011565 13510017556 0015526 0 ustar 00root root 0000000 0000000 # Markdown is broken
I have a lot of scraps of markdown engine oddities that I've collected over the
years. What you see below is slightly messy, but it's what I've managed to
cobble together to illustrate the differences between markdown engines, and
why, if there ever is a markdown specification, it has to be absolutely
thorough. There are a lot more of these little differences I have documented
elsewhere. I know I will find them lingering on my disk one day, but until
then, I'll continue to add whatever strange nonsensical things I find.
Some of these examples may only mention a particular engine compared to marked.
However, the examples with markdown.pl could easily be swapped out for
discount, upskirt, or markdown.js, and you would very easily see even more
inconsistencies.
A lot of this was written when I was very unsatisfied with the inconsistencies
between markdown engines. Please excuse the frustration noticeable in my
writing.
## Examples of markdown's "stupid" list parsing
```
$ markdown.pl
* item1
* item2
text
^D
item1
- item2
text
```
```
$ marked
* item1
* item2
text
^D
item1
- item2
text
```
Which looks correct to you?
- - -
```
$ markdown.pl
* hello
> world
^D
- hello
world
```
```
$ marked
* hello
> world
^D
- hello
world
```
Again, which looks correct to you?
- - -
EXAMPLE:
```
$ markdown.pl
* hello
* world
* hi
code
^D
- hello
- world
- hi
code
```
The code isn't a code block even though it's after the bullet margin. I know,
lets give it two more spaces, effectively making it 8 spaces past the bullet.
```
$ markdown.pl
* hello
* world
* hi
code
^D
- hello
- world
- hi
code
```
And, it's still not a code block. Did you also notice that the 3rd item isn't
even its own list? Markdown screws that up too because of its indentation
unaware parsing.
- - -
Let's look at some more examples of markdown's list parsing:
```
$ markdown.pl
* item1
* item2
text
^D
item1
- item2
text
```
Misnested tags.
```
$ marked
* item1
* item2
text
^D
item1
- item2
text
```
Which looks correct to you?
- - -
```
$ markdown.pl
* hello
> world
^D
- hello
world
```
More misnested tags.
```
$ marked
* hello
> world
^D
- hello
world
```
Again, which looks correct to you?
- - -
# Why quality matters - Part 2
``` bash
$ markdown.pl
* hello
> world
^D
- hello
world
```
``` bash
$ sundown # upskirt
* hello
> world
^D
- hello
> world
```
``` bash
$ marked
* hello
> world
^D
- hello
world
```
Which looks correct to you?
- - -
See: https://github.com/evilstreak/markdown-js/issues/23
``` bash
$ markdown.pl # upskirt/markdown.js/discount
* hello
var a = 1;
* world
^D
- hello
var a = 1;
- world
```
``` bash
$ marked
* hello
var a = 1;
* world
^D
- hello
code>var a = 1;
<div>hello</div>
<span>hello</span>
``` ``` bash $ markedhello
``` - - - See: https://github.com/evilstreak/markdown-js/issues/27 ``` bash $ markdown.js [](/link) ^D ``` ``` bash $ marked [](/link) ^D ``` - - - See: https://github.com/evilstreak/markdown-js/issues/24 ``` bash $ markdown.js > a > b > c ^D``` ``` bash $ marked > a > b > c ^Da
bundefined> c
a
b
``` - - - ``` bash $ markdown.pl * hello * world how are you * today * hi ^Dc
hello
are you
hello
world how
are you
today
` tag and *won't* be shown
as preformatted text.
You can keep adding more and more paragraphs to a single
list item by adding the traditional blank line and then keep
on indenting the paragraphs with four spaces. You really need
to only indent the first line, but that looks ugly.
- Lists support blockquotes
> Just like this example here. By the way, you can
> nest lists inside blockquotes!
> - Fantastic!
- Lists support preformatted text
You just need to indent eight spaces.
Even More
=========
Horizontal Rule
---------------
If you need a horizontal rule you just need to put at least three hyphens, asterisks, or underscores on a line by themselves. You can also even put spaces between the characters.
---
****************************
_ _ _ _ _ _ _
Those three all produced horizontal lines. Keep in mind that three hyphens under any text turns that text into a heading, so add a blank like if you use hyphens.
Images
------
Images work exactly like links, but they have exclamation points in front. They work with references and titles too.
 and ![Happy].
[Happy]: http://www.wpclipart.com/smiley/simple_smiley/smiley_face_simple_green_small.png ("Smiley face")
Inline HTML
-----------
If markdown is too limiting, you can just insert your own crazy HTML. Span-level HTML can *still* use markdown. Block level elements must be separated from text by a blank line and must not have any spaces before the opening and closing HTML.