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

v1.x has a bug where content of alerts like a list don't get displayed correctly, v2 fixes it #3

Closed
chrisweb opened this issue Dec 2, 2023 · 1 comment
Assignees

Comments

@chrisweb
Copy link
Owner

chrisweb commented Dec 2, 2023

v1.x has a bug where content of alerts like a list don't get displayed correctly

something like the following markdown was not displaying correctly in v1.x:

# note with a list

> [!NOTE]  
> - foo
> - bar
@chrisweb
Copy link
Owner Author

chrisweb commented Dec 2, 2023

v2.x just got released, the above markdown should now output the following HTML:

<h1>note with a list</h1>
<div class="markdown-alert markdown-alert-note"><p class="markdown-alert-title"><svg class="octicon octicon-info mr-2" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8Zm8-6.5a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13ZM6.5 7.75A.75.75 0 0 1 7.25 7h1a.75.75 0 0 1 .75.75v2.75h.25a.75.75 0 0 1 0 1.5h-2a.75.75 0 0 1 0-1.5h.25v-2h-.25a.75.75 0 0 1-.75-.75ZM8 6a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z"></path></svg>Note</p>
<ul>
<li>foo</li>
<li>bar</li>
</ul>
</div>

v2 fixes it

I also added a tests suite to verify the this case and other common cases

v2 also includes two new default alert types tip and caution

Tip

I'm a tip alert

Caution

I'm a caution alert

@chrisweb chrisweb self-assigned this Dec 2, 2023
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