I noticed a strange rendering of the question text.
Here is a screenshot. Note how the code block starts as expected until the underscore character and then turns into italic. I'm using Chrome on Windows 10.
Here is a link to the question: C# and T-SQL Insert User Defined Table into a another table not working
Let's see what happens if I copy-paste the code from that question here:
CREATE TYPE [dbo].[CSV_ADDProducts] AS TABLE(
[Product Item] [nvarchar](max) NULL,
[Product SKU] [bigint] NULL,
[Product Name] [nvarchar](max) NULL,
[Product Active] [nchar](10) NULL,
[Product Selling Price] [money] NULL,
[Product Description] [nvarchar](max) NULL,
[Product Purchase Description] [nvarchar](max) NULL,
[Product VAT Code ID] [bigint] NOT NULL,
[Product Last Update] [datetime] NULL
)
GO
It renders correctly in the preview as I'm typing this question. Let's see how it looks when I post the question...
It rendered fine.
Now, I've added a language lang-tsql
for the code block (as one of the tags in the original question) and I can see the same bug here on meta already in the preview of this question as I'm typing this.
My understanding is that lang-tsql
is a valid language hint that is listed in https://github.com/highlightjs/highlight.js/blob/master/SUPPORTED_LANGUAGES.md
sql-server
code should be rendered in italic ever, so it looks like a bug in the highlighter. I don't know if SO can fix how highlighter works. I don't know if this is something that they wrote themselves and can fix or they rely on third-party library that they can't change.sql-server
is a valid language tag, so it's trying to guess and making the same mistake as the other question. Yep, change it tolang-sql
and it works fine.