Code Snippets – Not showing line numbers/styling
-
Hi,
I’m trying to post code snippets in my site and they seem to indent but drop all styling and don’t show line numbers etc?
Is this to do with my selected theme or is there something I’m not doing right. I’ve tried inserting the code tags in the text editor and following the Posting Code Snippets guide but still not having any luck.
Regards,
Kevin
-
-
The first problem I can see is you’re using < and > to surround your code rather than brackets. Your code should look like this:
[code lang="powershell"]
$config.test
[/code]The post editor recognizes brackets, not traditional greater-than and less-than symbols to surround code.
I hope that helps! Let me know if you still have trouble. :)
-
Hey – yea that’s worked perfectly – I thought I’d tried that already but clearly hadn’t!
Thank you.
-
- The topic ‘Code Snippets – Not showing line numbers/styling’ is closed to new replies.