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

Inline code within heading generates unexpected HTML if it contains matching braces #231

Open
russplaysguitar opened this issue Feb 22, 2022 · 1 comment

Comments

@russplaysguitar
Copy link

russplaysguitar commented Feb 22, 2022

Description

The HTML generated by MarkdownEditor 1.12.253 when using inline code containing matching braces within a heading is not the same as the Markdig HTML output and appears to be incorrect in general.

Steps to reproduce

  1. Create an .md file in Visual Studio that has a heading with inline code that contains matching braces. For example:
### `GET /foo/bar/{baz}`
  1. Open the HTML file generated by MarkdownEditor

Expected behavior: HTML should be like:

<h3>
  <code>
    GET /foo/bar/{baz}
  </code>
</h3>

Actual behavior: HTML is like:

<h3 id="get-foobar" baz>`GET /foo/bar/</h3>

Notice baz has been moved into the heading tag.

Observations: This occurs for all heading levels (1 through 5). Compare with Markdig output here: https://babelmark.github.io/?text=%23%23%23+%60GET+%2Ffoo%2Fbar%2F%7Bbaz%7D%60. I tried a few ideas but was unable to determine a workaround.

@russplaysguitar
Copy link
Author

On closer review of the Markdig output, I noticed that the output of "markdig (advanced) 0.26.0.0C#" does have the same error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant