Skip to main content
made example consistent between input/output
Source Link
KyleMit StaffMod
  • 13.1k
  • 1
  • 66
  • 94

We've addressed the all the issues raised by kos & zcoop98 that were caused by updates in Stop guessing/auto-detecting a language when you KNOW it will be incorrect

  1. We now exclude tags that aren't part of our predefined list of known good tags from highlighting in both preview and when rendered. This is somewhat tricky because we have two different MD -> HTML engines, one running in client-side running in JS, one in server-side running in C#.
  2. We shored up the aliases used for each language block client and server side so they're the same.

Test Case 1 - Non Existent language tag

Input

```lang-nonexistant var x = "123"; ``` 

Output

var x = "123"; 

Test Case 2 - Supported Language Aliases

Input

```lang-js var x = "123"; ``` ```lang-javascript var x = "123"; ``` ```lang-consolebash grep "pattern" filename.txt ``` ```lang-shellsh grep "pattern" filename.txt ``` 

Output

var x = "123"; 
var x = "123"; 
#!/bin/bash 
grep "pattern" filename.txt 
#!/bin/bash 
grep "pattern" filename.txt 

It should be noted that existing posts that have been affected by this bug need to be edited to have the fix - existing posts have not been re-rendered.

Thanks for reporting!

We've addressed the all the issues raised by kos & zcoop98 that were caused by updates in Stop guessing/auto-detecting a language when you KNOW it will be incorrect

  1. We now exclude tags that aren't part of our predefined list of known good tags from highlighting in both preview and when rendered. This is somewhat tricky because we have two different MD -> HTML engines, one running in client-side running in JS, one in server-side running in C#.
  2. We shored up the aliases used for each language block client and server side so they're the same.

Test Case 1 - Non Existent language tag

Input

```lang-nonexistant var x = "123"; ``` 

Output

var x = "123"; 

Test Case 2 - Supported Language Aliases

Input

```lang-js var x = "123"; ``` ```lang-javascript var x = "123"; ``` ```lang-console grep "pattern" filename.txt ``` ```lang-shell grep "pattern" filename.txt ``` 

Output

var x = "123"; 
var x = "123"; 
#!/bin/bash 
#!/bin/bash 

It should be noted that existing posts that have been affected by this bug need to be edited to have the fix - existing posts have not been re-rendered.

Thanks for reporting!

We've addressed the all the issues raised by kos & zcoop98 that were caused by updates in Stop guessing/auto-detecting a language when you KNOW it will be incorrect

  1. We now exclude tags that aren't part of our predefined list of known good tags from highlighting in both preview and when rendered. This is somewhat tricky because we have two different MD -> HTML engines, one running in client-side running in JS, one in server-side running in C#.
  2. We shored up the aliases used for each language block client and server side so they're the same.

Test Case 1 - Non Existent language tag

Input

```lang-nonexistant var x = "123"; ``` 

Output

var x = "123"; 

Test Case 2 - Supported Language Aliases

Input

```lang-js var x = "123"; ``` ```lang-javascript var x = "123"; ``` ```lang-bash grep "pattern" filename.txt ``` ```lang-sh grep "pattern" filename.txt ``` 

Output

var x = "123"; 
var x = "123"; 
grep "pattern" filename.txt 
grep "pattern" filename.txt 

It should be noted that existing posts that have been affected by this bug need to be edited to have the fix - existing posts have not been re-rendered.

Thanks for reporting!

added 156 characters in body
Source Link

We've addressed the all the issues raised by kos & zcoop98 that were caused by updates in Stop guessing/auto-detecting a language when you KNOW it will be incorrect

  1. We now exclude tags that aren't part of our predefined list of known good tags from highlighting in both preview and when rendered. This is somewhat tricky because we have two different MD -> HTML engines, one running in client-side running in JS, one in server-side running in C#.
  2. We shored up the aliases used for each language block client and server side so they're the same.

Test Case 1 - Non Existent language tag

Input

```lang-nonexistant var x = "123"; ``` 

Output

var x = "123"; 

Test Case 2 - Supported Language Aliases

Input

```lang-js var x = "123"; ``` ```lang-javascript var x = "123"; ``` ```lang-console grep "pattern" filename.txt ``` ```lang-shell grep "pattern" filename.txt ``` 

Output

var x = "123"; 
var x = "123"; 
#!/bin/bash 
#!/bin/bash 

It should be noted that existing posts that have been affected by this bug need to be edited to have the fix - existing posts have not been re-rendered.

Thanks for reporting!

We've addressed the all the issues raised by kos & zcoop98 that were caused by updates in Stop guessing/auto-detecting a language when you KNOW it will be incorrect

  1. We now exclude tags that aren't part of our predefined list of known good tags from highlighting in both preview and when rendered. This is somewhat tricky because we have two different MD -> HTML engines, one running in client-side running in JS, one in server-side running in C#.
  2. We shored up the aliases used for each language block client and server side so they're the same.

Test Case 1 - Non Existent language tag

Input

```lang-nonexistant var x = "123"; ``` 

Output

var x = "123"; 

Test Case 2 - Supported Language Aliases

Input

```lang-js var x = "123"; ``` ```lang-javascript var x = "123"; ``` ```lang-console grep "pattern" filename.txt ``` ```lang-shell grep "pattern" filename.txt ``` 

Output

var x = "123"; 
var x = "123"; 
#!/bin/bash 
#!/bin/bash 

Thanks for reporting!

We've addressed the all the issues raised by kos & zcoop98 that were caused by updates in Stop guessing/auto-detecting a language when you KNOW it will be incorrect

  1. We now exclude tags that aren't part of our predefined list of known good tags from highlighting in both preview and when rendered. This is somewhat tricky because we have two different MD -> HTML engines, one running in client-side running in JS, one in server-side running in C#.
  2. We shored up the aliases used for each language block client and server side so they're the same.

Test Case 1 - Non Existent language tag

Input

```lang-nonexistant var x = "123"; ``` 

Output

var x = "123"; 

Test Case 2 - Supported Language Aliases

Input

```lang-js var x = "123"; ``` ```lang-javascript var x = "123"; ``` ```lang-console grep "pattern" filename.txt ``` ```lang-shell grep "pattern" filename.txt ``` 

Output

var x = "123"; 
var x = "123"; 
#!/bin/bash 
#!/bin/bash 

It should be noted that existing posts that have been affected by this bug need to be edited to have the fix - existing posts have not been re-rendered.

Thanks for reporting!

Source Link

We've addressed the all the issues raised by kos & zcoop98 that were caused by updates in Stop guessing/auto-detecting a language when you KNOW it will be incorrect

  1. We now exclude tags that aren't part of our predefined list of known good tags from highlighting in both preview and when rendered. This is somewhat tricky because we have two different MD -> HTML engines, one running in client-side running in JS, one in server-side running in C#.
  2. We shored up the aliases used for each language block client and server side so they're the same.

Test Case 1 - Non Existent language tag

Input

```lang-nonexistant var x = "123"; ``` 

Output

var x = "123"; 

Test Case 2 - Supported Language Aliases

Input

```lang-js var x = "123"; ``` ```lang-javascript var x = "123"; ``` ```lang-console grep "pattern" filename.txt ``` ```lang-shell grep "pattern" filename.txt ``` 

Output

var x = "123"; 
var x = "123"; 
#!/bin/bash 
#!/bin/bash 

Thanks for reporting!