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

table.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: c766f7f1fba21093957f68b483b107c4991d3463 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// Transforms generated HTML back to GFM for Banzai::Filter::MarkdownFilter
export default () => ({
  name: 'table',
  schema: {
    content: 'table_head table_body',
    group: 'block',
    isolating: true,
    parseDOM: [{ tag: 'table' }],
    toDOM: () => ['table', 0],
  },
  toMarkdown(state, node) {
    state.renderContent(node);
    state.closeBlock(node);
  },
});