• Resolved grokman

    (@grokman)


    Is there already or can you tell me how to adapt a current language that:

    would work for just a plain console / terminal ?

    Ie, I want one that does not highlight any keywords at all (yet, still allows me to set a basic style for the text). I tried the powershell one & it still highlighted keywords like “for” “from” and “in”, just like the bash one.

    • This topic was modified 6 years, 7 months ago by grokman.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Jeff Starr

    (@specialk)

    It’s a good question. I know that with Highlight.js you can disable syntax highlighting for any code block, by adding a class of nohighlight, like so:

    <code class="nohighlight">...</code>

    Similarly, you can add a class of plaintext to make arbitrary text look like code, but without highlighting:

    <code class="plaintext">...</code>

    Not sure if it’s possible with Prism.js though.

    Thread Starter grokman

    (@grokman)

    Seems like there should just be another language in the:

    ../wordpress/wp-content/plugins/prismatic/lib/prism/js/

    folder for it. Must not be much demand for this. For me, I like to keep the console I/O snippets with a consistent look & feel as the code snippets. I think it flows better that way.

    For now, what I did was to use one of the 2 smallest “language” files in there which are the “diff” or “ini” ones, and so far, no undesired keywords are getting highlighted.

    Eg: https://grokshop.tv/linux-zsh-install-configure/

    I guess I could add my own language js file in there, and associated hooks, but I am always leary of stuff getting blasted on “updates”.

    Plugin Author Jeff Starr

    (@specialk)

    If you can find a Prism.js language that will do the job, I will be glad to add it to plugin core in the next update.

    Thread Starter grokman

    (@grokman)

    Thanks for your support. I will keep it like this unless & until I run into an issue. At that time I will dup off a new one & make needed changes & get back to you. Its just a matter of time, I’m sure.

    Cheers!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Console / Terminal “language”’ is closed to new replies.