[[Off topic]] MD in devonthink:getting line numbers in code blocks using prism.js/css

Hi all. This is slightly off topic but ill give it a shot :slight_smile:

thx to @BLUEFROG ive been using there great prism.js css:

https://prismjs.com/index.html

most of the stuff just works (like themes, buttons etc.) by adding the below lines in my .MD file ie:

<link href="/Users/zeltak/MLT/css/prism.css" rel="stylesheet">
<script src="/Users/zeltak/MLT/css/prism.js"></script>

yet i cant figure out how to deal with the line number plugin.

from what i understand it adds line numbers to the code blocks. anyone know perhaps how one uses that? Does that option needs to be refrred to in the .MD file? Or somewhere within the code block?

thx again

Z

1 Like

The plugin needs to be included into the js bundle and then you just call this plugin

<pre class="language-python line-numbers"><code>
df_employees['salary']
df_employees[['salary']]
</code></pre>