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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-09-08 21:10:47 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-09-08 21:10:47 +0300
commit03a8aa2ca6a7d7aced2fde7815c8ef85d681db60 (patch)
tree915b00839e8f0ae30f1c6756880f3ed4339d74c4 /spec/frontend/content_editor
parentf8c7f38d02ebf964cbf40d9445f0f9f843710701 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/content_editor')
-rw-r--r--spec/frontend/content_editor/remark_markdown_processing_spec.js12
-rw-r--r--spec/frontend/content_editor/render_html_and_json_for_all_examples.js2
2 files changed, 14 insertions, 0 deletions
diff --git a/spec/frontend/content_editor/remark_markdown_processing_spec.js b/spec/frontend/content_editor/remark_markdown_processing_spec.js
index 61a6fd0debe..bc43af9bd8b 100644
--- a/spec/frontend/content_editor/remark_markdown_processing_spec.js
+++ b/spec/frontend/content_editor/remark_markdown_processing_spec.js
@@ -23,6 +23,7 @@ import Sourcemap from '~/content_editor/extensions/sourcemap';
import Strike from '~/content_editor/extensions/strike';
import Table from '~/content_editor/extensions/table';
import TableHeader from '~/content_editor/extensions/table_header';
+import TableOfContents from '~/content_editor/extensions/table_of_contents';
import TableRow from '~/content_editor/extensions/table_row';
import TableCell from '~/content_editor/extensions/table_cell';
import TaskList from '~/content_editor/extensions/task_list';
@@ -61,6 +62,7 @@ const tiptapEditor = createTestEditor({
TableRow,
TableHeader,
TableCell,
+ TableOfContents,
TaskList,
TaskItem,
Video,
@@ -98,6 +100,7 @@ const {
tableRow,
tableHeader,
tableCell,
+ tableOfContents,
taskItem,
taskList,
video,
@@ -130,6 +133,7 @@ const {
tableCell: { nodeType: TableCell.name },
tableHeader: { nodeType: TableHeader.name },
tableRow: { nodeType: TableRow.name },
+ tableOfContents: { nodeType: TableOfContents.name },
taskItem: { nodeType: TaskItem.name },
taskList: { nodeType: TaskList.name },
video: { nodeType: Video.name },
@@ -1294,6 +1298,14 @@ content
expectedDoc: doc(diagram({ ...source(markdown), language }, 'content')),
};
}),
+ {
+ markdown: '[[_TOC_]]',
+ expectedDoc: doc(tableOfContents(source('[[_TOC_]]'))),
+ },
+ {
+ markdown: '[TOC]',
+ expectedDoc: doc(tableOfContents(source('[TOC]'))),
+ },
];
const runOnly = examples.find((example) => example.only === true);
diff --git a/spec/frontend/content_editor/render_html_and_json_for_all_examples.js b/spec/frontend/content_editor/render_html_and_json_for_all_examples.js
index fc88c0ea445..bd48b7fdd23 100644
--- a/spec/frontend/content_editor/render_html_and_json_for_all_examples.js
+++ b/spec/frontend/content_editor/render_html_and_json_for_all_examples.js
@@ -34,6 +34,7 @@ import Table from '~/content_editor/extensions/table';
import TableCell from '~/content_editor/extensions/table_cell';
import TableHeader from '~/content_editor/extensions/table_header';
import TableRow from '~/content_editor/extensions/table_row';
+import TableOfContents from '~/content_editor/extensions/table_of_contents';
import TaskItem from '~/content_editor/extensions/task_item';
import TaskList from '~/content_editor/extensions/task_list';
import Video from '~/content_editor/extensions/video';
@@ -75,6 +76,7 @@ const tiptapEditor = createTestEditor({
TableCell,
TableHeader,
TableRow,
+ TableOfContents,
TaskItem,
TaskList,
Video,