Skip to content

Commit

Permalink
fix: keep default slot definition if slot has attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
farnabaz committed Nov 26, 2024
1 parent 9da1c52 commit e6c86e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/from-markdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ export default (opts: RemarkMDCOptions = {}) => {
if (child.rawData) {
return []
}
if (child.name === 'default' || !child.name) {
if ((child.name === 'default' && Object.keys(child.attributes).length === 0) || !child.name) {
// Project default slot unwrap state to parent
if (child.mdc?.unwrapped) {
container.mdc = container.mdc || {}
Expand Down

0 comments on commit e6c86e8

Please sign in to comment.