Skip to content

Commit

Permalink
feat(micromark/syntax): support any number of space before summary text
Browse files Browse the repository at this point in the history
  • Loading branch information
Ahacad committed Jul 14, 2021
1 parent 3f29b74 commit 975775e
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions micromark-extension-details/syntax.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,18 +74,20 @@ function tokenizeDetailsContainer(effects, ok, nok) {
effects.enter('detailsExpanded');
effects.consume(code);
effects.exit('detailsExpanded');
} else if (code === codes.space) {
effects.consume(code);
} else {
} else if (code !== codes.space) {
return nok(code);
}
effects.exit('detailsContainerFence');
return factorySummary.call(
self,
return factorySpace(
effects,
factorySpace(effects, afterSummary, types.whitespace),
nok,
'detailsContainerSummary',
factorySummary.call(
self,
effects,
factorySpace(effects, afterSummary, types.whitespace),
nok,
'detailsContainerSummary',
),
types.whitespace,
);
}
/** @type {State} */
Expand Down

0 comments on commit 975775e

Please sign in to comment.