Register»Forums»Site Feedback»better code block
Simon Anciaux
794 posts
better code block
1 year, 10 months ago Edited by Simon Anciaux on July 27, 2018, 2:52 p.m. Reason: typo
It would be great if the blocks of code would be better presented. For example:

  • Ideally I would like the site to use most of the horizontal space available. In blog posts only a third of the space is used. I don't find that to be a problem for reading text, but for code it's really annoying.
  • You can see that the height of the code block is the height of the web page. That makes it harder than necessary to get the horizontal scrollbar in view;
  • The syntax highlighting problems;
  • When adding code tags (or quote) in comments, a new line just after the closing code tag creates a gap under the code block. If you don't want the gap you need to add the text directly after the closing tag.
[ code ]code[ /code ]
There is a line before me

There is a line before me
[ code ]code[ /code ]There isn't a line before me
There isn't a line before me
Ben Visness
48 posts

HMN technical staff, Handmade Math contributor, web developer, etc.

better code block
1 year, 10 months ago
Hey thanks for the feedback! We're working on improving the bbcode experience right now, so I'll add your points to our list.

I think you will be pleased to know that when our bbcode changes go live, you will be able to explicitly select which language to use for syntax highlighting. That should help in those situations when pygments guesses wrong.