How to use Google code-prettify in Polymer 3?
The syntax highlighting is not working. Sample code below:
class MyView1 extends PolymerElement {
static get template() {
return html`
<style include="shared-styles">
</style>
<script src="https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js"></script>
<pre class="prettyprint">
<code class="language-java">
public static void getValue(){
String name = "Vikram";
}
</code>
</pre>
I have added a working sample at https://stackblitz.com/edit/polymer-element-example-d7n14q where the code can be edited and run as well.