You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the code block, add the following code with a pragma:
public class TestClass
{
#pragma warning disable IDE0060 // Remove unused parameter
public void TestMethod(string param)
#pragma warning restore IDE0060 // Remove unused parameter
{
}
}
Set Language = C#
This code gets rendered like this:
Notice the 2nd pragma (line 5) is not rendering the same as the first one (line 3).
I think it has to do with the placement of pragma. If it's underneath the method declaration line, then it renders wrong. If it's put after the method block, it's fine. I think this is a pretty minor bug, since there's a simple workaround and pragmas are pretty rare in sample code.
For example, the following is fine:
public class TestClass
{
#pragma warning disable IDE0060 // Remove unused parameter
public void TestMethod(string param)
{
}
#pragma warning restore IDE0060 // Remove unused parameter
}
This renders correctly:
The text was updated successfully, but these errors were encountered:
This is definitely an upstream problem. hljs isn't highlighting it correctly, my guess is meta highlights aren't considered valid in between a function signature and the opening brace.
In the code block, add the following code with a pragma:
Set Language = C#
This code gets rendered like this:
![image](https://user-images.githubusercontent.com/15324656/122989928-5ffb4500-d371-11eb-9e2d-1c20a8eccc94.png)
Notice the 2nd pragma (line 5) is not rendering the same as the first one (line 3).
I think it has to do with the placement of pragma. If it's underneath the method declaration line, then it renders wrong. If it's put after the method block, it's fine. I think this is a pretty minor bug, since there's a simple workaround and pragmas are pretty rare in sample code.
For example, the following is fine:
This renders correctly:
![image](https://user-images.githubusercontent.com/15324656/122991517-1ca1d600-d373-11eb-8507-6a08841c31ad.png)
The text was updated successfully, but these errors were encountered: