Home > Software engineering >  Adjust `prism.js` code snippet box width according to text width
Adjust `prism.js` code snippet box width according to text width

Time:12-31

My HTML is as follows :-

<link href="https://snip-share.herokuapp.com/static/css/prism.css" rel="stylesheet" />

<pre><code >import time

print(time.time())</code>
</pre>
<script src="https://snip-share.herokuapp.com/static/js/prism.js"></script>

Output of above code :

Output of above code => https://i.stack.imgur.com/EDSVQ.jpg

Expected Output :

Expected Output => https://i.stack.imgur.com/7esAU.png

Simply means I just want to set the black box width according to the text width inside it

  • Related