Markdown Vs. HTML Bold = 2 different weights

This might be a question for @tristan. When using a rich text component, bolding something using HTML and bolding something using markdown results in two different font weights. Can we standardize this? Preferably font-weight:600

3 Likes

Closing due to inactivity. This topic will be deleted in a few weeks if there are no more comments.

@tristan

This is still an issue:

1 Like

Closing due to inactivity. This topic will be deleted in a few weeks if there are no more comments.

@tristan…still an issue.

1 Like

I’m going to play devils advocate here because I’m not sure if this is a bug. I think it’s a case of double bolding. One of my pet peeves is unclosed html tags. For example, I see so many CSS examples with <pre><span><style> tags, but those tags are never closed with </style></span></pre> tags. In your example above, your <b> tag is not closed with a </b> tag so it applies a bold to all following text. Markdown language utlimately converts to html in the end, so markdown with **hello** is converted to <b>hello</b> when the markdown is rendered to html.

Take a look at this example. All bold tags are closed, but if you double bold, then you get a heavier font.
imageimage

Notice how leaving a tag unclosed affects everything after that tag.
imageimage

Closing your tags makes the font weight the same whether you use html or markdown.
imageimage

HTML tags should always be closed. It may work since html is very forgiving, but you can get unexpected results.

Edit: I see that your original post does appear to show differences, even with closed tags, so maybe something has changed since your original post??? I will also mention that I did test this in staging.

Edit2: I will retract my statement partially. Looking closer, I guess it renders the markdown into <strong>hello</strong> so maybe it depends on the how the browser wants to interpret it. Strong and Bold may render differently in some cases. I’m using chrome, so bold and strong both appear the same. Can’t vouch for safari. Regardless, it’s probably more of a browser issue if safari is rendering it with a different font weight, and it probably also depends on which markdown engine glide uses to render markdown to html. I’m not sure if different markdown engines render <strong> and some render <b> when ** is used.

5 Likes

Hm…I’ll need to do more tests…it does appear it could be a double building issue. Thanks @Jeff_Hager

2 Likes