mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
stub out channel mapping
This commit is contained in:
parent
1da301d7e5
commit
59b4199fc0
13 changed files with 253 additions and 53 deletions
|
@ -24,6 +24,9 @@ containing the source to highlight. The event detail can optionally contain a
|
|||
`lang` property, containing a string like `"html"`, `"js"`, etc.
|
||||
|
||||
This flow is supported by [`<marked-element>`](https://github.com/PolymerElements/marked-element).
|
||||
|
||||
@element prism-highlighter
|
||||
@demo demo/index.html
|
||||
-->
|
||||
<script>
|
||||
(function() {
|
||||
|
@ -55,10 +58,12 @@ This flow is supported by [`<marked-element>`](https://github.com/PolymerElement
|
|||
*/
|
||||
_highlight: function(event) {
|
||||
if (!event.detail || !event.detail.code) {
|
||||
console.warn('Malformed', HIGHLIGHT_EVENT, 'event:', event.detail);
|
||||
Polymer.Base._warn('Malformed', HIGHLIGHT_EVENT, 'event:', event.detail);
|
||||
return;
|
||||
}
|
||||
|
||||
event.stopPropagation();
|
||||
|
||||
var detail = event.detail;
|
||||
detail.code = Prism.highlight(detail.code, this._detectLang(detail.code, detail.lang));
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue