Skip to content

Commit

Permalink
feat(micromark/summary): support markdown in summary
Browse files Browse the repository at this point in the history
  • Loading branch information
Ahacad committed Jul 16, 2021
1 parent 1eb9fd0 commit 7acb495
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions micromark-extension-details/factory-summary.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { markdownLineEnding, markdownSpace } from 'micromark-util-character';
import { codes } from 'micromark-util-symbol/codes.js';
import { constants } from 'micromark-util-symbol/constants.js';
import { types } from 'micromark-util-symbol/types.js';

export function factorySummary(effects, ok, nok, type) {
const self = this;
Expand All @@ -9,7 +11,9 @@ export function factorySummary(effects, ok, nok, type) {
function start(code) {
if (!markdownLineEnding(code)) {
effects.enter(type);
effects.enter('chunkString', { contentType: 'string' });
effects.enter(types.chunkContent, {
contentType: constants.contentTypeContent,
});
effects.consume(code);
return summary;
}
Expand All @@ -21,7 +25,7 @@ export function factorySummary(effects, ok, nok, type) {
return summary;
}

effects.exit('chunkString');
effects.exit(types.chunkContent);
effects.exit(type);
return ok(code);
}
Expand Down

0 comments on commit 7acb495

Please sign in to comment.