• Resolved harrism

    (@harrism)


    I need to highlight Matlab syntax in my blog. google-code-prettify supports Matlab as an extension (along with various other languages): https://github.com/google/code-prettify#for-which-languages-does-it-work

    To enable extensions, you have to not only specify the language hint in your pre tag (lang-matlab), but you have to include the lang-matlab.js script in your document.

    To enable this, WP Code Prettify would need to either add options in the settings dialog with checkboxes for each extension language to enable including the source file, or it would need to auto-detect each extension language and automatically include the script for that language.

    This would be a nice feature to support, especially for those of us who don’t have access to modifying the source of our blog sites.
    https://www.ads-software.com/plugins/wp-code-prettify/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Soli

    (@allnull)

    Please update to v0.2.5.

    You can add custom HTML into <head> section, now.

    Include the lang-matlab.js script like this:

    <script src="https://url/to/lang-matlab.js"></script>

    Good luck ^_^

    Thread Starter harrism

    (@harrism)

    This is not that helpful, because I have to hard-code the path to the script, or use WP PHP calls to get the plugin_path(), and I’m not sure if your change supports PHP. I’m not even sure that is secure.

    Why not provide a list of additional languages to support and let the user check the ones they want to include?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Support google-code-prettify language extensions’ is closed to new replies.