Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MD preview does not show backslashes #653

Closed
dst-RobertKnienider opened this issue Aug 22, 2022 · 2 comments
Closed

MD preview does not show backslashes #653

dst-RobertKnienider opened this issue Aug 22, 2022 · 2 comments
Labels

Comments

@dst-RobertKnienider
Copy link

Source
This bug was initially reported as madskristensen/MarkdownEditor2022#70.
madskristensen asked me to post it here, as "This is the rendering component that the extension uses to render the HTML from the markdown source file."

Describe the bug
MarkdownEditor2022 preview does not show backslashes the same way Azure DevOps and Visual Studio Code do.
Tested with Visual Studio Professional 2022 (64-bit) Version 17.3.1.

To Reproduce
Preview attached minimal markdown file README.md with MarkdownEditor2022 and Azure DevOps and and Visual Studio Code respectively.

Expected behavior
MarkdownEditor2022 preview shows backslashes the same way Azure DevOps and Visual Studio Code do.

Screenshots

  • MarkdownEditor2022 (VS 17.3.1) preview
    grafik

  • Azur DevOps preview
    grafik

  • Visual Studio Code (1.70.1 6d9b74a) preview
    grafik

Motivation
Documenting Infrasctructure as Code I want to be able to read and copy Windows and UNC paths from Markdown, e.g. within PowerShell commands.

@xoofx
Copy link
Owner

xoofx commented Aug 22, 2022

So the following markdown is producing the correct output for Markdig here (look for markdig (advanced))

Backslash in Markdown Previews

|Count|Code|Markup|
|:--|:--|:--|
|Single|inside| `\` |
|Single|outside| \ |
|Double|inside| `\\` |
|Double|outside| \\ |

Markdig HTML output

<p>
  Backslash in Markdown Previews
</p>
<table>
  <thead>
    <tr>
      <th style="text-align: left;">
        Count
      </th>
      <th style="text-align: left;">
        Code
      </th>
      <th style="text-align: left;">
        Markup
      </th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td style="text-align: left;">
        Single
      </td>
      <td style="text-align: left;">
        inside
      </td>
      <td style="text-align: left;">
        <code>
          \
        </code>
      </td>
    </tr>
    <tr>
      <td style="text-align: left;">
        Single
      </td>
      <td style="text-align: left;">
        outside
      </td>
      <td style="text-align: left;">
        \
      </td>
    </tr>
    <tr>
      <td style="text-align: left;">
        Double
      </td>
      <td style="text-align: left;">
        inside
      </td>
      <td style="text-align: left;">
        <code>
          \\
        </code>
      </td>
    </tr>
    <tr>
      <td style="text-align: left;">
        Double
      </td>
      <td style="text-align: left;">
        outside
      </td>
      <td style="text-align: left;">
        \
      </td>
    </tr>
  </tbody>
</table>

So the HTML output from Markdig looks correct to me. I don't know why MarkdownEditor2022 is displaying something different, but looks more a bug there (sorry for the ping-pong!)

@xoofx xoofx added the question label Aug 22, 2022
@dst-RobertKnienider
Copy link
Author

Thanks for the immediate response!
I'll switch serving side again ;-)

@xoofx xoofx closed this as completed Sep 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants