mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
remove unused components
This commit is contained in:
parent
4cbdc2a0aa
commit
5838163be6
25 changed files with 0 additions and 2802 deletions
|
@ -1,45 +0,0 @@
|
|||
{
|
||||
"name": "marked-element",
|
||||
"version": "1.1.3",
|
||||
"description": "Element wrapper for the marked library",
|
||||
"private": true,
|
||||
"authors": [
|
||||
"The Polymer Project Authors (https://polymer.github.io/AUTHORS.txt)"
|
||||
],
|
||||
"keywords": [
|
||||
"web-components",
|
||||
"polymer",
|
||||
"marked",
|
||||
"markdown",
|
||||
"container",
|
||||
"wrapper"
|
||||
],
|
||||
"dependencies": {
|
||||
"marked": "~0.3.3",
|
||||
"polymer": "Polymer/polymer#^1.1.0"
|
||||
},
|
||||
"license": "https://polymer.github.io/LICENSE.txt",
|
||||
"main": "marked-element.html",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/PolymerElements/marked-element.git"
|
||||
},
|
||||
"devDependencies": {
|
||||
"paper-styles": "PolymerElements/paper-styles#^1.0.4",
|
||||
"iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
|
||||
"test-fixture": "polymerelements/test-fixture#^1.0.0",
|
||||
"web-component-tester": "^4.0.0",
|
||||
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
||||
},
|
||||
"ignore": [],
|
||||
"homepage": "https://github.com/polymerelements/marked-element",
|
||||
"_release": "1.1.3",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v1.1.3",
|
||||
"commit": "19b30d7151b2420cf84387b6711d9042cbb29c26"
|
||||
},
|
||||
"_source": "git://github.com/polymerelements/marked-element.git",
|
||||
"_target": "^1.0.0",
|
||||
"_originalSource": "polymerelements/marked-element"
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
bower_components/
|
|
@ -1,25 +0,0 @@
|
|||
language: node_js
|
||||
sudo: false
|
||||
node_js: stable
|
||||
addons:
|
||||
firefox: latest
|
||||
sauce_connect: true
|
||||
apt:
|
||||
sources:
|
||||
- google-chrome
|
||||
- ubuntu-toolchain-r-test
|
||||
packages:
|
||||
- google-chrome-stable
|
||||
- g++-4.8
|
||||
before_script:
|
||||
- npm install -g bower polylint web-component-tester
|
||||
- bower install
|
||||
- polylint
|
||||
script:
|
||||
- xvfb-run wct
|
||||
- "if [ \"${TRAVIS_PULL_REQUEST}\" = \"false\" ]; then wct -s 'default'; fi"
|
||||
env:
|
||||
global:
|
||||
- CXX=g++-4.8
|
||||
- secure: DUM7LFRJH7Ji78bVRep6D3rJ+RH8F1Y15gSaCZ5SvlJ8lMuTYmpCVZ876LHVHdOv28d5dyPDn3U3slvssDO5UldTzZDNALX6/mOncY6QxRIbz+0E6Fm5Vn3PUXkBop/k/ELgCwmSDBfXGeKeRIu7nc/nDBldiMiwrHtyXTeuE+c=
|
||||
- secure: DqAN8qB45TWPfGVtrttAUV3fOu97j3qOnAUj+QxawlqBySqj3fcAD49HZFgQuBNMi0gxGYqrAAYj6AAyqIxH+K8P3PHPRfVegyRfYA4dcohnG9zYKmV5M+SaZEYpFp1FBXl3aKGbk0qiBmMsHWM2trkdRNNVAUl09Ywozapdpq8=
|
|
@ -1,72 +0,0 @@
|
|||
|
||||
<!--
|
||||
This file is autogenerated based on
|
||||
https://github.com/PolymerElements/ContributionGuide/blob/master/CONTRIBUTING.md
|
||||
|
||||
If you edit that file, it will get updated everywhere else.
|
||||
If you edit this file, your changes will get overridden :)
|
||||
-->
|
||||
# Polymer Elements
|
||||
## Guide for Contributors
|
||||
|
||||
Polymer Elements are built in the open, and the Polymer authors eagerly encourage any and all forms of community contribution. When contributing, please follow these guidelines:
|
||||
|
||||
### Filing Issues
|
||||
|
||||
**If you are filing an issue to request a feature**, please provide a clear description of the feature. It can be helpful to describe answers to the following questions:
|
||||
|
||||
1. **Who will use the feature?** _“As someone filling out a form…”_
|
||||
2. **When will they use the feature?** _“When I enter an invalid value…”_
|
||||
3. **What is the user’s goal?** _“I want to be visually notified that the value needs to be corrected…”_
|
||||
|
||||
**If you are filing an issue to report a bug**, please provide:
|
||||
|
||||
1. **A clear description of the bug and related expectations.** Consider using the following example template for reporting a bug:
|
||||
|
||||
```markdown
|
||||
The `paper-foo` element causes the page to turn pink when clicked.
|
||||
|
||||
## Expected outcome
|
||||
|
||||
The page stays the same color.
|
||||
|
||||
## Actual outcome
|
||||
|
||||
The page turns pink.
|
||||
|
||||
## Steps to reproduce
|
||||
|
||||
1. Put a `paper-foo` element in the page.
|
||||
2. Open the page in a web browser.
|
||||
3. Click the `paper-foo` element.
|
||||
```
|
||||
|
||||
2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [http://jsbin.com/cagaye](http://jsbin.com/cagaye/edit?html,output).
|
||||
|
||||
3. **A list of browsers where the problem occurs.** This can be skipped if the problem is the same across all browsers.
|
||||
|
||||
### Submitting Pull Requests
|
||||
|
||||
**Before creating a pull request**, please ensure that an issue exists for the corresponding change in the pull request that you intend to make. **If an issue does not exist, please create one per the guidelines above**. The goal is to discuss the design and necessity of the proposed change with Polymer authors and community before diving into a pull request.
|
||||
|
||||
When submitting pull requests, please provide:
|
||||
|
||||
1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues in the pull request description using the following syntax:
|
||||
|
||||
```markdown
|
||||
(For a single issue)
|
||||
Fixes #20
|
||||
|
||||
(For multiple issues)
|
||||
Fixes #32, fixes #40
|
||||
```
|
||||
|
||||
2. **A succinct description of the design** used to fix any related issues. For example:
|
||||
|
||||
```markdown
|
||||
This fixes #20 by removing styles that leaked which would cause the page to turn pink whenever `paper-foo` is clicked.
|
||||
```
|
||||
|
||||
3. **At least one test for each bug fixed or feature added** as part of the pull request. Pull requests that fix bugs or add features without accompanying tests will not be considered.
|
||||
|
||||
If a proposed change contains multiple commits, please [squash commits](https://www.google.com/url?q=http://blog.steveklabnik.com/posts/2012-11-08-how-to-squash-commits-in-a-github-pull-request) to as few as is necessary to succinctly express the change. A Polymer author can help you squash commits, so don’t be afraid to ask us if you need help with that!
|
|
@ -1,35 +0,0 @@
|
|||
{
|
||||
"name": "marked-element",
|
||||
"version": "1.1.3",
|
||||
"description": "Element wrapper for the marked library",
|
||||
"private": true,
|
||||
"authors": [
|
||||
"The Polymer Project Authors (https://polymer.github.io/AUTHORS.txt)"
|
||||
],
|
||||
"keywords": [
|
||||
"web-components",
|
||||
"polymer",
|
||||
"marked",
|
||||
"markdown",
|
||||
"container",
|
||||
"wrapper"
|
||||
],
|
||||
"dependencies": {
|
||||
"marked": "~0.3.3",
|
||||
"polymer": "Polymer/polymer#^1.1.0"
|
||||
},
|
||||
"license": "https://polymer.github.io/LICENSE.txt",
|
||||
"main": "marked-element.html",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/PolymerElements/marked-element.git"
|
||||
},
|
||||
"devDependencies": {
|
||||
"paper-styles": "PolymerElements/paper-styles#^1.0.4",
|
||||
"iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
|
||||
"test-fixture": "polymerelements/test-fixture#^1.0.0",
|
||||
"web-component-tester": "^4.0.0",
|
||||
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
||||
},
|
||||
"ignore": []
|
||||
}
|
|
@ -1,89 +0,0 @@
|
|||
<!doctype html>
|
||||
<!--
|
||||
@license
|
||||
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
||||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
||||
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
||||
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
||||
Code distributed by Google as part of the polymer project is also
|
||||
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>marked-element demo</title>
|
||||
|
||||
<script src="../../webcomponentsjs/webcomponents-lite.js"></script>
|
||||
|
||||
<link rel="import" href="../../paper-styles/demo-pages.html">
|
||||
<link rel="import" href="../marked-element.html">
|
||||
|
||||
<style is="custom-style">
|
||||
|
||||
.centered {
|
||||
max-width: 550px;
|
||||
padding: 0;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
h1 {
|
||||
margin-left: 30px;
|
||||
}
|
||||
|
||||
h3 {
|
||||
color: var(--google-grey-700);
|
||||
margin-left: 30px;
|
||||
}
|
||||
|
||||
marked-element {
|
||||
display: block;
|
||||
background-color: var(--google-grey-100);
|
||||
padding: 10px 30px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.markdown-html.custom p {
|
||||
padding-left: 24px;
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body unresolved>
|
||||
|
||||
<div class="vertical-section vertical-section-container centered">
|
||||
<h1><marked-element></h1>
|
||||
|
||||
<section>
|
||||
<h3>Inline Text</h3>
|
||||
<marked-element>
|
||||
<div class="markdown-html"></div>
|
||||
<script type="text/markdown">
|
||||
## Markdown Renderer
|
||||
|
||||
Example:
|
||||
|
||||
```html
|
||||
<paper-toolbar>
|
||||
<paper-icon-button icon="menu"></paper-icon-button>
|
||||
<div class="title">Title</div>
|
||||
<paper-icon-button icon="more"></paper-icon-button>
|
||||
</paper-toolbar>
|
||||
```
|
||||
|
||||
_Nifty_ features.
|
||||
</script>
|
||||
</marked-element>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h3>Text via Attribute, with custom styling</h3>
|
||||
<marked-element markdown="***Bold and italic***">
|
||||
<div class="markdown-html custom"></div>
|
||||
</marked-element>
|
||||
</section>
|
||||
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,27 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 17.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 225 126" enable-background="new 0 0 225 126" xml:space="preserve">
|
||||
<g id="background" display="none">
|
||||
<rect display="inline" fill="#B0BEC5" width="225" height="126"/>
|
||||
</g>
|
||||
<g id="label">
|
||||
</g>
|
||||
<g id="art">
|
||||
<circle cx="109" cy="33" r="4"/>
|
||||
<polygon points="100,92.7 94,84.7 88,92.7 81.2,83.6 82.8,82.4 88,89.3 94,81.3 100,89.3 106.1,81.3 112.9,90.4 111.3,91.6
|
||||
106.1,84.7 "/>
|
||||
<circle cx="140" cy="91" r="4"/>
|
||||
<g>
|
||||
<path d="M80.6,57.8l-8.2-2.1l1.3-4.1l8,3.4L81,45.7h4.2l-0.7,9.4l7.9-3.3l1.3,4.2l-8.4,2l5.6,7.1l-3.4,2.6l-4.6-8l-4.5,7.8
|
||||
L74.9,65L80.6,57.8z"/>
|
||||
<path d="M138.4,63.2h-5.6l-1.8,9h-3.4l1.8-9h-5.2V60h5.8l1.5-7.4H126v-3.2h6.2l1.8-9.1h3.4l-1.8,9.1h5.6l1.8-9.1h3.4l-1.8,9.1h4.4
|
||||
v3.2h-5l-1.5,7.4h4.8v3.2h-5.4l-1.8,9h-3.4L138.4,63.2z M133.5,60h5.6l1.5-7.4H135L133.5,60z"/>
|
||||
</g>
|
||||
<g id="ic_x5F_add_x0D_">
|
||||
</g>
|
||||
</g>
|
||||
<g id="Guides">
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 1.2 KiB |
|
@ -1,26 +0,0 @@
|
|||
<!doctype html>
|
||||
<!--
|
||||
@license
|
||||
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
||||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
||||
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
||||
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
||||
Code distributed by Google as part of the polymer project is also
|
||||
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<script src="../webcomponentsjs/webcomponents-lite.js"></script>
|
||||
<link rel="import" href="../iron-component-page/iron-component-page.html">
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<iron-component-page></iron-component-page>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,228 +0,0 @@
|
|||
<!--
|
||||
@license
|
||||
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
||||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
||||
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
||||
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
||||
Code distributed by Google as part of the polymer project is also
|
||||
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||
-->
|
||||
<link rel="import" href="../polymer/polymer.html">
|
||||
<link rel="import" href="marked-import.html">
|
||||
|
||||
<!--
|
||||
Element wrapper for the [marked](https://github.com/chjj/marked) library.
|
||||
|
||||
`<marked-element>` accepts Markdown source, and renders it to a child
|
||||
element with the class `markdown-html`. This child element can be styled
|
||||
as you would a normal DOM element. If you do not provide a child element
|
||||
with the `markdown-html` class, the Markdown source will still be rendered,
|
||||
but to a shadow DOM child that cannot be styled.
|
||||
|
||||
The Markdown source can be specified either via the `markdown` attribute:
|
||||
|
||||
<marked-element markdown="`Markdown` is _awesome_!">
|
||||
<div class="markdown-html"></div>
|
||||
</marked-element>
|
||||
|
||||
Or, you can provide it via a `<script type="text/markdown">` element child:
|
||||
|
||||
<marked-element>
|
||||
<div class="markdown-html"></div>
|
||||
<script type="text/markdown">
|
||||
Check out my markdown!
|
||||
|
||||
We can even embed elements without fear of the HTML parser mucking up their
|
||||
textual representation:
|
||||
|
||||
```html
|
||||
<awesome-sauce>
|
||||
<div>Oops, I'm about to forget to close this div.
|
||||
</awesome-sauce>
|
||||
```
|
||||
</script>
|
||||
</marked-element>
|
||||
|
||||
Note that the `<script type="text/markdown">` approach is _static_. Changes to
|
||||
the script content will _not_ update the rendered markdown!
|
||||
|
||||
### Styling
|
||||
If you are using a child with the `markdown-html` class, you can style it
|
||||
as you would a regular DOM element:
|
||||
|
||||
.markdown-html p {
|
||||
color: red;
|
||||
}
|
||||
|
||||
.markdown-html td:first-child {
|
||||
padding-left: 24px;
|
||||
}
|
||||
|
||||
@element marked-element
|
||||
@group Molecules
|
||||
@hero hero.svg
|
||||
@demo demo/index.html
|
||||
-->
|
||||
<dom-module id="marked-element">
|
||||
<template>
|
||||
<style>
|
||||
/* Thanks IE 10. */
|
||||
.hidden {
|
||||
display: none !important;
|
||||
}
|
||||
</style>
|
||||
<content select=".markdown-html"></content>
|
||||
<div id="content" class="hidden"></div>
|
||||
</template>
|
||||
|
||||
</dom-module>
|
||||
|
||||
<script>
|
||||
|
||||
'use strict';
|
||||
|
||||
Polymer({
|
||||
|
||||
is: 'marked-element',
|
||||
|
||||
properties: {
|
||||
|
||||
/**
|
||||
* The markdown source that should be rendered by this element.
|
||||
*/
|
||||
markdown: {
|
||||
observer: 'render',
|
||||
type: String,
|
||||
value: null
|
||||
},
|
||||
/**
|
||||
* Conform to obscure parts of markdown.pl as much as possible. Don't fix any of the original markdown bugs or poor behavior.
|
||||
*/
|
||||
pedantic: {
|
||||
observer: 'render',
|
||||
type: Boolean,
|
||||
value: false
|
||||
},
|
||||
/**
|
||||
* Sanitize the output. Ignore any HTML that has been input.
|
||||
*/
|
||||
sanitize: {
|
||||
observer: 'render',
|
||||
type: Boolean,
|
||||
value: false
|
||||
},
|
||||
/**
|
||||
* Use "smart" typographic punctuation for things like quotes and dashes.
|
||||
*/
|
||||
smartypants: {
|
||||
observer: 'render',
|
||||
type: Boolean,
|
||||
value: false
|
||||
}
|
||||
},
|
||||
|
||||
ready: function() {
|
||||
if (!this.markdown) {
|
||||
// Use the Markdown from the first `<script>` descendant whose MIME type starts with
|
||||
// "text/markdown". Script elements beyond the first are ignored.
|
||||
var markdownElement = Polymer.dom(this).querySelector('[type^="text/markdown"]');
|
||||
if (markdownElement != null) {
|
||||
this.markdown = this._unindent(markdownElement.textContent);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Renders `markdown` to HTML when the element is attached.
|
||||
*
|
||||
* This serves a dual purpose:
|
||||
*
|
||||
* * Prevents unnecessary work (no need to render when not visible).
|
||||
*
|
||||
* * `attached` fires top-down, so we can give ancestors a chance to
|
||||
* register listeners for the `syntax-highlight` event _before_ we render
|
||||
* any markdown.
|
||||
*
|
||||
*/
|
||||
attached: function() {
|
||||
this._attached = true;
|
||||
this._outputElement = this.outputElement;
|
||||
this.render();
|
||||
},
|
||||
|
||||
detached: function() {
|
||||
this._attached = false;
|
||||
},
|
||||
|
||||
/**
|
||||
* Unindents the markdown source that will be rendered.
|
||||
*/
|
||||
unindent: function(text) {
|
||||
return this._unindent(text);
|
||||
},
|
||||
|
||||
get outputElement () {
|
||||
var child = Polymer.dom(this).queryDistributedElements('.markdown-html')[0];
|
||||
|
||||
if (child)
|
||||
return child;
|
||||
|
||||
this.toggleClass('hidden', false, this.$.content);
|
||||
return this.$.content;
|
||||
},
|
||||
|
||||
/**
|
||||
* The `marked-render-complete` event is fired once Markdown to HTML
|
||||
* conversion has finished, and the DOM has been populated via the resulting
|
||||
* HTML.
|
||||
*
|
||||
* @event marked-render-complete
|
||||
*/
|
||||
|
||||
/**
|
||||
* Renders `markdown` into this element's DOM.
|
||||
*
|
||||
* This is automatically called whenever the `markdown` property is changed.
|
||||
*
|
||||
* The only case where you should be calling this is if you are providing
|
||||
* markdown via `<script type="text/markdown">` after this element has been
|
||||
* constructed (or updating that markdown).
|
||||
*/
|
||||
render: function() {
|
||||
if (!this._attached) return;
|
||||
if (!this.markdown) {
|
||||
Polymer.dom(this._outputElement).innerHTML = '';
|
||||
return;
|
||||
}
|
||||
var opts = {
|
||||
highlight: this._highlight.bind(this),
|
||||
sanitize: this.sanitize,
|
||||
pedantic: this.pedantic,
|
||||
smartypants: this.smartypants
|
||||
};
|
||||
Polymer.dom(this._outputElement).innerHTML = marked(this.markdown, opts);
|
||||
this.fire('marked-render-complete');
|
||||
},
|
||||
|
||||
_highlight: function(code, lang) {
|
||||
var event = this.fire('syntax-highlight', {code: code, lang: lang});
|
||||
return event.detail.code || code;
|
||||
},
|
||||
|
||||
_unindent: function(text) {
|
||||
if (!text) return text;
|
||||
var lines = text.replace(/\t/g, ' ').split('\n');
|
||||
var indent = lines.reduce(function(prev, line) {
|
||||
if (/^\s*$/.test(line)) return prev; // Completely ignore blank lines.
|
||||
|
||||
var lineIndent = line.match(/^(\s*)/)[0].length;
|
||||
if (prev === null) return lineIndent;
|
||||
return lineIndent < prev ? lineIndent : prev;
|
||||
}, null);
|
||||
|
||||
return lines.map(function(l) { return l.substr(indent); }).join('\n');
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
</script>
|
|
@ -1,10 +0,0 @@
|
|||
<!--
|
||||
@license
|
||||
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
||||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
||||
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
||||
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
||||
Code distributed by Google as part of the polymer project is also
|
||||
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||
-->
|
||||
<script src='../marked/lib/marked.js'></script>
|
|
@ -1,24 +0,0 @@
|
|||
<!DOCTYPE html><!--
|
||||
@license
|
||||
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
||||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
||||
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
||||
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
||||
Code distributed by Google as part of the polymer project is also
|
||||
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||
--><html><head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
|
||||
<title>Tests</title>
|
||||
<script src="../../web-component-tester/browser.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
WCT.loadSuites([
|
||||
'marked-element.html',
|
||||
'marked-element.html?dom=shadow'
|
||||
]);
|
||||
</script>
|
||||
|
||||
|
||||
</body></html>
|
|
@ -1,265 +0,0 @@
|
|||
<!doctype html>
|
||||
<!--
|
||||
@license
|
||||
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
||||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
||||
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
||||
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
||||
Code distributed by Google as part of the polymer project is also
|
||||
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>marked-element basic tests</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
|
||||
|
||||
<script src="../../webcomponentsjs/webcomponents-lite.js"></script>
|
||||
<script src="../../web-component-tester/browser.js"></script>
|
||||
<script src="../../test-fixture/test-fixture-mocha.js"></script>
|
||||
|
||||
<link rel="import" href="../../test-fixture/test-fixture.html">
|
||||
<link rel="import" href="../../polymer/polymer.html">
|
||||
<link rel="import" href="../marked-element.html">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<test-fixture id="SmartyPants">
|
||||
<template>
|
||||
<marked-element smartypants>
|
||||
<div id="output" class="markdown-html"></div>
|
||||
<script type="text/markdown">
|
||||
# foo
|
||||
...
|
||||
</script>
|
||||
</marked-element>
|
||||
</template>
|
||||
</test-fixture>
|
||||
|
||||
<test-fixture id="CamelCaseHTML">
|
||||
<template>
|
||||
<marked-element>
|
||||
<div id="output" class="markdown-html"></div>
|
||||
<script type="text/markdown">
|
||||
```html
|
||||
<div camelCase></div>
|
||||
```
|
||||
</script>
|
||||
</marked-element>
|
||||
</template>
|
||||
</test-fixture>
|
||||
|
||||
<test-fixture id="BadHTML">
|
||||
<template>
|
||||
<marked-element>
|
||||
<div id="output" class="markdown-html"></div>
|
||||
<script type="text/markdown">
|
||||
```html
|
||||
<p><div></p></div>
|
||||
```
|
||||
</script>
|
||||
</marked-element>
|
||||
</template>
|
||||
</test-fixture>
|
||||
|
||||
<test-fixture id="CamelCaseHTMLWithoutChild">
|
||||
<template>
|
||||
<marked-element>
|
||||
<script type="text/markdown">
|
||||
```html
|
||||
<div camelCase></div>
|
||||
```
|
||||
</script>
|
||||
</marked-element>
|
||||
</template>
|
||||
</test-fixture>
|
||||
|
||||
<test-fixture id="BadHTMLWithoutChild">
|
||||
<template>
|
||||
<marked-element>
|
||||
<script type="text/markdown">
|
||||
```html
|
||||
<p><div></p></div>
|
||||
```
|
||||
</script>
|
||||
</marked-element>
|
||||
</template>
|
||||
</test-fixture>
|
||||
|
||||
<script>
|
||||
'use strict';
|
||||
|
||||
// Thanks IE10.
|
||||
function isHidden(element) {
|
||||
var rect = element.getBoundingClientRect();
|
||||
return (rect.width == 0 && rect.height == 0);
|
||||
}
|
||||
|
||||
// Replace reserved HTML characters with their character entity equivalents to match the
|
||||
// transform done by Markdown.
|
||||
//
|
||||
// The Marked library itself is not used because it wraps code blocks in `<code><pre>`, which is
|
||||
// superfluous for testing purposes.
|
||||
function escapeHTML(string) {
|
||||
var span = document.createElement('span');
|
||||
span.textContent = string;
|
||||
return span.innerHTML;
|
||||
}
|
||||
|
||||
suite('<marked-element> has some options of marked available', function( ){
|
||||
var markedElement;
|
||||
var outputElement;
|
||||
setup(function() {
|
||||
markedElement = fixture('SmartyPants');
|
||||
outputElement = document.getElementById('output');
|
||||
});
|
||||
test('has sanitize', function() {
|
||||
expect(markedElement.sanitize).to.equal(false);
|
||||
});
|
||||
test('has pedantic', function() {
|
||||
expect(markedElement.sanitize).to.equal(false);
|
||||
});
|
||||
test('has smartypants', function() {
|
||||
expect(markedElement.sanitize).to.equal(false);
|
||||
console.log(outputElement.innerHTML)
|
||||
});
|
||||
});
|
||||
|
||||
suite('<marked-element> with .markdown-html child', function() {
|
||||
|
||||
suite('respects camelCased HTML', function() {
|
||||
var markedElement;
|
||||
var proofElement;
|
||||
var outputElement;
|
||||
|
||||
setup(function() {
|
||||
markedElement = fixture('CamelCaseHTML');
|
||||
proofElement = document.createElement('div');
|
||||
outputElement = document.getElementById('output');
|
||||
});
|
||||
|
||||
test('in code blocks', function() {
|
||||
proofElement.innerHTML = '<div camelCase></div>';
|
||||
expect(outputElement).to.equal(markedElement.outputElement);
|
||||
expect(isHidden(markedElement.$.content)).to.be.true;
|
||||
|
||||
// If Markdown content were put into a `<template>` or directly into the DOM, it would be
|
||||
// rendered as DOM and be converted from camelCase to lowercase per HTML parsing rules. By
|
||||
// using `<script>` descendants, content is interpreted as plain text.
|
||||
expect(proofElement.innerHTML).to.eql('<div camelcase=""></div>')
|
||||
expect(outputElement.innerHTML).to.include(escapeHTML('<div camelCase>'));
|
||||
});
|
||||
});
|
||||
|
||||
suite('respects bad HTML', function() {
|
||||
var markedElement;
|
||||
var proofElement;
|
||||
var outputElement;
|
||||
|
||||
setup(function() {
|
||||
markedElement = fixture('BadHTML');
|
||||
proofElement = document.createElement('div');
|
||||
outputElement = document.getElementById('output');
|
||||
});
|
||||
|
||||
test('in code blocks', function() {
|
||||
proofElement.innerHTML = '<p><div></p></div>';
|
||||
expect(outputElement).to.equal(markedElement.outputElement);
|
||||
expect(isHidden(markedElement.$.content)).to.be.true;
|
||||
|
||||
// If Markdown content were put into a `<template>` or directly into the DOM, it would be
|
||||
// rendered as DOM and close unbalanced tags. Because they are in code blocks they should
|
||||
// remain as typed.
|
||||
// Turns out, however IE and everybody else have slightly different opinions
|
||||
// about how the incorrect HTML should be fixed. It seems that:
|
||||
// IE says: <p><div></p></div> -> <p><div><p></p></div>
|
||||
// Chrome/FF say: <p><div></p></div> -> <p></p><div><p></p></div>.
|
||||
// So that's cool.
|
||||
var isEqualToOneOfThem =
|
||||
proofElement.innerHTML === '<p><div><p></p></div>' ||
|
||||
proofElement.innerHTML === '<p></p><div><p></p></div>';
|
||||
expect(isEqualToOneOfThem).be.true;
|
||||
expect(outputElement.innerHTML).to.include(escapeHTML('<p><div></p></div>'));
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
suite('<marked-element> without .markdown-html child', function() {
|
||||
|
||||
suite('respects camelCased HTML', function() {
|
||||
var markedElement;
|
||||
var proofElement;
|
||||
|
||||
setup(function() {
|
||||
markedElement = fixture('CamelCaseHTMLWithoutChild');
|
||||
proofElement = document.createElement('div');
|
||||
});
|
||||
|
||||
test('in code blocks', function() {
|
||||
proofElement.innerHTML = '<div camelCase></div>';
|
||||
expect(markedElement.$.content).to.equal(markedElement.outputElement);
|
||||
expect(isHidden(markedElement.$.content)).to.be.false;
|
||||
|
||||
// If Markdown content were put into a `<template>` or directly into the DOM, it would be
|
||||
// rendered as DOM and be converted from camelCase to lowercase per HTML parsing rules. By
|
||||
// using `<script>` descendants, content is interpreted as plain text.
|
||||
expect(proofElement.innerHTML).to.eql('<div camelcase=""></div>')
|
||||
expect(markedElement.$.content.innerHTML).to.include(escapeHTML('<div camelCase>'));
|
||||
});
|
||||
});
|
||||
|
||||
suite('respects bad HTML', function() {
|
||||
var markedElement;
|
||||
var proofElement;
|
||||
|
||||
setup(function() {
|
||||
markedElement = fixture('BadHTMLWithoutChild');
|
||||
proofElement = document.createElement('div');
|
||||
});
|
||||
|
||||
test('in code blocks', function() {
|
||||
proofElement.innerHTML = '<p><div></p></div>';
|
||||
expect(markedElement.$.content).to.equal(markedElement.outputElement);
|
||||
expect(isHidden(markedElement.$.content)).to.be.false;
|
||||
|
||||
// If Markdown content were put into a `<template>` or directly into the DOM, it would be
|
||||
// rendered as DOM and close unbalanced tags. Because they are in code blocks they should
|
||||
// remain as typed.
|
||||
// Turns out, however IE and everybody else have slightly different opinions
|
||||
// about how the incorrect HTML should be fixed. It seems that:
|
||||
// IE says: <p><div></p></div> -> <p><div><p></p></div>
|
||||
// Chrome/FF say: <p><div></p></div> -> <p></p><div><p></p></div>.
|
||||
// So that's cool.
|
||||
var isEqualToOneOfThem =
|
||||
proofElement.innerHTML === '<p><div><p></p></div>' ||
|
||||
proofElement.innerHTML === '<p></p><div><p></p></div>';
|
||||
expect(isEqualToOneOfThem).be.true;
|
||||
expect(markedElement.$.content.innerHTML).to.include(escapeHTML('<p><div></p></div>'));
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
suite('events', function() {
|
||||
var markedElement;
|
||||
var outputElement;
|
||||
|
||||
setup(function() {
|
||||
markedElement = fixture('CamelCaseHTML');
|
||||
outputElement = document.getElementById('output');
|
||||
});
|
||||
|
||||
test('render() fires marked-render-complete', function(done) {
|
||||
markedElement.addEventListener('marked-render-complete', function() {
|
||||
expect(outputElement.innerHTML).to.not.equal('');
|
||||
done();
|
||||
});
|
||||
markedElement.render();
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
33
dashboard-ui/bower_components/marked/.bower.json
vendored
33
dashboard-ui/bower_components/marked/.bower.json
vendored
|
@ -1,33 +0,0 @@
|
|||
{
|
||||
"name": "marked",
|
||||
"version": "0.3.5",
|
||||
"homepage": "https://github.com/chjj/marked",
|
||||
"authors": [
|
||||
"Christopher Jeffrey <chjjeffrey@gmail.com>"
|
||||
],
|
||||
"description": "A markdown parser built for speed",
|
||||
"keywords": [
|
||||
"markdown",
|
||||
"markup",
|
||||
"html"
|
||||
],
|
||||
"main": "lib/marked.js",
|
||||
"license": "MIT",
|
||||
"ignore": [
|
||||
"**/.*",
|
||||
"node_modules",
|
||||
"bower_components",
|
||||
"app/bower_components",
|
||||
"test",
|
||||
"tests"
|
||||
],
|
||||
"_release": "0.3.5",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v0.3.5",
|
||||
"commit": "88ce4df47c4d994dc1b1df1477a21fb893e11ddc"
|
||||
},
|
||||
"_source": "git://github.com/chjj/marked.git",
|
||||
"_target": "~0.3.3",
|
||||
"_originalSource": "marked"
|
||||
}
|
22
dashboard-ui/bower_components/marked/Gulpfile.js
vendored
22
dashboard-ui/bower_components/marked/Gulpfile.js
vendored
|
@ -1,22 +0,0 @@
|
|||
var gulp = require('gulp');
|
||||
var uglify = require('gulp-uglify');
|
||||
var concat = require('gulp-concat');
|
||||
|
||||
var preserveFirstComment = function() {
|
||||
var set = false;
|
||||
|
||||
return function() {
|
||||
if (set) return false;
|
||||
set = true;
|
||||
return true;
|
||||
};
|
||||
};
|
||||
|
||||
gulp.task('uglify', function() {
|
||||
gulp.src('lib/marked.js')
|
||||
.pipe(uglify({preserveComments: preserveFirstComment()}))
|
||||
.pipe(concat('marked.min.js'))
|
||||
.pipe(gulp.dest('.'));
|
||||
});
|
||||
|
||||
gulp.task('default', ['uglify']);
|
19
dashboard-ui/bower_components/marked/LICENSE
vendored
19
dashboard-ui/bower_components/marked/LICENSE
vendored
|
@ -1,19 +0,0 @@
|
|||
Copyright (c) 2011-2014, 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.
|
12
dashboard-ui/bower_components/marked/Makefile
vendored
12
dashboard-ui/bower_components/marked/Makefile
vendored
|
@ -1,12 +0,0 @@
|
|||
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
|
||||
|
||||
.PHONY: clean all
|
24
dashboard-ui/bower_components/marked/bower.json
vendored
24
dashboard-ui/bower_components/marked/bower.json
vendored
|
@ -1,24 +0,0 @@
|
|||
{
|
||||
"name": "marked",
|
||||
"version": "0.3.4",
|
||||
"homepage": "https://github.com/chjj/marked",
|
||||
"authors": [
|
||||
"Christopher Jeffrey <chjjeffrey@gmail.com>"
|
||||
],
|
||||
"description": "A markdown parser built for speed",
|
||||
"keywords": [
|
||||
"markdown",
|
||||
"markup",
|
||||
"html"
|
||||
],
|
||||
"main": "lib/marked.js",
|
||||
"license": "MIT",
|
||||
"ignore": [
|
||||
"**/.*",
|
||||
"node_modules",
|
||||
"bower_components",
|
||||
"app/bower_components",
|
||||
"test",
|
||||
"tests"
|
||||
]
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
{
|
||||
"name": "marked",
|
||||
"version": "0.3.4",
|
||||
"repo": "chjj/marked",
|
||||
"description": "A markdown parser built for speed",
|
||||
"keywords": ["markdown", "markup", "html"],
|
||||
"scripts": ["lib/marked.js"],
|
||||
"main": "lib/marked.js",
|
||||
"license": "MIT"
|
||||
}
|
426
dashboard-ui/bower_components/marked/doc/broken.md
vendored
426
dashboard-ui/bower_components/marked/doc/broken.md
vendored
|
@ -1,426 +0,0 @@
|
|||
# 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
|
||||
<ul>
|
||||
<li><p>item1</p>
|
||||
|
||||
<ul>
|
||||
<li>item2</li>
|
||||
</ul>
|
||||
|
||||
<p><p>text</p></li>
|
||||
</ul></p>
|
||||
```
|
||||
|
||||
|
||||
```
|
||||
$ marked
|
||||
* item1
|
||||
|
||||
* item2
|
||||
|
||||
text
|
||||
^D
|
||||
<ul>
|
||||
<li><p>item1</p>
|
||||
<ul>
|
||||
<li>item2</li>
|
||||
</ul>
|
||||
<p>text</p>
|
||||
</li>
|
||||
</ul>
|
||||
```
|
||||
|
||||
Which looks correct to you?
|
||||
|
||||
- - -
|
||||
|
||||
```
|
||||
$ markdown.pl
|
||||
* hello
|
||||
> world
|
||||
^D
|
||||
<p><ul>
|
||||
<li>hello</p>
|
||||
|
||||
<blockquote>
|
||||
<p>world</li>
|
||||
</ul></p>
|
||||
</blockquote>
|
||||
```
|
||||
|
||||
```
|
||||
$ marked
|
||||
* hello
|
||||
> world
|
||||
^D
|
||||
<ul>
|
||||
<li>hello<blockquote>
|
||||
<p>world</p>
|
||||
</blockquote>
|
||||
</li>
|
||||
</ul>
|
||||
```
|
||||
|
||||
Again, which looks correct to you?
|
||||
|
||||
- - -
|
||||
|
||||
EXAMPLE:
|
||||
|
||||
```
|
||||
$ markdown.pl
|
||||
* hello
|
||||
* world
|
||||
* hi
|
||||
code
|
||||
^D
|
||||
<ul>
|
||||
<li>hello
|
||||
<ul>
|
||||
<li>world</li>
|
||||
<li>hi
|
||||
code</li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
```
|
||||
|
||||
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
|
||||
<ul>
|
||||
<li>hello
|
||||
<ul>
|
||||
<li>world</li>
|
||||
<li>hi
|
||||
code</li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
```
|
||||
|
||||
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
|
||||
<ul>
|
||||
<li><p>item1</p>
|
||||
|
||||
<ul>
|
||||
<li>item2</li>
|
||||
</ul>
|
||||
|
||||
<p><p>text</p></li>
|
||||
</ul></p>
|
||||
```
|
||||
|
||||
Misnested tags.
|
||||
|
||||
|
||||
```
|
||||
$ marked
|
||||
* item1
|
||||
|
||||
* item2
|
||||
|
||||
text
|
||||
^D
|
||||
<ul>
|
||||
<li><p>item1</p>
|
||||
<ul>
|
||||
<li>item2</li>
|
||||
</ul>
|
||||
<p>text</p>
|
||||
</li>
|
||||
</ul>
|
||||
```
|
||||
|
||||
Which looks correct to you?
|
||||
|
||||
- - -
|
||||
|
||||
```
|
||||
$ markdown.pl
|
||||
* hello
|
||||
> world
|
||||
^D
|
||||
<p><ul>
|
||||
<li>hello</p>
|
||||
|
||||
<blockquote>
|
||||
<p>world</li>
|
||||
</ul></p>
|
||||
</blockquote>
|
||||
```
|
||||
|
||||
More misnested tags.
|
||||
|
||||
|
||||
```
|
||||
$ marked
|
||||
* hello
|
||||
> world
|
||||
^D
|
||||
<ul>
|
||||
<li>hello<blockquote>
|
||||
<p>world</p>
|
||||
</blockquote>
|
||||
</li>
|
||||
</ul>
|
||||
```
|
||||
|
||||
Again, which looks correct to you?
|
||||
|
||||
- - -
|
||||
|
||||
# Why quality matters - Part 2
|
||||
|
||||
``` bash
|
||||
$ markdown.pl
|
||||
* hello
|
||||
> world
|
||||
^D
|
||||
<p><ul>
|
||||
<li>hello</p>
|
||||
|
||||
<blockquote>
|
||||
<p>world</li>
|
||||
</ul></p>
|
||||
</blockquote>
|
||||
```
|
||||
|
||||
``` bash
|
||||
$ sundown # upskirt
|
||||
* hello
|
||||
> world
|
||||
^D
|
||||
<ul>
|
||||
<li>hello
|
||||
> world</li>
|
||||
</ul>
|
||||
```
|
||||
|
||||
``` bash
|
||||
$ marked
|
||||
* hello
|
||||
> world
|
||||
^D
|
||||
<ul><li>hello <blockquote><p>world</p></blockquote></li></ul>
|
||||
```
|
||||
|
||||
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
|
||||
<ul>
|
||||
<li>hello
|
||||
var a = 1;</li>
|
||||
<li>world</li>
|
||||
</ul>
|
||||
```
|
||||
|
||||
``` bash
|
||||
$ marked
|
||||
* hello
|
||||
var a = 1;
|
||||
* world
|
||||
^D
|
||||
<ul><li>hello
|
||||
<pre>code>var a = 1;</code></pre></li>
|
||||
<li>world</li></ul>
|
||||
```
|
||||
|
||||
Which looks more reasonable? Why shouldn't code blocks be able to appear in
|
||||
list items in a sane way?
|
||||
|
||||
- - -
|
||||
|
||||
``` bash
|
||||
$ markdown.js
|
||||
<div>hello</div>
|
||||
|
||||
<span>hello</span>
|
||||
^D
|
||||
<p><div>hello</div></p>
|
||||
|
||||
<p><span>hello</span></p>
|
||||
```
|
||||
|
||||
``` bash
|
||||
$ marked
|
||||
<div>hello</div>
|
||||
|
||||
<span>hello</span>
|
||||
^D
|
||||
<div>hello</div>
|
||||
|
||||
|
||||
<p><span>hello</span>
|
||||
</p>
|
||||
```
|
||||
|
||||
- - -
|
||||
|
||||
See: https://github.com/evilstreak/markdown-js/issues/27
|
||||
|
||||
``` bash
|
||||
$ markdown.js
|
||||
[](/link)
|
||||
^D
|
||||
<p><a href="/image)](/link">](/link)
|
||||
^D
|
||||
<p><a href="/link"><img src="/image" alt="an image"></a>
|
||||
</p>
|
||||
```
|
||||
|
||||
- - -
|
||||
|
||||
See: https://github.com/evilstreak/markdown-js/issues/24
|
||||
|
||||
``` bash
|
||||
$ markdown.js
|
||||
> a
|
||||
|
||||
> b
|
||||
|
||||
> c
|
||||
^D
|
||||
<blockquote><p>a</p><p>bundefined> c</p></blockquote>
|
||||
```
|
||||
|
||||
``` bash
|
||||
$ marked
|
||||
> a
|
||||
|
||||
> b
|
||||
|
||||
> c
|
||||
^D
|
||||
<blockquote><p>a
|
||||
|
||||
</p></blockquote>
|
||||
<blockquote><p>b
|
||||
|
||||
</p></blockquote>
|
||||
<blockquote><p>c
|
||||
</p></blockquote>
|
||||
```
|
||||
|
||||
- - -
|
||||
|
||||
``` bash
|
||||
$ markdown.pl
|
||||
* hello
|
||||
* world
|
||||
how
|
||||
|
||||
are
|
||||
you
|
||||
|
||||
* today
|
||||
* hi
|
||||
^D
|
||||
<ul>
|
||||
<li><p>hello</p>
|
||||
|
||||
<ul>
|
||||
<li>world
|
||||
how</li>
|
||||
</ul>
|
||||
|
||||
<p>are
|
||||
you</p>
|
||||
|
||||
<ul>
|
||||
<li>today</li>
|
||||
</ul></li>
|
||||
<li>hi</li>
|
||||
</ul>
|
||||
```
|
||||
|
||||
``` bash
|
||||
$ marked
|
||||
* hello
|
||||
* world
|
||||
how
|
||||
|
||||
are
|
||||
you
|
||||
|
||||
* today
|
||||
* hi
|
||||
^D
|
||||
<ul>
|
||||
<li><p>hello</p>
|
||||
<ul>
|
||||
<li><p>world
|
||||
how</p>
|
||||
<p>are
|
||||
you</p>
|
||||
</li>
|
||||
<li><p>today</p>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>hi</li>
|
||||
</ul>
|
||||
```
|
|
@ -1,2 +0,0 @@
|
|||
# Todo
|
||||
|
|
@ -1 +0,0 @@
|
|||
module.exports = require('./lib/marked');
|
1285
dashboard-ui/bower_components/marked/lib/marked.js
vendored
1285
dashboard-ui/bower_components/marked/lib/marked.js
vendored
File diff suppressed because it is too large
Load diff
|
@ -1,91 +0,0 @@
|
|||
.ds q \N'34'
|
||||
.TH marked 1 "2014-01-31" "v0.3.1" "marked.js"
|
||||
|
||||
.SH NAME
|
||||
marked \- a javascript markdown parser
|
||||
|
||||
.SH SYNOPSIS
|
||||
.B marked
|
||||
[\-o \fI<output>\fP] [\-i \fI<input>\fP] [\-\-help]
|
||||
[\-\-tokens] [\-\-pedantic] [\-\-gfm]
|
||||
[\-\-breaks] [\-\-tables] [\-\-sanitize]
|
||||
[\-\-smart\-lists] [\-\-lang\-prefix \fI<prefix>\fP]
|
||||
[\-\-no\-etc...] [\-\-silent] [\fIfilename\fP]
|
||||
|
||||
.SH DESCRIPTION
|
||||
.B marked
|
||||
is a full-featured javascript markdown parser, built for speed. It also includes
|
||||
multiple GFM features.
|
||||
|
||||
.SH EXAMPLES
|
||||
.TP
|
||||
cat in.md | marked > out.html
|
||||
.TP
|
||||
echo "hello *world*" | marked
|
||||
.TP
|
||||
marked \-o out.html in.md \-\-gfm
|
||||
.TP
|
||||
marked \-\-output="hello world.html" \-i in.md \-\-no-breaks
|
||||
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
.BI \-o,\ \-\-output\ [\fIoutput\fP]
|
||||
Specify file output. If none is specified, write to stdout.
|
||||
.TP
|
||||
.BI \-i,\ \-\-input\ [\fIinput\fP]
|
||||
Specify file input, otherwise use last argument as input file. If no input file
|
||||
is specified, read from stdin.
|
||||
.TP
|
||||
.BI \-t,\ \-\-tokens
|
||||
Output a token stream instead of html.
|
||||
.TP
|
||||
.BI \-\-pedantic
|
||||
Conform to obscure parts of markdown.pl as much as possible. Don't fix original
|
||||
markdown bugs.
|
||||
.TP
|
||||
.BI \-\-gfm
|
||||
Enable github flavored markdown.
|
||||
.TP
|
||||
.BI \-\-breaks
|
||||
Enable GFM line breaks. Only works with the gfm option.
|
||||
.TP
|
||||
.BI \-\-tables
|
||||
Enable GFM tables. Only works with the gfm option.
|
||||
.TP
|
||||
.BI \-\-sanitize
|
||||
Sanitize output. Ignore any HTML input.
|
||||
.TP
|
||||
.BI \-\-smart\-lists
|
||||
Use smarter list behavior than the original markdown.
|
||||
.TP
|
||||
.BI \-\-lang\-prefix\ [\fIprefix\fP]
|
||||
Set the prefix for code block classes.
|
||||
.TP
|
||||
.BI \-\-mangle
|
||||
Mangle email addresses.
|
||||
.TP
|
||||
.BI \-\-no\-sanitize,\ \-no-etc...
|
||||
The inverse of any of the marked options above.
|
||||
.TP
|
||||
.BI \-\-silent
|
||||
Silence error output.
|
||||
.TP
|
||||
.BI \-h,\ \-\-help
|
||||
Display help information.
|
||||
|
||||
.SH CONFIGURATION
|
||||
For configuring and running programmatically.
|
||||
|
||||
.B Example
|
||||
|
||||
require('marked')('*foo*', { gfm: true });
|
||||
|
||||
.SH BUGS
|
||||
Please report any bugs to https://github.com/chjj/marked.
|
||||
|
||||
.SH LICENSE
|
||||
Copyright (c) 2011-2014, Christopher Jeffrey (MIT License).
|
||||
|
||||
.SH "SEE ALSO"
|
||||
.BR markdown(1),
|
||||
.BR node.js(1)
|
File diff suppressed because one or more lines are too long
|
@ -1,24 +0,0 @@
|
|||
{
|
||||
"name": "marked",
|
||||
"description": "A markdown parser built for speed",
|
||||
"author": "Christopher Jeffrey",
|
||||
"version": "0.3.5",
|
||||
"main": "./lib/marked.js",
|
||||
"bin": "./bin/marked",
|
||||
"man": "./man/marked.1",
|
||||
"preferGlobal": true,
|
||||
"repository": "git://github.com/chjj/marked.git",
|
||||
"homepage": "https://github.com/chjj/marked",
|
||||
"bugs": { "url": "http://github.com/chjj/marked/issues" },
|
||||
"license": "MIT",
|
||||
"keywords": ["markdown", "markup", "html"],
|
||||
"tags": ["markdown", "markup", "html"],
|
||||
"devDependencies": {
|
||||
"markdown": "*",
|
||||
"showdown": "*",
|
||||
"gulp": "^3.8.11",
|
||||
"gulp-uglify": "^1.1.0",
|
||||
"gulp-concat": "^2.5.2"
|
||||
},
|
||||
"scripts": { "test": "node test", "bench": "node test --bench" }
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue