shd101wyy / vscode-markdown-preview-enhanced

One of the "BEST" markdown preview extensions for Visual Studio Code
https://shd101wyy.github.io/markdown-preview-enhanced
Other
1.43k stars 172 forks source link

Bug: some font-awesome icons do not render in Mermaid diagrams (others do). Verified not a Mermaid bug. #511

Open thegoatherder opened 3 years ago

thegoatherder commented 3 years ago

Describe the bug Numerous font-awesome icons fail to render in Mermaid diagrams. Initially it looked like the issue was affecting all icons containing multiple - characters - however, I've just found that fa:fa-battery-full is working, so no longer sure what is causing this.

To Reproduce Create a mermaid diagram using the following code:

graph TD
    subgraph Working Icons
        a[fa:fa-user]
        b[fa:fa-users]
        c[fa:fa-database]
        d[fa:fa-lock]
        e[fa:fa-table]
        f[fa:fa-comments]
        g[fa:fa-battery-full]
    end
    subgraph Broken Icons
        h[fa:fa-chart-line]
        i[fa:fa-chart-pie]
        j[fa:fa-chart-bar]
        k[fa:fa-luggage-cart]
    end

Expected behavior All icons in the code sample should render with their corresponding fa-icon (assuming the icon is in the free font awesome library, not Pro).

This is working in the Mermaid Live Preview, but not in the Markdown Preview Enhanced extension.

Screenshots image

Version Information

aranwe commented 3 months ago

Stylesheet for font-awesome needs to be included as per the docs.