Testing command line code hint (cmd):

rem This is a test
netsh delete ipport=0.0.0.0:44369

Code fence with no lang hint will have language auto-detected by highlight.js:

```
console.log("this is a test");
```

console.log("this is a test");

Code fence with valid lang hint:

```js
console.log("this is a test");
```

console.log("this is a test");

Code fence with invalid lang hint:

```pastry7
console.log("this is a test");
```

console.log("this is a test");

Custom: No highlighting on code fence with lang hint "nohighlight":

```nohighlight
console.log("this is a test");
```

console.log("this is a test");

Code fence with special lang hint "naked" which excludes the code from highlighting and no pre background:

Input:

```naked
const testVar = "test value";
console.log("testVar", testVar);
```

Output:

const testVar = "test value";
console.log("testVar", testVar);

Legacy Stuff

Legacy Custom: No highlighting on code fence with lang hint "noprettyprint":

```noprettyprint
console.log("this is a test");
```

console.log("this is a test");

Legacy Custom: No highlighting on PRE tag with class "noprettyprint" (without code tag):

<pre class="noprettyprint">
var s = 'some test';
console.log(s);
</pre>

var s = 'some test';
console.log(s);

Legacy Custom: No highlighting on PRE tag with class "noprettyprint" (with code tag):

<pre class="noprettyprint"><code>var s = 'some test';
console.log(s);
</code></pre>

var s = 'some test';
console.log(s);

Legacy Custom: No highlighting on CODE tag with class "noprettyprint":

<pre><code class="noprettyprint">var s = 'some test';
console.log(s);
</code></pre>

var s = 'some test';
console.log(s);
Published On: June 4, 2024Categories: Uncategorized