טפסים שמדמים

Something to note is that code blocks sometimes cause problems:

usermod -aG sudo =USERNAME=

In this case, highlight.js assumes this is Java and converts the codeblock to:

<code class="hljs language-java" data-highlighted="yes">
  usermod -
  <span class="hljs-type">aG</span> 
  <span class="hljs-variable">sudo</span> 
  <span class="hljs-operator">=</span>
  USERNAME=
</code>

I’m able to fix it by signaling this is actually a shell command:

    ```shell
    usermod -aG sudo =USERNAME=
    ```

That results in:

usermod -aG sudo =USERNAME=

If all else fails, text prevents highlight.js from messing with the placeholders.

A more general solution (that Meta Discourse must be using) is to change the default code lang setting from auto to plaintext or somesuch. :wink:


Not that it matters much, but using java is a way to avoid having the placeholder expand when you want to write about placeholders.

לייק 1