1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

update components

This commit is contained in:
Luke Pulverenti 2016-02-04 13:19:10 -05:00
parent 5973359f39
commit 4c2a7ed02d
23 changed files with 228 additions and 129 deletions

View file

@ -1,6 +1,6 @@
{
"name": "marked-element",
"version": "1.1.2",
"version": "1.1.3",
"description": "Element wrapper for the marked library",
"private": true,
"authors": [
@ -33,11 +33,11 @@
},
"ignore": [],
"homepage": "https://github.com/polymerelements/marked-element",
"_release": "1.1.2",
"_release": "1.1.3",
"_resolution": {
"type": "version",
"tag": "v1.1.2",
"commit": "6e55c2290ad89a520a25a88f3fafc49b8d654c68"
"tag": "v1.1.3",
"commit": "19b30d7151b2420cf84387b6711d9042cbb29c26"
},
"_source": "git://github.com/polymerelements/marked-element.git",
"_target": "^1.0.0",

View file

@ -51,14 +51,14 @@ Polymer Elements are built in the open, and the Polymer authors eagerly encourag
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 using the following syntax:
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, #40
Fixes #32, fixes #40
```
2. **A succinct description of the design** used to fix any related issues. For example:

View file

@ -1,6 +1,6 @@
{
"name": "marked-element",
"version": "1.1.2",
"version": "1.1.3",
"description": "Element wrapper for the marked library",
"private": true,
"authors": [

View file

@ -158,7 +158,7 @@ as you would a regular DOM element:
* Unindents the markdown source that will be rendered.
*/
unindent: function(text) {
this._unindent(text);
return this._unindent(text);
},
get outputElement () {
@ -171,6 +171,14 @@ as you would a regular DOM element:
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.
*
@ -193,6 +201,7 @@ as you would a regular DOM element:
smartypants: this.smartypants
};
Polymer.dom(this._outputElement).innerHTML = marked(this.markdown, opts);
this.fire('marked-render-complete');
},
_highlight: function(code, lang) {
@ -212,7 +221,7 @@ as you would a regular DOM element:
}, null);
return lines.map(function(l) { return l.substr(indent); }).join('\n');
},
}
});

View file

@ -1,5 +1,4 @@
<!doctype html>
<!--
<!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
@ -7,9 +6,7 @@ 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>
--><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>
@ -18,8 +15,10 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
<body>
<script>
WCT.loadSuites([
'marked-element.html'
'marked-element.html',
'marked-element.html?dom=shadow'
]);
</script>
</body>
</html>
</body></html>

View file

@ -241,6 +241,24 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
});
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>