baynezy/Html2Markdown

ul-li elements not handled correctly

Closed this issue · 3 comments

Report issue

Tags inside li elements are not being converted. Unnecessary whitespace is also being produced.

Expected behavior

<ul>
    <li itemprop="itemListElement" itemscope="" itemtype="http://schema.org/ListItem">
              <p>Addresses a known issue that <b class="ocpLegacyBold"><u class="ocpUnderline">only affects Windows Arm-based devices</u></b> and might prevent you from signing in using Azure Active Directory (AAD). Apps and services that use AAD to sign in, such as VPN connections, Microsoft Teams, and Microsoft Outlook, might also be affected.</p>     
            <meta itemprop="position" content="1">
    </li>
  </ul>

-should be

* Addresses a known issue that **_only affects Windows Arm-based devices_** and might prevent you from signing in using Azure Active Directory (AAD). Apps and services that use AAD to sign in, such as VPN connections, Microsoft Teams, and Microsoft Outlook, might also be affected.

Actual Behaviour

*   

Addresses a known issue that <b class="ocpLegacyBold"><u class="ocpUnderline">only affects Windows Arm-based devices</u>** and might prevent you from signing in using Azure Active Directory (AAD). Apps and services that use AAD to sign in, such as VPN connections, Microsoft Teams, and Microsoft Outlook, might also be affected.</b>

  

Steps to reproduce the problem

Convert-

<ul>
    <li itemprop="itemListElement" itemscope="" itemtype="http://schema.org/ListItem">
              <p>Addresses a known issue that <b class="ocpLegacyBold"><u class="ocpUnderline">only affects Windows Arm-based devices</u></b> and might prevent you from signing in using Azure Active Directory (AAD). Apps and services that use AAD to sign in, such as VPN connections, Microsoft Teams, and Microsoft Outlook, might also be affected.</p>     
            <meta itemprop="position" content="1">
    </li>
  </ul>

Thanks for adding this issue @Viajaz - I see the problem. However, there are a couple of things here to consider.

Firstly, the <u> tag does not have an equivalent in Markdown. So you cannot just convert it to an underscore.

Secondly, I might need to complete #45 before I can replace paragraph tags differently if they are in a <li>

This issue is stale because it has been open for 30 days with no activity.

This issue was closed because it has been inactive for 14 days since being marked as stale.