# \#unformatted-code-detector

**URL:** https://meta.discourse.org/tag/unformatted-code-detector/678.md

[Latest](https://meta.discourse.org/latest.md) · [Categories](https://meta.discourse.org/categories.md) · [Tags](https://meta.discourse.org/tags.md)

---

## [Unformatted Code Detector](https://meta.discourse.org/t/unformatted-code-detector/112773)

<div class="topic-metadata">

**Author:** [@Discourse](https://meta.discourse.org/u/Discourse)\
**Replies:** 30\
**Last updated:** [July 4, 2026, 8:17am UTC](https://meta.discourse.org/t/unformatted-code-detector/112773 "2026-07-04T08:17:02Z")

</div>

:discourse2: Summary Unformatted Code Detector detects unformatted code and gives a warning before posting. :eyeglasses: Preview Preview on Discourse Theme Creator :hammer\_and\_wrench: Repository Link http…

---

## [Unformatted Code Detector warning even when the post \*does\* use formatting blocks](https://meta.discourse.org/t/unformatted-code-detector-warning-even-when-the-post-does-use-formatting-blocks/353696)

<div class="topic-metadata">

**Author:** [@supermathie](https://meta.discourse.org/u/supermathie)\
**Replies:** 0\
**Last updated:** [February 21, 2025, 9:40pm UTC](https://meta.discourse.org/t/unformatted-code-detector-warning-even-when-the-post-does-use-formatting-blocks/353696 "2025-02-21T21:40:03Z")

</div>

Are you posting code? Yes… I am… and yes, I’m using code blocks. This warning should not show when the user is already using the blocks. Here is more or less what my post was: The change is: adding back the s…

---

## [Can the Unformatted Code Detector be disabled per user?](https://meta.discourse.org/t/can-the-unformatted-code-detector-be-disabled-per-user/319263)

<div class="topic-metadata">

**Author:** [@another\_username](https://meta.discourse.org/u/another_username)\
**Replies:** 9\
**Last updated:** [July 29, 2024, 6:57pm UTC](https://meta.discourse.org/t/can-the-unformatted-code-detector-be-disabled-per-user/319263 "2024-07-29T18:57:54Z")

</div>

Users posting unformatted code will see a warning message instructing them how to format it correctly. :triangular\_flag\_on\_post: Not a fan of content detection… Will users be able to disable this or is it going to be …

---

## [Resetting the Unformatted Code Detector per user/for all users?](https://meta.discourse.org/t/resetting-the-unformatted-code-detector-per-user-for-all-users/319268)

<div class="topic-metadata">

**Author:** [@Hubbe](https://meta.discourse.org/u/Hubbe)\
**Replies:** 0\
**Last updated:** [January 22, 2024, 6:09am UTC](https://meta.discourse.org/t/resetting-the-unformatted-code-detector-per-user-for-all-users/319268 "2024-01-22T06:09:39Z")

</div>

So if a user checks “don’t show this again”, how do they get it back? Also, is there a way for admins to reset that setting for all users?

---

## [Prompt to encourage users to post text instead of screenshots of code](https://meta.discourse.org/t/prompt-to-encourage-users-to-post-text-instead-of-screenshots-of-code/319266)

<div class="topic-metadata">

**Author:** [@George\_White](https://meta.discourse.org/u/George_White)\
**Replies:** 0\
**Last updated:** [October 25, 2023, 2:32pm UTC](https://meta.discourse.org/t/prompt-to-encourage-users-to-post-text-instead-of-screenshots-of-code/319266 "2023-10-25T14:32:41Z")

</div>

This works for people attempting to post text, but there are many new users posting screen captures or pictures taken with a portable device. Maybe first image posts should trigger an explanation of the benefits of post…

---

## [Unformatted Code Detector not recognising indented codeblock](https://meta.discourse.org/t/unformatted-code-detector-not-recognising-indented-codeblock/319265)

<div class="topic-metadata">

**Author:** [@JammyDodger](https://meta.discourse.org/u/JammyDodger)\
**Replies:** 0\
**Last updated:** [August 14, 2023, 10:23am UTC](https://meta.discourse.org/t/unformatted-code-detector-not-recognising-indented-codeblock/319265 "2023-08-14T10:23:36Z")

</div>

I’ve just encountered an issue with trying to edit a post with an indented codeblock. It appears this theme component does not like that style anymore and insisted on backticks.

---

## [Recognising unformatted JSON?](https://meta.discourse.org/t/recognising-unformatted-json/319267)

<div class="topic-metadata">

**Author:** [@jordan-violet](https://meta.discourse.org/u/jordan-violet)\
**Replies:** 0\
**Last updated:** [July 29, 2022, 2:27pm UTC](https://meta.discourse.org/t/recognising-unformatted-json/319267 "2022-07-29T14:27:03Z")

</div>

Does this also check for unformatted JSON? I’ve installed this theme component and added it to my theme, then tested with code examples (like the example in the gif) as well as JSON and I cannot get it to detect and warn…

---

## [Emojis trigger code detector and 'fix code' doesn't work](https://meta.discourse.org/t/emojis-trigger-code-detector-and-fix-code-doesnt-work/319264)

<div class="topic-metadata">

**Author:** [@seanblue](https://meta.discourse.org/u/seanblue)\
**Replies:** 1\
**Last updated:** [May 18, 2021, 8:40am UTC](https://meta.discourse.org/t/emojis-trigger-code-detector-and-fix-code-doesnt-work/319264 "2021-05-18T08:40:04Z")

</div>

I tried posting the following: That’s Japanese. :wink: Funny bug though. Then I got a popup saying the post might contain code. I was curious, so I clicked the “Fix Code” button, but nothing actually happened. It’s …

---

## [Recognising logs as code?](https://meta.discourse.org/t/recognising-logs-as-code/319269)

<div class="topic-metadata">

**Author:** [@tophee](https://meta.discourse.org/u/tophee)\
**Replies:** 2\
**Last updated:** [June 17, 2019, 10:04pm UTC](https://meta.discourse.org/t/recognising-logs-as-code/319269 "2019-06-17T22:04:21Z")

</div>

Great! Will this recognize logs as “code”? If not consider this a feature request. How do you identify an extract from a log-file? I guess it would suffice to look for a date/time at the beginning of two consecutive l…
