# Rendering text between \< and \>

**URL:** https://meta.discourse.org/t/rendering-text-between-and/64314
**Category:** Support
**Tags:** markdown-it-review
**Created:** [11 Giugno 2017, 2:12pm UTC](https://meta.discourse.org/t/rendering-text-between-and/64314 "2017-06-11T14:12:17Z")
**Posts on this page:** 14
**Page:** 1

<div class="post-metadata">

### Author: ![RBoy](https://avatars.discourse-cdn.com/v4/letter/r/2bfe46/32.png) [@RBoy](https://meta.discourse.org/u/RBoy)
#### Post date: [11 Giugno 2017, 2:12pm UTC](https://meta.discourse.org/t/rendering-text-between-and/64314/1 "2017-06-11T14:12:17Z")

</div>

I understand that Discourse is CommonMark complaint, so I took the suggestion of one of the threads to use html2commonmark to try and migrate a few posts.

I’ve noticed some issues:

Rending this:

```plaintext
*\<enc\>-vid*

```

Doesn’t render properly, the “encoder” is missing all together and renders as:

> _\<enc\>-vid_

One needs to put a space after the \< for it to render properly

```plaintext
*\< enc\>-vid*

```

Renders as:

> _\< enc\>-vid_

EDIT: Any workaround for now on how to get it to render without including a space?

---

<div class="post-metadata">

### Author: ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)
#### Post date: [11 Giugno 2017, 2:16pm UTC](https://meta.discourse.org/t/rendering-text-between-and/64314/2 "2017-06-11T14:16:28Z")

</div>

Use `&lt;enc>-vid` which produces \<enc\>-vid

---

<div class="post-metadata">

### Author: ![RBoy](https://avatars.discourse-cdn.com/v4/letter/r/2bfe46/32.png) [@RBoy](https://meta.discourse.org/u/RBoy)
#### Post date: [11 Giugno 2017, 2:18pm UTC](https://meta.discourse.org/t/rendering-text-between-and/64314/3 "2017-06-11T14:18:30Z")

</div>

Thanks I’m assuming that’s the workaround I asked for. Would this issue be fixed to be compliant with the commonmark syntax? I have a lot of references to this type of issue on the pages I’m converting using the html2commonmark tool.

---

<div class="post-metadata">

### Author: ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)
#### Post date: [11 Giugno 2017, 2:31pm UTC](https://meta.discourse.org/t/rendering-text-between-and/64314/4 "2017-06-11T14:31:09Z")

</div>

Unfortunately no. Commonmark supports the embedding of HTML markup inside it. So when using phrases with `<` and `>` around them, you must escape one of them for it to be shown or put it in backticks

---

<div class="post-metadata">

### Author: ![RBoy](https://avatars.discourse-cdn.com/v4/letter/r/2bfe46/32.png) [@RBoy](https://meta.discourse.org/u/RBoy)
#### Post date: [11 Giugno 2017, 2:33pm UTC](https://meta.discourse.org/t/rendering-text-between-and/64314/5 "2017-06-11T14:33:51Z")

</div>

> [@cpradio](#):
>
> So when using phrases with \< and \> around them, you must escape one of them for it to be shown

The tool escaped both the `<` and `>` but it doesnt seem to show (see above). Even if only one is escaped it doesn’t show up. It only shows up if there is a `space` after the first `<`. For some reason the entire text between the `<` and `>` goes missing. Is that expected?

---

<div class="post-metadata">

### Author: ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)
#### Post date: [11 Giugno 2017, 2:48pm UTC](https://meta.discourse.org/t/rendering-text-between-and/64314/6 "2017-06-11T14:48:07Z")

</div>

You can’t escape `<` using \

You have to use the entity or put it in `

\ can only escape markdown syntax

---

<div class="post-metadata">

### Author: ![RBoy](https://avatars.discourse-cdn.com/v4/letter/r/2bfe46/32.png) [@RBoy](https://meta.discourse.org/u/RBoy)
#### Post date: [11 Giugno 2017, 2:52pm UTC](https://meta.discourse.org/t/rendering-text-between-and/64314/7 "2017-06-11T14:52:56Z")

</div>

Okay got that, I’m still missing 2 things:

1. If commonmark allows for HTML markup, are you saying that `<` is considered HTML mark up hence it’s needs to be `&lt;` instead? If so then why is it that this works `< enc>` but not `<enc>` to show the `<`
2. Why is the text between the `<` and `>` disappearing but show up when there is a space?

Maybe I’m missing something here but it’s not clear why the space is making such a difference overall.

---

<div class="post-metadata">

### Author: ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)
#### Post date: [11 Giugno 2017, 2:55pm UTC](https://meta.discourse.org/t/rendering-text-between-and/64314/8 "2017-06-11T14:55:49Z")

</div>

> [@RBoy](#):
>
> If commonmark allows for HTML markup, are you saying that \< is considered HTML mark up hence it’s needs to be \< instead? If so then why is it that this works \< enc\> but not \<enc\> to show the \<

Yes. The latter (with a space) isn’t valid html, thus it doesn’t get parsed.

> [@RBoy](#):
>
> Why is the text between the \< and \> disappearing but show up when there is a space

See my response above

---

<div class="post-metadata">

### Author: ![RBoy](https://avatars.discourse-cdn.com/v4/letter/r/2bfe46/32.png) [@RBoy](https://meta.discourse.org/u/RBoy)
#### Post date: [11 Giugno 2017, 3:03pm UTC](https://meta.discourse.org/t/rendering-text-between-and/64314/9 "2017-06-11T15:03:19Z")

</div>

So when I run the same markup through [commonmark.js demo](http://spec.commonmark.org/dingus/)

It works fine, would you say that is a bug in the interactive markup editor on the specifications website or is there something else going on here?

EDIT: Is `<enc>` valid HTML? Just wondering why html2commonmark AND the commonmark specifications website both consider this valid commonmark code?

---

<div class="post-metadata">

### Author: ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)
#### Post date: [11 Giugno 2017, 3:37pm UTC](https://meta.discourse.org/t/rendering-text-between-and/64314/10 "2017-06-11T15:37:42Z")

</div>

Any tag can be valid html, depending on the schema referenced. However, discourse is not currently making use of the commonmark spec.

It will be soon though. So this may become a non issue in a few more weeks.

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [11 Giugno 2017, 3:38pm UTC](https://meta.discourse.org/t/rendering-text-between-and/64314/11 "2017-06-11T15:38:01Z")

</div>

Read

> [@Discourse CommonMark migration plans confetti\_ball balloon](https://meta.discourse.org/t/discourse-commonmark-migration-plans-confetti-ball-balloon/64234):
>
> I have commenced our migration to [markdown-it](https://github.com/markdown-it/markdown-it) , all rejoice confetti_ball markdown-it is a compliant CommonMark JavaScript library that is super fast, well maintained and straight forward to extend. I already have it working on a branch, but so many of our extensions are broken that I do not want to subject everyone on meta to it quite yet. The plan Phase 1 - get this running on meta (underway) The first phase of the migration to the new engine is getting us ready to turn markdown-it on at …

Test on

[https://markdown-it.discourse.org/t/dont-freak-out-you-are-now-logged-in/15](https://markdown-it.discourse.org/t/dont-freak-out-you-are-now-logged-in/15)

Odds are this is fixed there, really no point discussing this unless also an issue there.

---

<div class="post-metadata">

### Author: ![RBoy](https://avatars.discourse-cdn.com/v4/letter/r/2bfe46/32.png) [@RBoy](https://meta.discourse.org/u/RBoy)
#### Post date: [11 Giugno 2017, 3:41pm UTC](https://meta.discourse.org/t/rendering-text-between-and/64314/12 "2017-06-11T15:41:45Z")

</div>

Excellent, I did see that thread before posting but wasn’t sure if this would be addressed. Looks like it’s working great there.

Thanks!

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [26 Giugno 2017, 12:56pm UTC](https://meta.discourse.org/t/rendering-text-between-and/64314/13 "2017-06-26T12:56:00Z")

</div>

We now have the new engine enabled on meta, will take a few more weeks prior to it being rolled out globally.

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [26 Giugno 2017, 12:56pm UTC](https://meta.discourse.org/t/rendering-text-between-and/64314/14 "2017-06-26T12:56:03Z")

</div>


