Skip to content

Commit

Permalink
fix: use yaml style when component has one or more named slot
Browse files Browse the repository at this point in the history
  • Loading branch information
farnabaz committed Nov 28, 2023
1 parent e776b04 commit 2b3218b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/to-markdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export default (opts: RemarkMDCOptions = {}) => {
let value = prefix + (node.name || '') + label(node, context)
const attributesText = attributes(node, context)
const fmAttributes = node.fmAttributes || {}
if ((value + attributesText).length > 80 || Object.keys(fmAttributes).length > 0) {
if ((value + attributesText).length > 80 || Object.keys(fmAttributes).length > 0 || node.children?.some(child => child.type === 'componentContainerSection')) {
Object.assign(fmAttributes, (node as any).attributes)
} else {
value += attributes(node, context)
Expand Down

0 comments on commit 2b3218b

Please sign in to comment.