# Labels as markdown

**URL:** <https://meta.discourse.org/t/labels-as-markdown/60287>\
**Category:** Feature\
**Created:** [1. April 2017 um 16:29 UTC](https://meta.discourse.org/t/labels-as-markdown/60287 "2017-04-01T16:29:11Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![trudat](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/trudat/32/104354_2.png) [@trudat](https://meta.discourse.org/u/trudat)\
**Post date:** [1. April 2017 um 17:18 UTC](https://meta.discourse.org/t/labels-as-markdown/60287/3 "2017-04-01T17:18:17Z")

</div>

Sweet.

Looks like the function below is the one to edit. So if I rewrite the regex to recognize the tags `[label]` and `[/label]`, replace those by `<span class='cool_label'>` and `</span>`; then add the css class in the customization tab; that should do it right? Anything else I need to do to ensure html tags get rendered?

```
function piratize (text) {
  return text.replace(/\b(am|are|is)\b/ig, "be")
             .replace(/ing\b/ig, "in'")
             .replace(/v/ig, "'");
}

```

---

_[View the full topic](https://meta.discourse.org/t/labels-as-markdown/60287)._
