Closed kaushalmodi closed 2 years ago
The issue is definitely with the Hugo HTML generator, but it's a known behavior for quite some time.. that the markdown parser wraps the parsed text in <p>
tags.
But the fix seems easy from our side .. just export the verse blocks in <div>
tags instead of <p>
tags.
p.verse + p {
..
}
.verse {
..
}
Minimum reproducible export
Below Org snippet:
exports to this Markdown:
But the HTML generated by Hugo looks like:
What's the issue
The
.verse
class is not rendered in red color.Notice this part:
This is a problem because Hugo wraps the inside of
<p class="verse"> .. </p>
in another<p> .. </p>
tag. When that nested<p>
starts, it ends the scope of the outer<p class="verse">
tag. So any CSS applied top.verse
or.verse
will not get applied to the actual Verse content in the inner<p>
tag.Reference
@pdcawley
https://github.com/pdcawley/bofh.org.uk/commit/2a92c7cfdee34544947a40c49f89313396d41fba