HTML to Markdown support font styles (CSS) weight: 700+, "bold" and "bolder"

Use case or problem

I was copying text from a website using text with span class with style > font-weight: 700 instead of <strong>, but it lost the bold formatting.

Demo:

A website with this raw HTML (I cannot, unfortunately, paste the non-raw HTML as this board will remove the styles):

<b>b</b><br>
<strong>strong</strong><br>
<span style="font-weight: 699;">699</span><br>
<span style="font-weight: 700;">700</span><br>
<span style="font-weight: bold;">bold</span><br>
<span style="font-weight: bolder;">bolder</span><br>

copied into Obsidian will give:

b
strong
699
700
bold
bolder

or the equivalent raw:

**b**
**strong**
699
700
bold
bolder

Proposed solution

Interpret font-weight: 700 (or higher value), bold and bolder as bold (replaced with **text** in Markdown).

Current workaround (optional)

I must first copy the HTML to Typora, which supports it, then copy it back to Obsidian.

Related feature requests (optional)

This was originally a bug report:

But apparently this was simply never implemented.

1 Like

I can reproduce this. Obsidian doesn’t recognise CSS font-weight property when making conversions from html.

This file can be used for testing:

<!DOCTYPE html>
<html>
<body>
    <b>b</b><br>
    <strong>strong</strong><br>
    <span style="font-weight: 699;">699</span><br>
    <span style="font-weight: 700;">700</span><br>
    <span style="font-weight: bold;">bold</span><br>
    <span style="font-weight: bolder;">bolder</span><br>
</body>
</html>