You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
code send to prism-highlighter element is actually 'parsed' by polymer.
used prism-demo as example https://github.com/PolymerElements/prism-element/blob/master/demo/prism-demo.html <dom-module id="my-element"> <template> console.log('hello world") </template> </dom-module> <my-element></my-element> <prism-demo code="<my-element></my-element>" lang="html"></prism-demo>
Expected outcome
hello world
Actual outcome
hello world
hello world
Browsers Affected
Chrome
Firefox
[?] Safari 9
[?] Safari 8
[?] Safari 7
Edge
[?] IE 11
[?] IE 10
The text was updated successfully, but these errors were encountered:
Stefdv
changed the title
html code is parsed by polymer
html code send to prism-highlighter is parsed by polymer
Apr 26, 2016
In my case, when I wait a few seconds before passing my HTML to Prism it is not parsed by Polymer. I guess Prism is not ready the first time my element renders and the source code I want to be highlighted is passed.
Workaround: wait 50ms at least for the 1st render.
Description
code send to prism-highlighter element is actually 'parsed' by polymer.
used prism-demo as example
https://github.com/PolymerElements/prism-element/blob/master/demo/prism-demo.html
<dom-module id="my-element">
<template>
console.log('hello world")
</template>
</dom-module>
<my-element></my-element>
<prism-demo code="<my-element></my-element>" lang="html"></prism-demo>
Expected outcome
hello world
Actual outcome
hello world
hello world
Browsers Affected
The text was updated successfully, but these errors were encountered: