# Discourse中代码块格式问题——红色文本和意外高亮

**URL:** https://meta.discourse.org/t/issue-with-code-block-formatting-in-discourse-red-text-and-unintended-highlighting/321315
**Category:** Support
**Tags:** code
**Created:** [2024年八月12日 18:09 UTC](https://meta.discourse.org/t/issue-with-code-block-formatting-in-discourse-red-text-and-unintended-highlighting/321315 "2024-08-12T18:09:22Z")
**Posts on this page:** 1
**Showing post:** 24

<div class="post-metadata">

### Author: ![bryce](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bryce/32/377822_2.png) [@bryce](https://meta.discourse.org/u/bryce)
#### Post date: [2024年八月13日 16:46 UTC](https://meta.discourse.org/t/issue-with-code-block-formatting-in-discourse-red-text-and-unintended-highlighting/321315/24 "2024-08-13T16:46:10Z")

</div>

Ah, I also just noticed we do have an official theme component for customizing code block appearance:

> [@Custom Code](https://meta.discourse.org/t/custom-code/108059):
>
> discourse2Summary Custom Code allows you to customize the font and colors for source shared on the site.eyeglassesPreview [Preview on Discourse Theme Creator](https://discourse.theme-creator.io/theme/Discourse/custom-code)hammer_and_wrenchRepository Link [https://github.com/discourse/discourse-custom-code](https://github.com/discourse/discourse-custom-code)open_bookNew to Discourse Themes? [Beginner’s guide to using Discourse Themes](https://meta.discourse.org/t/beginners-guide-to-using-discourse-themes/91966) Install this theme component Features Generally, the fonts used to write code are part of the [monospace family](https://fonts.google.com/?category=Monospace). The most known fonts are: [Inc…](https://fonts.google.com/specimen/Inconsolata)

---

_[View the full topic](https://meta.discourse.org/t/issue-with-code-block-formatting-in-discourse-red-text-and-unintended-highlighting/321315)._
