Skip to content

Commit

Permalink
fix: div with bg-color not being rendered
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnCampionJr committed Feb 5, 2024
1 parent 8da4b3b commit 562f7e0
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/Converters/Color.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,13 @@ public override void Build()
EachNode("*[class*=bg-]", node =>
{
// only do automatic thing for div
if (node.TagName != "div") return;

node.ClassList.Add("w-full");
if (node.TagName != "DIV") return;

var classes = node.ClassName;
node.Attributes.RemoveNamedItem("class");

var contents = node.InnerHtml;
node.Replace(TemplateNode("table", Doc, classes, contents));
node.Replace(TemplateNode("table", Doc, $"{classes} w-full", contents));
});

EachNode("*[class*=dark]", node =>
Expand Down

0 comments on commit 562f7e0

Please sign in to comment.