# 抓住并教育发布未正确格式化代码的用户

**URL:** https://meta.discourse.org/t/catch-and-educate-users-posting-code-without-properly-formatting-it/67958
**Category:** Feature
**Created:** [2017年八月13日 09:29 UTC](https://meta.discourse.org/t/catch-and-educate-users-posting-code-without-properly-formatting-it/67958 "2017-08-13T09:29:03Z")
**Posts on this page:** 1
**Showing post:** 27

<div class="post-metadata">

### Author: ![Jose\_C\_Gomez](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jose_c_gomez/32/137297_2.png) [@Jose\_C\_Gomez](https://meta.discourse.org/u/Jose_C_Gomez)
#### Post date: [2019年四月10日 19:22 UTC](https://meta.discourse.org/t/catch-and-educate-users-posting-code-without-properly-formatting-it/67958/27 "2019-04-10T19:22:18Z")

</div>

So I just did this for my site mostly as a joke , but it works well and it is effective (thus far)  
It doesn’t automatically catch the offenders, but when I (or any of the leaders) see it we set a tag on the post of “formatcode”  
Then this happens the next time that user logs in

 ![Format](https://global.discourse-cdn.com/meta/original/3X/0/e/0ed24f5e9437dbc4468fa0d7939c21bf771b6526.gif)  
It sticks around until they correct the problem and remove the tag, so far we’ve throw it at a few people and the code ALWAYS gets cleaned up. It only shows up for the author of the post.

Anyways I thought it was fun, I haven’t made a plugin out of it (I don’t have the time) but its fairly straight forward javascript. If someone wants it let me know and I’ll post it

---

_[View the full topic](https://meta.discourse.org/t/catch-and-educate-users-posting-code-without-properly-formatting-it/67958)._
