-
Notifications
You must be signed in to change notification settings - Fork 175
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
Question about list with tight option enabled #298
Comments
Please create and link to a fully runnable example e.g. on https://onlinetool.io/goplayground/ Also provide more context about what you expect and why. Just looking at the code:
|
@kjk Here is the example: https://onlinetool.io/goplayground/#avoxF4PMHIf <p class="my-4">Asterisks loose:</p>
<ul class="list-inside list-disc marker:text-emerald-500">
<li>asterisk 1</li>
<li>asterisk 2</li>
<li>asterisk 3</li>
</ul> |
The problem is in your See https://github.com/gomarkdown/markdown/blob/master/html/renderer.go#L596C2-L606C2 There's logic to skip You must do: func paragraph(w io.Writer, x *ast.Paragraph, entering bool) {
if html.SkipParagraphTags(x) {
return
}
if entering {
io.WriteString(w, `<p class="my-4">`)
} else {
io.WriteString(w, "</p>")
}
} See fixed example: https://onlinetool.io/goplayground/#C8hhoeyINje |
Thx for the help 💯 . |
Hello there,
I'm trying to skip paragraph into a list of items with this sample code:
The source is like:
and the result is:
instead of:
What do I miss?
Thx.
PS: Sorry to open an issue as
Discussions
is not enabled here.The text was updated successfully, but these errors were encountered: