Welcome to mirror list, hosted at ThFree Co, Russian Federation.

summary.js « nodes « markdown « behaviors « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: eb91b3c981e1f15cde5f9a9de3db7bd43f1a0455 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Transforms generated HTML back to GFM for Banzai::Filter::MarkdownFilter
export default () => ({
  name: 'summary',
  schema: {
    content: 'text*',
    marks: '',
    defining: true,
    parseDOM: [{ tag: 'summary' }],
    toDOM: () => ['summary', 0],
  },
  toMarkdown(state, node) {
    state.write('<summary>');
    state.text(node.textContent, false);
    state.write('</summary>');
    state.closeBlock(node);
  },
});