Background
Unfortunately, some of the code shared online is not always well formated.
Markdown
Thankfully markdown offers a way to add code to blog posts and comments.
Convention
To add markdown, please prefix with three backticks ( “`) followed by the language.
Embed code.
And, closeout by adding the same three backticks ( “`).
Language Tags
Language | Language Designator |
---|---|
SQL | sql |
javascript | javascript |
C# | cs |
Python | py |
XML | xml |
Text | text |
Code
SQL – Transact SQL
Code
````sql create table [dbo].[member] ( [id] bigint not null identity(1,1) , [name] nvarchar(120) , [tsCreated] datetime not null default getdate() , [tsUpdated] datetime ) ````
Output
create table [dbo].[member] ( [id] bigint not null identity(1,1) , [name] nvarchar(120) , [tsCreated] datetime not null default getdate() , [tsUpdated] datetime )
Summary
Rather, unfortunately, WordPress often jumbles up markdowns while editing posts.