diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-03-18 20:02:30 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-03-18 20:02:30 +0000 |
commit | 41fe97390ceddf945f3d967b8fdb3de4c66b7dea (patch) | |
tree | 9c8d89a8624828992f06d892cd2f43818ff5dcc8 /app/assets/javascripts/behaviors/markdown/nodes/table_head.js | |
parent | 0804d2dc31052fb45a1efecedc8e06ce9bc32862 (diff) | |
download | gitlab-ce-41fe97390ceddf945f3d967b8fdb3de4c66b7dea.tar.gz |
Add latest changes from gitlab-org/gitlab@14-9-stable-eev14.9.0-rc42
Diffstat (limited to 'app/assets/javascripts/behaviors/markdown/nodes/table_head.js')
-rw-r--r-- | app/assets/javascripts/behaviors/markdown/nodes/table_head.js | 30 |
1 files changed, 10 insertions, 20 deletions
diff --git a/app/assets/javascripts/behaviors/markdown/nodes/table_head.js b/app/assets/javascripts/behaviors/markdown/nodes/table_head.js index 4cb94bf088c..2e9b53ee0ac 100644 --- a/app/assets/javascripts/behaviors/markdown/nodes/table_head.js +++ b/app/assets/javascripts/behaviors/markdown/nodes/table_head.js @@ -1,24 +1,14 @@ -/* eslint-disable class-methods-use-this */ - -import { Node } from 'tiptap'; - // Transforms generated HTML back to GFM for Banzai::Filter::MarkdownFilter -export default class TableHead extends Node { - get name() { - return 'table_head'; - } - - get schema() { - return { - content: 'table_header_row', - parseDOM: [{ tag: 'thead' }], - toDOM: () => ['thead', 0], - }; - } - - toMarkdown(state, node) { +export default () => ({ + name: 'table_head', + schema: { + content: 'table_header_row', + parseDOM: [{ tag: 'thead' }], + toDOM: () => ['thead', 0], + }, + toMarkdown: (state, node) => { state.flushClose(1); state.renderContent(node); state.closeBlock(node); - } -} + }, +}); |