Skip to content

Commit

Permalink
feat(wip): check if element should be printed on their own line
Browse files Browse the repository at this point in the history
  • Loading branch information
zackad committed Dec 13, 2024
1 parent 6717f20 commit 49f4721
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/print/Element.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { doc } from "prettier";
import {
removeSurroundingWhitespace,
isInlineElement,
isOwnlineElement,
printChildGroups,
EXPRESSION_NEEDED,
STRING_NEEDS_QUOTES
Expand Down Expand Up @@ -39,7 +40,9 @@ const p = (node, path, print) => {
const closingTag = ["</", node.name, ">"];
const result = [openingGroup];
const joinedChildren = childGroups;
if (isInlineElement(node)) {
if (isOwnlineElement(node)) {
result.push([joinedChildren]);
} else if (isInlineElement(node)) {
result.push(indent([softline, joinedChildren]), softline);
} else {
const childBlock = [];
Expand Down

0 comments on commit 49f4721

Please sign in to comment.