backstage / mkdocs-techdocs-core

The core MkDocs plugin used by Backstage's TechDocs as a wrapper around multiple MkDocs plugins and Python Markdown extensions
Apache License 2.0
85 stars 61 forks source link

bug: not working with markdown_extensions : md_in_html #39

Closed kim5566 closed 10 months ago

kim5566 commented 2 years ago

Bug: Should remove trailing whitespace in HTML tags.

site_name: test

nav:
  - 'index.md'

plugins:
  - techdocs-core
markdown_extensions:
  - md_in_html

I have markdown content inside HTML tag. For example, the following:

<div markdown="1">

This is a *Markdown* Paragraph.

</div>

...is rendered as:

<div>
<p>This is a <em>Markdown</em> Paragraph.</p>
</div>

However, it breaks when there's trailing whitespace

For example, the following:

<div markdown = "1">

This is a *Markdown* Paragraph.

</div>

...is rendered as:

<div>
<p>= "1"&gt;</p>
<p>This is a <em>Markdown</em> Paragraph.</p>
</div>

Expected behavior:

Should be rendered as:

<div>
<p>This is a <em>Markdown</em> Paragraph.</p>
</div>

Context:

techdocs-cli --version 0.7.0

Note

This seems not to be a bug of mkdocs. If I run mkdocs:serve (version 1.2.2), I get the expected behaviour. Only happens if I run techdocs-cli serve:mkdocs

github-actions[bot] commented 10 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.