handmade.network » Forums » Site Feedback » better code block
mrmixer
Simon Anciaux
419 posts
#15881 better code block
3 weeks, 2 days 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.
Example
1
2
[ code ]code[ /code ]
There is a line before me

There is a line before me
1
[ code ]code[ /code ]There isn't a line before me
There isn't a line before me
[email protected]
Ben Visness
23 posts

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

#15882 better code block
3 weeks, 2 days 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.