summaryrefslogtreecommitdiff
path: root/spec/fixtures/lib/kramdown
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-07-20 12:26:25 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-07-20 12:26:25 +0000
commita09983ae35713f5a2bbb100981116d31ce99826e (patch)
tree2ee2af7bd104d57086db360a7e6d8c9d5d43667a /spec/fixtures/lib/kramdown
parent18c5ab32b738c0b6ecb4d0df3994000482f34bd8 (diff)
downloadgitlab-ce-a09983ae35713f5a2bbb100981116d31ce99826e.tar.gz
Add latest changes from gitlab-org/gitlab@13-2-stable-ee
Diffstat (limited to 'spec/fixtures/lib/kramdown')
-rw-r--r--spec/fixtures/lib/kramdown/atlassian_document_format/blockquote.json24
-rw-r--r--spec/fixtures/lib/kramdown/atlassian_document_format/blockquote.md2
-rw-r--r--spec/fixtures/lib/kramdown/atlassian_document_format/bullet_list.json72
-rw-r--r--spec/fixtures/lib/kramdown/atlassian_document_format/bullet_list.md8
-rw-r--r--spec/fixtures/lib/kramdown/atlassian_document_format/code_block.json89
-rw-r--r--spec/fixtures/lib/kramdown/atlassian_document_format/code_block.md38
-rw-r--r--spec/fixtures/lib/kramdown/atlassian_document_format/code_mark.json24
-rw-r--r--spec/fixtures/lib/kramdown/atlassian_document_format/code_mark.md2
-rw-r--r--spec/fixtures/lib/kramdown/atlassian_document_format/complex_document.json964
-rw-r--r--spec/fixtures/lib/kramdown/atlassian_document_format/complex_document.md223
-rw-r--r--spec/fixtures/lib/kramdown/atlassian_document_format/emoji.json66
-rw-r--r--spec/fixtures/lib/kramdown/atlassian_document_format/emoji.md4
-rw-r--r--spec/fixtures/lib/kramdown/atlassian_document_format/hard_break.json22
-rw-r--r--spec/fixtures/lib/kramdown/atlassian_document_format/hard_break.md3
-rw-r--r--spec/fixtures/lib/kramdown/atlassian_document_format/heading.json91
-rw-r--r--spec/fixtures/lib/kramdown/atlassian_document_format/heading.md12
-rw-r--r--spec/fixtures/lib/kramdown/atlassian_document_format/inline_card.json46
-rw-r--r--spec/fixtures/lib/kramdown/atlassian_document_format/inline_card.md13
-rw-r--r--spec/fixtures/lib/kramdown/atlassian_document_format/invalid_json.json16
-rw-r--r--spec/fixtures/lib/kramdown/atlassian_document_format/invalid_no_doc.json13
-rw-r--r--spec/fixtures/lib/kramdown/atlassian_document_format/invalid_node_type.json28
-rw-r--r--spec/fixtures/lib/kramdown/atlassian_document_format/link_mark.json44
-rw-r--r--spec/fixtures/lib/kramdown/atlassian_document_format/link_mark.md6
-rw-r--r--spec/fixtures/lib/kramdown/atlassian_document_format/media_group.json59
-rw-r--r--spec/fixtures/lib/kramdown/atlassian_document_format/media_group.md10
-rw-r--r--spec/fixtures/lib/kramdown/atlassian_document_format/media_single.json42
-rw-r--r--spec/fixtures/lib/kramdown/atlassian_document_format/media_single.md4
-rw-r--r--spec/fixtures/lib/kramdown/atlassian_document_format/mention.json44
-rw-r--r--spec/fixtures/lib/kramdown/atlassian_document_format/mention.md4
-rw-r--r--spec/fixtures/lib/kramdown/atlassian_document_format/ordered_list.json170
-rw-r--r--spec/fixtures/lib/kramdown/atlassian_document_format/ordered_list.md25
-rw-r--r--spec/fixtures/lib/kramdown/atlassian_document_format/panel.json117
-rw-r--r--spec/fixtures/lib/kramdown/atlassian_document_format/panel.md12
-rw-r--r--spec/fixtures/lib/kramdown/atlassian_document_format/paragraph.json28
-rw-r--r--spec/fixtures/lib/kramdown/atlassian_document_format/paragraph.md4
-rw-r--r--spec/fixtures/lib/kramdown/atlassian_document_format/rule.json9
-rw-r--r--spec/fixtures/lib/kramdown/atlassian_document_format/rule.md2
-rw-r--r--spec/fixtures/lib/kramdown/atlassian_document_format/strike_sup_sub_mark.json56
-rw-r--r--spec/fixtures/lib/kramdown/atlassian_document_format/strike_sup_sub_mark.md3
-rw-r--r--spec/fixtures/lib/kramdown/atlassian_document_format/strong_em_mark.json53
-rw-r--r--spec/fixtures/lib/kramdown/atlassian_document_format/strong_em_mark.md2
-rw-r--r--spec/fixtures/lib/kramdown/atlassian_document_format/table.json55
-rw-r--r--spec/fixtures/lib/kramdown/atlassian_document_format/table.md18
-rw-r--r--spec/fixtures/lib/kramdown/atlassian_document_format/underline_text_color_mark.json40
-rw-r--r--spec/fixtures/lib/kramdown/atlassian_document_format/underline_text_color_mark.md2
45 files changed, 2569 insertions, 0 deletions
diff --git a/spec/fixtures/lib/kramdown/atlassian_document_format/blockquote.json b/spec/fixtures/lib/kramdown/atlassian_document_format/blockquote.json
new file mode 100644
index 00000000000..5ad414b43b9
--- /dev/null
+++ b/spec/fixtures/lib/kramdown/atlassian_document_format/blockquote.json
@@ -0,0 +1,24 @@
+{
+ "version": 1,
+ "type": "doc",
+ "content": [
+ {
+ "type": "blockquote",
+ "content": [
+ {
+ "type": "paragraph",
+ "content": [
+ {
+ "type": "text",
+ "text": "This is a sample quote"
+ },
+ {
+ "type": "text",
+ "text": " with lorem ipsum dolor sit amet..."
+ }
+ ]
+ }
+ ]
+ }
+ ]
+}
diff --git a/spec/fixtures/lib/kramdown/atlassian_document_format/blockquote.md b/spec/fixtures/lib/kramdown/atlassian_document_format/blockquote.md
new file mode 100644
index 00000000000..9564e11fc3b
--- /dev/null
+++ b/spec/fixtures/lib/kramdown/atlassian_document_format/blockquote.md
@@ -0,0 +1,2 @@
+> This is a sample quote with lorem ipsum dolor sit amet...
+
diff --git a/spec/fixtures/lib/kramdown/atlassian_document_format/bullet_list.json b/spec/fixtures/lib/kramdown/atlassian_document_format/bullet_list.json
new file mode 100644
index 00000000000..0e2b34b0790
--- /dev/null
+++ b/spec/fixtures/lib/kramdown/atlassian_document_format/bullet_list.json
@@ -0,0 +1,72 @@
+{
+ "version": 1,
+ "type": "doc",
+ "content": [
+ {
+ "type": "bulletList",
+ "content": [
+ {
+ "type": "listItem",
+ "content": [
+ {
+ "type": "paragraph",
+ "content": [
+ {
+ "type": "text",
+ "text": "Item 1"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "listItem",
+ "content": [
+ {
+ "type": "paragraph",
+ "content": [
+ {
+ "type": "text",
+ "text": "Item 2",
+ "marks": [
+ {
+ "type": "strong"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "bulletList",
+ "content": [
+ {
+ "type": "listItem",
+ "content": [
+ {
+ "type": "paragraph",
+ "content": [
+ {
+ "type": "text",
+ "text": "Sub-item 1"
+ }
+ ]
+ },
+ {
+ "type": "paragraph",
+ "content": [
+ {
+ "type": "text",
+ "text": "Sub-item 1 paragraph"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+}
diff --git a/spec/fixtures/lib/kramdown/atlassian_document_format/bullet_list.md b/spec/fixtures/lib/kramdown/atlassian_document_format/bullet_list.md
new file mode 100644
index 00000000000..b7de76b973f
--- /dev/null
+++ b/spec/fixtures/lib/kramdown/atlassian_document_format/bullet_list.md
@@ -0,0 +1,8 @@
+* Item 1
+
+* **Item 2**
+
+ * Sub-item 1
+
+ Sub-item 1 paragraph
+
diff --git a/spec/fixtures/lib/kramdown/atlassian_document_format/code_block.json b/spec/fixtures/lib/kramdown/atlassian_document_format/code_block.json
new file mode 100644
index 00000000000..007493bdf49
--- /dev/null
+++ b/spec/fixtures/lib/kramdown/atlassian_document_format/code_block.json
@@ -0,0 +1,89 @@
+{
+ "version": 1,
+ "type": "doc",
+ "content": [
+ {
+ "type": "codeBlock",
+ "attrs": {
+ "language": "javascript"
+ },
+ "content": [
+ {
+ "type": "text",
+ "text": "export function makeIssue({ parentIssue, project, users }) {\n\n const issueType = pickRandom(project.issueTypes)\n\n console.log(data)\n\n return data\n}"
+ }
+ ]
+ },
+ {
+ "type": "codeBlock",
+ "attrs": {
+ "language": "css"
+ },
+ "content": [
+ {
+ "type": "text",
+ "text": ".overflow { overflow: hidden; }"
+ }
+ ]
+ },
+ {
+ "type": "bulletList",
+ "content": [
+ {
+ "type": "listItem",
+ "content": [
+ {
+ "type": "paragraph",
+ "content": [
+ {
+ "type": "text",
+ "text": "Item 1"
+ }
+ ]
+ },
+ {
+ "type": "codeBlock",
+ "content": [
+ {
+ "type": "text",
+ "text": "public DemoClass()\n{\n // assign default value\n x = 0;\n}"
+ }
+ ]
+ },
+ {
+ "type": "orderedList",
+ "content": [
+ {
+ "type": "listItem",
+ "content": [
+ {
+ "type": "paragraph",
+ "content": [
+ {
+ "type": "text",
+ "text": "Number list Item 1"
+ }
+ ]
+ },
+ {
+ "type": "codeBlock",
+ "attrs": {
+ "language": "ruby"
+ },
+ "content": [
+ {
+ "type": "text",
+ "text": "def test\n # assign default value\n x = 0\nend"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+}
diff --git a/spec/fixtures/lib/kramdown/atlassian_document_format/code_block.md b/spec/fixtures/lib/kramdown/atlassian_document_format/code_block.md
new file mode 100644
index 00000000000..c89710afd36
--- /dev/null
+++ b/spec/fixtures/lib/kramdown/atlassian_document_format/code_block.md
@@ -0,0 +1,38 @@
+```javascript
+export function makeIssue({ parentIssue, project, users }) {
+
+ const issueType = pickRandom(project.issueTypes)
+
+ console.log(data)
+
+ return data
+}
+```
+
+<!-- -->
+
+```css
+.overflow { overflow: hidden; }
+```
+
+
+* Item 1
+
+ ```java
+ public DemoClass()
+ {
+ // assign default value
+ x = 0;
+ }
+ ```
+
+
+ 1. Number list Item 1
+
+ ```ruby
+ def test
+ # assign default value
+ x = 0
+ end
+ ```
+
diff --git a/spec/fixtures/lib/kramdown/atlassian_document_format/code_mark.json b/spec/fixtures/lib/kramdown/atlassian_document_format/code_mark.json
new file mode 100644
index 00000000000..884715709f7
--- /dev/null
+++ b/spec/fixtures/lib/kramdown/atlassian_document_format/code_mark.json
@@ -0,0 +1,24 @@
+{
+ "version": 1,
+ "type": "doc",
+ "content": [
+ {
+ "type": "paragraph",
+ "content": [
+ {
+ "type": "text",
+ "text": "This is some "
+ },
+ {
+ "type": "text",
+ "text": "inline code",
+ "marks": [
+ {
+ "type": "code"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+}
diff --git a/spec/fixtures/lib/kramdown/atlassian_document_format/code_mark.md b/spec/fixtures/lib/kramdown/atlassian_document_format/code_mark.md
new file mode 100644
index 00000000000..a52d00bfd38
--- /dev/null
+++ b/spec/fixtures/lib/kramdown/atlassian_document_format/code_mark.md
@@ -0,0 +1,2 @@
+This is some `inline code`
+
diff --git a/spec/fixtures/lib/kramdown/atlassian_document_format/complex_document.json b/spec/fixtures/lib/kramdown/atlassian_document_format/complex_document.json
new file mode 100644
index 00000000000..c69ad6b4260
--- /dev/null
+++ b/spec/fixtures/lib/kramdown/atlassian_document_format/complex_document.json
@@ -0,0 +1,964 @@
+{
+ "version": 1,
+ "type": "doc",
+ "content": [
+ {
+ "type": "paragraph",
+ "content": [
+ {
+ "type": "text",
+ "text": "This is a complex issue…and this is normal text"
+ }
+ ]
+ },
+ {
+ "type": "paragraph",
+ "content": []
+ },
+ {
+ "type": "rule"
+ },
+ {
+ "type": "paragraph",
+ "content": [
+ {
+ "type": "text",
+ "text": "Color - Dark Gray"
+ }
+ ]
+ },
+ {
+ "type": "paragraph",
+ "content": [
+ {
+ "type": "text",
+ "text": "Color - "
+ },
+ {
+ "type": "text",
+ "text": "Light Gray",
+ "marks": [
+ {
+ "type": "textColor",
+ "attrs": {
+ "color": "#97a0af"
+ }
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "paragraph",
+ "content": [
+ {
+ "type": "text",
+ "text": "Color - "
+ },
+ {
+ "type": "text",
+ "text": "Purple",
+ "marks": [
+ {
+ "type": "textColor",
+ "attrs": {
+ "color": "#6554c0"
+ }
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "paragraph",
+ "content": [
+ {
+ "type": "text",
+ "text": "Color - "
+ },
+ {
+ "type": "text",
+ "text": "Teal",
+ "marks": [
+ {
+ "type": "textColor",
+ "attrs": {
+ "color": "#00b8d9"
+ }
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "paragraph",
+ "content": [
+ {
+ "type": "text",
+ "text": "Color - "
+ },
+ {
+ "type": "text",
+ "text": "Green",
+ "marks": [
+ {
+ "type": "textColor",
+ "attrs": {
+ "color": "#36b37e"
+ }
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "paragraph",
+ "content": [
+ {
+ "type": "text",
+ "text": "Color - "
+ },
+ {
+ "type": "text",
+ "text": "Red",
+ "marks": [
+ {
+ "type": "textColor",
+ "attrs": {
+ "color": "#ff5630"
+ }
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "paragraph",
+ "content": [
+ {
+ "type": "text",
+ "text": "Color - "
+ },
+ {
+ "type": "text",
+ "text": "Orange",
+ "marks": [
+ {
+ "type": "textColor",
+ "attrs": {
+ "color": "#ff991f"
+ }
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "paragraph",
+ "content": []
+ },
+ {
+ "type": "rule"
+ },
+ {
+ "type": "paragraph",
+ "content": [
+ {
+ "type": "inlineCard",
+ "attrs": {
+ "url": "https://gitlab-jira.atlassian.net/browse/DEMO-1"
+ }
+ },
+ {
+ "type": "text",
+ "text": " "
+ }
+ ]
+ },
+ {
+ "type": "paragraph",
+ "content": [
+ {
+ "type": "inlineCard",
+ "attrs": {
+ "data": {
+ "@context": "https://json-ld.org/contexts/person.jsonld",
+ "@id": "http://dbpedia.org/resource/John_Lennon",
+ "name": "John Lennon",
+ "born": "1940-10-09",
+ "spouse": "http://dbpedia.org/resource/Cynthia_Lennon"
+ }
+ }
+ },
+ {
+ "type": "text",
+ "text": " "
+ }
+ ]
+ },
+ {
+ "type": "paragraph",
+ "content": [
+ {
+ "type": "text",
+ "text": "External Link",
+ "marks": [
+ {
+ "type": "link",
+ "attrs": {
+ "href": "https://gitlab.com/gitlab-org/gitlab/-/merge_requests/25718"
+ }
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "paragraph",
+ "content": []
+ },
+ {
+ "type": "rule"
+ },
+ {
+ "type": "paragraph",
+ "content": []
+ },
+ {
+ "type": "blockquote",
+ "content": [
+ {
+ "type": "paragraph",
+ "content": [
+ {
+ "type": "text",
+ "text": "This is a block quote"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "paragraph",
+ "content": []
+ },
+ {
+ "type": "panel",
+ "attrs": {
+ "panelType": "success"
+ },
+ "content": [
+ {
+ "type": "paragraph",
+ "content": [
+ {
+ "type": "text",
+ "text": "Success info panel"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "panel",
+ "attrs": {
+ "panelType": "info"
+ },
+ "content": [
+ {
+ "type": "paragraph",
+ "content": [
+ {
+ "type": "text",
+ "text": "Info info panel"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "panel",
+ "attrs": {
+ "panelType": "note"
+ },
+ "content": [
+ {
+ "type": "paragraph",
+ "content": [
+ {
+ "type": "text",
+ "text": "Note info panel"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "panel",
+ "attrs": {
+ "panelType": "warning"
+ },
+ "content": [
+ {
+ "type": "paragraph",
+ "content": [
+ {
+ "type": "text",
+ "text": "Warning info panel"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "panel",
+ "attrs": {
+ "panelType": "error"
+ },
+ "content": [
+ {
+ "type": "paragraph",
+ "content": [
+ {
+ "type": "text",
+ "text": "Error info panel"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "paragraph",
+ "content": []
+ },
+ {
+ "type": "paragraph",
+ "content": []
+ },
+ {
+ "type": "rule"
+ },
+ {
+ "type": "paragraph",
+ "content": [
+ {
+ "type": "mention",
+ "attrs": {
+ "id": "5e32f803e127810e82875bc1",
+ "text": "jhope"
+ }
+ },
+ {
+ "type": "text",
+ "text": " what up"
+ }
+ ]
+ },
+ {
+ "type": "paragraph",
+ "content": []
+ },
+ {
+ "type": "paragraph",
+ "content": [
+ {
+ "type": "emoji",
+ "attrs": {
+ "shortName": ":grinning:",
+ "id": "1f600",
+ "text": "\uD83D\uDE00"
+ }
+ },
+ {
+ "type": "text",
+ "text": " "
+ },
+ {
+ "type": "emoji",
+ "attrs": {
+ "shortName": ":rofl:",
+ "id": "1f923",
+ "text": "\uD83E\uDD23"
+ }
+ },
+ {
+ "type": "text",
+ "text": " "
+ },
+ {
+ "type": "emoji",
+ "attrs": {
+ "shortName": ":partying_face:",
+ "id": "1f973",
+ "text": "\uD83E\uDD73"
+ }
+ },
+ {
+ "type": "text",
+ "text": " "
+ },
+ {
+ "type": "emoji",
+ "attrs": {
+ "shortName": ":heart_eyes:",
+ "id": "1f60d",
+ "text": "\uD83D\uDE0D"
+ }
+ },
+ {
+ "type": "text",
+ "text": " "
+ }
+ ]
+ },
+ {
+ "type": "paragraph",
+ "content": []
+ },
+ {
+ "type": "table",
+ "attrs": {
+ "isNumberColumnEnabled": false,
+ "layout": "default"
+ },
+ "content": [
+ {
+ "type": "tableRow",
+ "content": [
+ {
+ "type": "tableHeader",
+ "attrs": {},
+ "content": [
+ {
+ "type": "paragraph",
+ "content": [
+ {
+ "type": "text",
+ "text": "Col 1 Row 1",
+ "marks": [
+ {
+ "type": "strong"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "tableHeader",
+ "attrs": {},
+ "content": [
+ {
+ "type": "paragraph",
+ "content": [
+ {
+ "type": "text",
+ "text": "Col 2 Row 1",
+ "marks": [
+ {
+ "type": "strong"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "tableHeader",
+ "attrs": {},
+ "content": [
+ {
+ "type": "paragraph",
+ "content": [
+ {
+ "type": "text",
+ "text": "Col 3 Row 1",
+ "marks": [
+ {
+ "type": "strong"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "tableRow",
+ "content": [
+ {
+ "type": "tableCell",
+ "attrs": {},
+ "content": [
+ {
+ "type": "paragraph",
+ "content": [
+ {
+ "type": "text",
+ "text": "Col 1 Row 2"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "tableCell",
+ "attrs": {},
+ "content": [
+ {
+ "type": "paragraph",
+ "content": [
+ {
+ "type": "text",
+ "text": "Col 2 Row 2"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "tableCell",
+ "attrs": {},
+ "content": [
+ {
+ "type": "paragraph",
+ "content": [
+ {
+ "type": "text",
+ "text": "Col 3 Row 2"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "tableRow",
+ "content": [
+ {
+ "type": "tableCell",
+ "attrs": {},
+ "content": [
+ {
+ "type": "paragraph",
+ "content": [
+ {
+ "type": "text",
+ "text": "Col 1 Row 3"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "tableCell",
+ "attrs": {},
+ "content": [
+ {
+ "type": "paragraph",
+ "content": [
+ {
+ "type": "text",
+ "text": "Col 2 Row 3"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "tableCell",
+ "attrs": {},
+ "content": [
+ {
+ "type": "paragraph",
+ "content": [
+ {
+ "type": "text",
+ "text": "Col 3 Row 3"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "heading",
+ "attrs": {
+ "level": 1
+ },
+ "content": [
+ {
+ "type": "text",
+ "text": "Header 1"
+ }
+ ]
+ },
+ {
+ "type": "heading",
+ "attrs": {
+ "level": 2
+ },
+ "content": [
+ {
+ "type": "text",
+ "text": "Header 2"
+ }
+ ]
+ },
+ {
+ "type": "heading",
+ "attrs": {
+ "level": 3
+ },
+ "content": [
+ {
+ "type": "text",
+ "text": "Header 3"
+ }
+ ]
+ },
+ {
+ "type": "heading",
+ "attrs": {
+ "level": 4
+ },
+ "content": [
+ {
+ "type": "text",
+ "text": "Header 4"
+ }
+ ]
+ },
+ {
+ "type": "heading",
+ "attrs": {
+ "level": 5
+ },
+ "content": [
+ {
+ "type": "text",
+ "text": "Header 5"
+ }
+ ]
+ },
+ {
+ "type": "heading",
+ "attrs": {
+ "level": 6
+ },
+ "content": [
+ {
+ "type": "text",
+ "text": "Header 6"
+ }
+ ]
+ },
+ {
+ "type": "paragraph",
+ "content": []
+ },
+ {
+ "type": "bulletList",
+ "content": [
+ {
+ "type": "listItem",
+ "content": [
+ {
+ "type": "paragraph",
+ "content": [
+ {
+ "type": "text",
+ "text": "Bullet point list item 1"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "listItem",
+ "content": [
+ {
+ "type": "paragraph",
+ "content": [
+ {
+ "type": "text",
+ "text": "Bullet point list Item 2"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "listItem",
+ "content": [
+ {
+ "type": "paragraph",
+ "content": [
+ {
+ "type": "text",
+ "text": "Bullet point list Item 3"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "paragraph",
+ "content": []
+ },
+ {
+ "type": "orderedList",
+ "content": [
+ {
+ "type": "listItem",
+ "content": [
+ {
+ "type": "paragraph",
+ "content": [
+ {
+ "type": "text",
+ "text": "Number list Item 1"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "listItem",
+ "content": [
+ {
+ "type": "paragraph",
+ "content": [
+ {
+ "type": "text",
+ "text": "Number list item 2"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "listItem",
+ "content": [
+ {
+ "type": "paragraph",
+ "content": [
+ {
+ "type": "text",
+ "text": "Number list item 3"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "paragraph",
+ "content": []
+ },
+ {
+ "type": "paragraph",
+ "content": [
+ {
+ "type": "text",
+ "text": "Underline",
+ "marks": [
+ {
+ "type": "underline"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "paragraph",
+ "content": [
+ {
+ "type": "text",
+ "text": "Superscript",
+ "marks": [
+ {
+ "type": "subsup",
+ "attrs": {
+ "type": "sup"
+ }
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "paragraph",
+ "content": [
+ {
+ "type": "text",
+ "text": "Subscript",
+ "marks": [
+ {
+ "type": "subsup",
+ "attrs": {
+ "type": "sub"
+ }
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "paragraph",
+ "content": [
+ {
+ "type": "text",
+ "text": "Bold",
+ "marks": [
+ {
+ "type": "strong"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "paragraph",
+ "content": [
+ {
+ "type": "text",
+ "text": "Italic",
+ "marks": [
+ {
+ "type": "em"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "paragraph",
+ "content": [
+ {
+ "type": "text",
+ "text": "Strikethrough",
+ "marks": [
+ {
+ "type": "strike"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "codeBlock",
+ "attrs": {
+ "language": "javascript"
+ },
+ "content": [
+ {
+ "type": "text",
+ "text": "export function makeIssue({ parentIssue, project, users }) {\n \n const issueType = pickRandom(project.issueTypes)\n\n let data = {\n fields: {\n summary: faker.lorem.sentence(),\n issuetype: {\n id: issueType.id\n },\n project: {\n id: project.id\n },\n reporter: {\n id: pickRandom(users)\n }\n }\n }\n\n if (issueType.subtask) {\n data = {\n parent: {\n key: parentIssue\n }\n }\n }\n\n console.log(data)\n\n return data\n}"
+ }
+ ]
+ },
+ {
+ "type": "mediaSingle",
+ "attrs": {
+ "layout": "center"
+ },
+ "content": [
+ {
+ "type": "media",
+ "attrs": {
+ "id": "79411c6b-50e0-477f-b4ed-ac3a5887750c",
+ "type": "file",
+ "collection": "jira-10050-field-description",
+ "width": 400,
+ "height": 400
+ }
+ }
+ ]
+ },
+ {
+ "type": "paragraph",
+ "content": []
+ },
+ {
+ "type": "mediaSingle",
+ "attrs": {
+ "layout": "center"
+ },
+ "content": [
+ {
+ "type": "media",
+ "attrs": {
+ "id": "6a5b48c6-70bd-4747-9ac8-a9abc9adb1f4",
+ "type": "file",
+ "collection": "jira-10050-field-description",
+ "width": 1280,
+ "height": 789
+ }
+ }
+ ]
+ },
+ {
+ "type": "mediaSingle",
+ "attrs": {
+ "layout": "center"
+ },
+ "content": [
+ {
+ "type": "media",
+ "attrs": {
+ "id": "e818a88d-9185-4a7f-8882-18339a0f0966",
+ "type": "file",
+ "collection": "jira-10050-field-description",
+ "width": 1280,
+ "height": 598
+ }
+ }
+ ]
+ },
+ {
+ "type": "paragraph",
+ "content": []
+ },
+ {
+ "type": "paragraph",
+ "content": []
+ },
+ {
+ "type": "paragraph",
+ "content": [
+ {
+ "type": "text",
+ "text": "blob:"
+ },
+ {
+ "type": "text",
+ "text": "https://gitlab-jira.atlassian.net/5eb8e93b-7b15-446f-82d9-9d82ad7b8ea5#media-blob-url=true&id=572b2c1b-1b38-44ba-904a-649ee1861917&collection=upload-user-collection-426749591&contextId=10042&mimeType=image%2Fpng&name=import-jira-issues.png&size=294408",
+ "marks": [
+ {
+ "type": "link",
+ "attrs": {
+ "href": "https://gitlab-jira.atlassian.net/5eb8e93b-7b15-446f-82d9-9d82ad7b8ea5#media-blob-url=true&id=572b2c1b-1b38-44ba-904a-649ee1861917&collection=upload-user-collection-426749591&contextId=10042&mimeType=image%2Fpng&name=import-jira-issues.png&size=294408"
+ }
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "paragraph",
+ "content": []
+ }
+ ]
+}
diff --git a/spec/fixtures/lib/kramdown/atlassian_document_format/complex_document.md b/spec/fixtures/lib/kramdown/atlassian_document_format/complex_document.md
new file mode 100644
index 00000000000..d4faf84e971
--- /dev/null
+++ b/spec/fixtures/lib/kramdown/atlassian_document_format/complex_document.md
@@ -0,0 +1,223 @@
+This is a complex issue…and this is normal text
+
+
+
+* * *
+
+Color - Dark Gray
+
+Color - <span color="#97a0af">Light Gray</span>
+
+Color - <span color="#6554c0">Purple</span>
+
+Color - <span color="#00b8d9">Teal</span>
+
+Color - <span color="#36b37e">Green</span>
+
+Color - <span color="#ff5630">Red</span>
+
+Color - <span color="#ff991f">Orange</span>
+
+
+
+* * *
+
+[https://gitlab-jira.atlassian.net/browse/DEMO-1][1]
+
+`adf-inlineCard:
+{"@context"=>"https://json-ld.org/contexts/person.jsonld",
+"@id"=>"http://dbpedia.org/resource/John_Lennon", "name"=>"John Lennon",
+"born"=>"1940-10-09",
+"spouse"=>"http://dbpedia.org/resource/Cynthia_Lennon"}`
+
+[External Link][2]
+
+
+
+* * *
+
+
+
+> This is a block quote
+
+
+
+> \:white\_check\_mark: Success info panel
+
+> \:information\_source: Info info panel
+
+> \:notepad\_spiral: Note info panel
+
+> \:warning: Warning info panel
+
+> \:octagonal\_sign: Error info panel
+
+
+
+
+
+* * *
+
+@adf-mention:jhope what up
+
+
+
+😀 🤣 🥳 😍
+
+
+
+<table>
+<tbody>
+<tr>
+<th>
+
+**Col 1 Row 1**
+
+</th>
+<th>
+
+**Col 2 Row 1**
+
+</th>
+<th>
+
+**Col 3 Row 1**
+
+</th>
+</tr>
+<tr>
+<td>
+
+Col 1 Row 2
+
+</td>
+<td>
+
+Col 2 Row 2
+
+</td>
+<td>
+
+Col 3 Row 2
+
+</td>
+</tr>
+<tr>
+<td>
+
+Col 1 Row 3
+
+</td>
+<td>
+
+Col 2 Row 3
+
+</td>
+<td>
+
+Col 3 Row 3
+
+</td>
+</tr>
+</tbody>
+</table>
+
+
+# Header 1
+
+## Header 2
+
+### Header 3
+
+#### Header 4
+
+##### Header 5
+
+###### Header 6
+
+
+
+* Bullet point list item 1
+
+* Bullet point list Item 2
+
+* Bullet point list Item 3
+
+
+
+1. Number list Item 1
+
+2. Number list item 2
+
+3. Number list item 3
+
+
+
+<u>Underline</u>
+
+<sup>Superscript</sup>
+
+<sub>Subscript</sub>
+
+**Bold**
+
+*Italic*
+
+<del>Strikethrough</del>
+
+```javascript
+export function makeIssue({ parentIssue, project, users }) {
+
+ const issueType = pickRandom(project.issueTypes)
+
+ let data = {
+ fields: {
+ summary: faker.lorem.sentence(),
+ issuetype: {
+ id: issueType.id
+ },
+ project: {
+ id: project.id
+ },
+ reporter: {
+ id: pickRandom(users)
+ }
+ }
+ }
+
+ if (issueType.subtask) {
+ data = {
+ parent: {
+ key: parentIssue
+ }
+ }
+ }
+
+ console.log(data)
+
+ return data
+}
+```
+
+
+![jira-10050-field-description](adf-media://79411c6b-50e0-477f-b4ed-ac3a5887750c)
+
+
+
+![jira-10050-field-description](adf-media://6a5b48c6-70bd-4747-9ac8-a9abc9adb1f4)
+
+![jira-10050-field-description](adf-media://e818a88d-9185-4a7f-8882-18339a0f0966)
+
+
+
+
+
+blob:[https://gitlab-jira.atlassian.net/5eb8e93b-7b15-446f-82d9-9d82ad7b8ea5#media-blob-url=true&id=572b2c1b-1b38-44ba-904a-649ee1861917&collection=upload-user-collection-426749591&contextId=10042&mimeType=image%2Fpng&name=import-jira-issues.png&size=294408][3]
+
+
+
+
+
+[1]: https://gitlab-jira.atlassian.net/browse/DEMO-1
+[2]: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/25718
+[3]: https://gitlab-jira.atlassian.net/5eb8e93b-7b15-446f-82d9-9d82ad7b8ea5#media-blob-url=true&id=572b2c1b-1b38-44ba-904a-649ee1861917&collection=upload-user-collection-426749591&contextId=10042&mimeType=image%2Fpng&name=import-jira-issues.png&size=294408
diff --git a/spec/fixtures/lib/kramdown/atlassian_document_format/emoji.json b/spec/fixtures/lib/kramdown/atlassian_document_format/emoji.json
new file mode 100644
index 00000000000..3a7944d2509
--- /dev/null
+++ b/spec/fixtures/lib/kramdown/atlassian_document_format/emoji.json
@@ -0,0 +1,66 @@
+{
+ "version": 1,
+ "type": "doc",
+ "content": [
+ {
+ "type": "paragraph",
+ "content": [
+ {
+ "type": "text",
+ "text": "Grinning with unicode "
+ },
+ {
+ "type": "emoji",
+ "attrs": {
+ "shortName": ":grinning:",
+ "text": "😀"
+ }
+ },
+ {
+ "type": "text",
+ "text": " and heart eyes with raw unicode "
+ },
+ {
+ "type": "emoji",
+ "attrs": {
+ "shortName": ":heart_eyes:",
+ "id": "1f60d",
+ "text": "\uD83D\uDE0D"
+ }
+ },
+ {
+ "type": "text",
+ "text": ", non-standard Atlassian "
+ },
+ {
+ "type": "emoji",
+ "attrs": {
+ "shortName": ":awthanks:",
+ "id": "atlassian-awthanks",
+ "text": ":awthanks:"
+ }
+ },
+ {
+ "type": "text",
+ "text": ", non-standard customer emoji "
+ },
+ {
+ "type": "emoji",
+ "attrs": {
+ "shortName": ":thumbsup::skin-tone-2:"
+ }
+ },
+ {
+ "type": "text",
+ "text": ", and invalid is ignored "
+ },
+ {
+ "type": "emoji",
+ "attrs": {
+ "id": "1f44d"
+ }
+ }
+ ]
+ }
+ ]
+}
diff --git a/spec/fixtures/lib/kramdown/atlassian_document_format/emoji.md b/spec/fixtures/lib/kramdown/atlassian_document_format/emoji.md
new file mode 100644
index 00000000000..11adf377188
--- /dev/null
+++ b/spec/fixtures/lib/kramdown/atlassian_document_format/emoji.md
@@ -0,0 +1,4 @@
+Grinning with unicode 😀 and heart eyes with raw unicode 😍, non-standard
+Atlassian :awthanks:, non-standard customer emoji
+:thumbsup::skin-tone-2:, and invalid is ignored
+
diff --git a/spec/fixtures/lib/kramdown/atlassian_document_format/hard_break.json b/spec/fixtures/lib/kramdown/atlassian_document_format/hard_break.json
new file mode 100644
index 00000000000..564570c016e
--- /dev/null
+++ b/spec/fixtures/lib/kramdown/atlassian_document_format/hard_break.json
@@ -0,0 +1,22 @@
+{
+ "version": 1,
+ "type": "doc",
+ "content": [
+ {
+ "type": "paragraph",
+ "content": [
+ {
+ "type": "text",
+ "text": "This is a sample paragraph"
+ },
+ {
+ "type": "hardBreak"
+ },
+ {
+ "type": "text",
+ "text": "with lorem ipsum dolor sit amet..."
+ }
+ ]
+ }
+ ]
+}
diff --git a/spec/fixtures/lib/kramdown/atlassian_document_format/hard_break.md b/spec/fixtures/lib/kramdown/atlassian_document_format/hard_break.md
new file mode 100644
index 00000000000..d8c4a8dca53
--- /dev/null
+++ b/spec/fixtures/lib/kramdown/atlassian_document_format/hard_break.md
@@ -0,0 +1,3 @@
+This is a sample paragraph
+with lorem ipsum dolor sit amet...
+
diff --git a/spec/fixtures/lib/kramdown/atlassian_document_format/heading.json b/spec/fixtures/lib/kramdown/atlassian_document_format/heading.json
new file mode 100644
index 00000000000..dbc756f3603
--- /dev/null
+++ b/spec/fixtures/lib/kramdown/atlassian_document_format/heading.json
@@ -0,0 +1,91 @@
+{
+ "version": 1,
+ "type": "doc",
+ "content": [
+ {
+ "type": "heading",
+ "attrs": {
+ "level": 1
+ },
+ "content": [
+ {
+ "type": "text",
+ "text": "Header 1"
+ }
+ ]
+ },
+ {
+ "type": "heading",
+ "attrs": {
+ "level": 2
+ },
+ "content": [
+ {
+ "type": "text",
+ "text": "Header 2",
+ "marks": [
+ {
+ "type": "strong"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "heading",
+ "attrs": {
+ "level": 3
+ },
+ "content": [
+ {
+ "type": "text",
+ "text": "Header 3"
+ }
+ ]
+ },
+ {
+ "type": "heading",
+ "attrs": {
+ "level": 4
+ },
+ "content": [
+ {
+ "type": "text",
+ "text": "Header 4",
+ "marks": [
+ {
+ "type": "textColor",
+ "attrs": {
+ "color": "#ff6347"
+ }
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "heading",
+ "attrs": {
+ "level": 5
+ },
+ "content": [
+ {
+ "type": "text",
+ "text": "Header 5"
+ }
+ ]
+ },
+ {
+ "type": "heading",
+ "attrs": {
+ "level": 6
+ },
+ "content": [
+ {
+ "type": "text",
+ "text": "Header 6"
+ }
+ ]
+ }
+ ]
+}
diff --git a/spec/fixtures/lib/kramdown/atlassian_document_format/heading.md b/spec/fixtures/lib/kramdown/atlassian_document_format/heading.md
new file mode 100644
index 00000000000..073ae1fdef4
--- /dev/null
+++ b/spec/fixtures/lib/kramdown/atlassian_document_format/heading.md
@@ -0,0 +1,12 @@
+# Header 1
+
+## **Header 2**
+
+### Header 3
+
+#### <span color="#ff6347">Header 4</span>
+
+##### Header 5
+
+###### Header 6
+
diff --git a/spec/fixtures/lib/kramdown/atlassian_document_format/inline_card.json b/spec/fixtures/lib/kramdown/atlassian_document_format/inline_card.json
new file mode 100644
index 00000000000..8b7428debc2
--- /dev/null
+++ b/spec/fixtures/lib/kramdown/atlassian_document_format/inline_card.json
@@ -0,0 +1,46 @@
+{
+ "version": 1,
+ "type": "doc",
+ "content": [
+ {
+ "type": "paragraph",
+ "content": [
+ {
+ "type": "text",
+ "text": "An inline card (url): "
+ },
+ {
+ "type": "inlineCard",
+ "attrs": {
+ "url": "https://gitlab-jira.atlassian.net/browse/DEMO-1"
+ }
+ }
+ ]
+ },
+ {
+ "type": "paragraph",
+ "content": [
+ {
+ "type": "text",
+ "text": "Some prelude text "
+ },
+ {
+ "type": "inlineCard",
+ "attrs": {
+ "data": {
+ "@context": "https://json-ld.org/contexts/person.jsonld",
+ "@id": "http://dbpedia.org/resource/John_Lennon",
+ "name": "John Lennon",
+ "born": "1940-10-09",
+ "spouse": "http://dbpedia.org/resource/Cynthia_Lennon"
+ }
+ }
+ },
+ {
+ "type": "text",
+ "text": " some following text"
+ }
+ ]
+ }
+ ]
+}
diff --git a/spec/fixtures/lib/kramdown/atlassian_document_format/inline_card.md b/spec/fixtures/lib/kramdown/atlassian_document_format/inline_card.md
new file mode 100644
index 00000000000..655102941a7
--- /dev/null
+++ b/spec/fixtures/lib/kramdown/atlassian_document_format/inline_card.md
@@ -0,0 +1,13 @@
+An inline card (url):
+[https://gitlab-jira.atlassian.net/browse/DEMO-1][1]
+
+Some prelude text `adf-inlineCard:
+{"@context"=>"https://json-ld.org/contexts/person.jsonld",
+"@id"=>"http://dbpedia.org/resource/John_Lennon", "name"=>"John Lennon",
+"born"=>"1940-10-09",
+"spouse"=>"http://dbpedia.org/resource/Cynthia_Lennon"}` some following
+text
+
+
+
+[1]: https://gitlab-jira.atlassian.net/browse/DEMO-1
diff --git a/spec/fixtures/lib/kramdown/atlassian_document_format/invalid_json.json b/spec/fixtures/lib/kramdown/atlassian_document_format/invalid_json.json
new file mode 100644
index 00000000000..6305592d175
--- /dev/null
+++ b/spec/fixtures/lib/kramdown/atlassian_document_format/invalid_json.json
@@ -0,0 +1,16 @@
+{
+ "version": 1,
+ "type": "doc",
+ "content": [
+ {
+ "type": "paragraph",
+ "content": [
+ {
+ "type": "text",
+ "text": "This is a second paragraph"
+ }
+ ]
+ }
+ ]
+}
+}
diff --git a/spec/fixtures/lib/kramdown/atlassian_document_format/invalid_no_doc.json b/spec/fixtures/lib/kramdown/atlassian_document_format/invalid_no_doc.json
new file mode 100644
index 00000000000..c9f10eeeb79
--- /dev/null
+++ b/spec/fixtures/lib/kramdown/atlassian_document_format/invalid_no_doc.json
@@ -0,0 +1,13 @@
+{
+ "type": "paragraph",
+ "content": [
+ {
+ "type": "text",
+ "text": "This is a sample paragraph"
+ },
+ {
+ "type": "text",
+ "text": " with lorem ipsum dolor sit amet..."
+ }
+ ]
+}
diff --git a/spec/fixtures/lib/kramdown/atlassian_document_format/invalid_node_type.json b/spec/fixtures/lib/kramdown/atlassian_document_format/invalid_node_type.json
new file mode 100644
index 00000000000..ebb74624333
--- /dev/null
+++ b/spec/fixtures/lib/kramdown/atlassian_document_format/invalid_node_type.json
@@ -0,0 +1,28 @@
+{
+ "version": 1,
+ "type": "doc",
+ "content": [
+ {
+ "type": "invalid",
+ "content": [
+ {
+ "type": "text",
+ "text": "This is a sample paragraph"
+ },
+ {
+ "type": "text",
+ "text": " with lorem ipsum dolor sit amet..."
+ }
+ ]
+ },
+ {
+ "type": "paragraph",
+ "content": [
+ {
+ "type": "text",
+ "text": "This is a second paragraph"
+ }
+ ]
+ }
+ ]
+}
diff --git a/spec/fixtures/lib/kramdown/atlassian_document_format/link_mark.json b/spec/fixtures/lib/kramdown/atlassian_document_format/link_mark.json
new file mode 100644
index 00000000000..bf6facf1b05
--- /dev/null
+++ b/spec/fixtures/lib/kramdown/atlassian_document_format/link_mark.json
@@ -0,0 +1,44 @@
+{
+ "version": 1,
+ "type": "doc",
+ "content": [
+ {
+ "type": "paragraph",
+ "content": [
+ {
+ "type": "text",
+ "text": "This is a "
+ },
+ {
+ "type": "text",
+ "text": "link without title",
+ "marks": [
+ {
+ "type": "link",
+ "attrs": {
+ "href": "http://example.com"
+ }
+ }
+ ]
+ },
+ {
+ "type": "text",
+ "text": " and a "
+ },
+ {
+ "type": "text",
+ "text": "link with title",
+ "marks": [
+ {
+ "type": "link",
+ "attrs": {
+ "href": "http://example.net",
+ "title": "Link Title"
+ }
+ }
+ ]
+ }
+ ]
+ }
+ ]
+}
diff --git a/spec/fixtures/lib/kramdown/atlassian_document_format/link_mark.md b/spec/fixtures/lib/kramdown/atlassian_document_format/link_mark.md
new file mode 100644
index 00000000000..cd42b2297cf
--- /dev/null
+++ b/spec/fixtures/lib/kramdown/atlassian_document_format/link_mark.md
@@ -0,0 +1,6 @@
+This is a [link without title][1] and a [link with title][2]
+
+
+
+[1]: http://example.com
+[2]: http://example.net "Link Title"
diff --git a/spec/fixtures/lib/kramdown/atlassian_document_format/media_group.json b/spec/fixtures/lib/kramdown/atlassian_document_format/media_group.json
new file mode 100644
index 00000000000..a51da964e0e
--- /dev/null
+++ b/spec/fixtures/lib/kramdown/atlassian_document_format/media_group.json
@@ -0,0 +1,59 @@
+{
+ "version": 1,
+ "type": "doc",
+ "content": [
+ {
+ "type": "mediaGroup",
+ "content": [
+ {
+ "type": "media",
+ "attrs": {
+ "id": "79411c6b-50e0-477f-b4ed-ac3a5887750c",
+ "type": "file",
+ "collection": "jira-10050-field-description",
+ "width": 400,
+ "height": 400
+ }
+ },
+ {
+ "type": "media",
+ "attrs": {
+ "id": "79411c6b-50e0-477f-b4ed-abcde",
+ "type": "file",
+ "collection": "jira-10050-field-description",
+ "width": 400,
+ "height": 400
+ }
+ }
+ ]
+ },
+ {
+ "type": "rule"
+ },
+ {
+ "type": "mediaGroup",
+ "content": [
+ {
+ "type": "media",
+ "attrs": {
+ "id": "79411c6b-50e0-477f-b4ed-ac3a5887750c-link1",
+ "type": "link",
+ "collection": "jira-10050-field-description-links",
+ "width": 400,
+ "height": 400
+ }
+ },
+ {
+ "type": "media",
+ "attrs": {
+ "id": "79411c6b-50e0-477f-b4ed-ac3a5887750c-link2",
+ "type": "link",
+ "collection": "jira-10050-field-description-links",
+ "width": 400,
+ "height": 400
+ }
+ }
+ ]
+ }
+ ]
+}
diff --git a/spec/fixtures/lib/kramdown/atlassian_document_format/media_group.md b/spec/fixtures/lib/kramdown/atlassian_document_format/media_group.md
new file mode 100644
index 00000000000..7b602d8fc2b
--- /dev/null
+++ b/spec/fixtures/lib/kramdown/atlassian_document_format/media_group.md
@@ -0,0 +1,10 @@
+* ![jira-10050-field-description](adf-media://79411c6b-50e0-477f-b4ed-ac3a5887750c)
+
+* ![jira-10050-field-description](adf-media://79411c6b-50e0-477f-b4ed-abcde)
+
+* * *
+
+* [adf-media://79411c6b-50e0-477f-b4ed-ac3a5887750c-link1](adf-media://79411c6b-50e0-477f-b4ed-ac3a5887750c-link1)
+
+* [adf-media://79411c6b-50e0-477f-b4ed-ac3a5887750c-link2](adf-media://79411c6b-50e0-477f-b4ed-ac3a5887750c-link2)
+
diff --git a/spec/fixtures/lib/kramdown/atlassian_document_format/media_single.json b/spec/fixtures/lib/kramdown/atlassian_document_format/media_single.json
new file mode 100644
index 00000000000..0ecf2dcf03d
--- /dev/null
+++ b/spec/fixtures/lib/kramdown/atlassian_document_format/media_single.json
@@ -0,0 +1,42 @@
+{
+ "version": 1,
+ "type": "doc",
+ "content": [
+ {
+ "type": "mediaSingle",
+ "attrs": {
+ "layout": "center"
+ },
+ "content": [
+ {
+ "type": "media",
+ "attrs": {
+ "id": "79411c6b-50e0-477f-b4ed-ac3a5887750c",
+ "type": "file",
+ "collection": "jira-10050-field-description",
+ "width": 400,
+ "height": 400
+ }
+ }
+ ]
+ },
+ {
+ "type": "mediaSingle",
+ "attrs": {
+ "layout": "center"
+ },
+ "content": [
+ {
+ "type": "media",
+ "attrs": {
+ "id": "79411c6b-50e0-477f-b4ed-abcd",
+ "type": "file",
+ "collection": "another-jira-10050-field-description",
+ "width": 400,
+ "height": 400
+ }
+ }
+ ]
+ }
+ ]
+}
diff --git a/spec/fixtures/lib/kramdown/atlassian_document_format/media_single.md b/spec/fixtures/lib/kramdown/atlassian_document_format/media_single.md
new file mode 100644
index 00000000000..5ed1bbb55e1
--- /dev/null
+++ b/spec/fixtures/lib/kramdown/atlassian_document_format/media_single.md
@@ -0,0 +1,4 @@
+![jira-10050-field-description](adf-media://79411c6b-50e0-477f-b4ed-ac3a5887750c)
+
+![another-jira-10050-field-description](adf-media://79411c6b-50e0-477f-b4ed-abcd)
+
diff --git a/spec/fixtures/lib/kramdown/atlassian_document_format/mention.json b/spec/fixtures/lib/kramdown/atlassian_document_format/mention.json
new file mode 100644
index 00000000000..81a087c57d9
--- /dev/null
+++ b/spec/fixtures/lib/kramdown/atlassian_document_format/mention.json
@@ -0,0 +1,44 @@
+{
+ "version": 1,
+ "type": "doc",
+ "content": [
+ {
+ "type": "paragraph",
+ "content": [
+ {
+ "type": "text",
+ "text": "Mentioning "
+ },
+ {
+ "type": "mention",
+ "attrs": {
+ "id": "ABCDE-ABCDE-ABCDE-ABCDE",
+ "text": "@testuser",
+ "userType": "APP"
+ }
+ }
+ ]
+ },
+ {
+ "type": "paragraph",
+ "content": [
+ {
+ "type": "text",
+ "text": "Mentioning "
+ },
+ {
+ "type": "mention",
+ "attrs": {
+ "id": "ABCDE-ABCDE-ABCDE-ABCDE",
+ "text": "@test user",
+ "userType": "APP"
+ }
+ },
+ {
+ "type": "text",
+ "text": " with space in user name"
+ }
+ ]
+ }
+ ]
+}
diff --git a/spec/fixtures/lib/kramdown/atlassian_document_format/mention.md b/spec/fixtures/lib/kramdown/atlassian_document_format/mention.md
new file mode 100644
index 00000000000..f22c6421d8c
--- /dev/null
+++ b/spec/fixtures/lib/kramdown/atlassian_document_format/mention.md
@@ -0,0 +1,4 @@
+Mentioning @adf-mention:testuser
+
+Mentioning @adf-mention:\"test user\" with space in user name
+
diff --git a/spec/fixtures/lib/kramdown/atlassian_document_format/ordered_list.json b/spec/fixtures/lib/kramdown/atlassian_document_format/ordered_list.json
new file mode 100644
index 00000000000..71d638c6a38
--- /dev/null
+++ b/spec/fixtures/lib/kramdown/atlassian_document_format/ordered_list.json
@@ -0,0 +1,170 @@
+{
+ "version": 1,
+ "type": "doc",
+ "content": [
+ {
+ "type": "orderedList",
+ "content": [
+ {
+ "type": "listItem",
+ "content": [
+ {
+ "type": "paragraph",
+ "content": [
+ {
+ "type": "text",
+ "text": "Number list Item 1"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "listItem",
+ "content": [
+ {
+ "type": "paragraph",
+ "content": [
+ {
+ "type": "text",
+ "text": "Number list item 2"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "listItem",
+ "content": [
+ {
+ "type": "paragraph",
+ "content": [
+ {
+ "type": "text",
+ "text": "Number list item 3"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "listItem",
+ "content": [
+ {
+ "type": "paragraph",
+ "content": [
+ {
+ "type": "text",
+ "text": "Number list item 4"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "listItem",
+ "content": [
+ {
+ "type": "paragraph",
+ "content": [
+ {
+ "type": "text",
+ "text": "Number list item 5"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "listItem",
+ "content": [
+ {
+ "type": "paragraph",
+ "content": [
+ {
+ "type": "text",
+ "text": "Number list item 6"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "listItem",
+ "content": [
+ {
+ "type": "paragraph",
+ "content": [
+ {
+ "type": "text",
+ "text": "Number list item 7"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "listItem",
+ "content": [
+ {
+ "type": "paragraph",
+ "content": [
+ {
+ "type": "text",
+ "text": "Number list item 8"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "listItem",
+ "content": [
+ {
+ "type": "paragraph",
+ "content": [
+ {
+ "type": "text",
+ "text": "Number list item 9"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "listItem",
+ "content": [
+ {
+ "type": "paragraph",
+ "content": [
+ {
+ "type": "text",
+ "text": "Number list item 10"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "orderedList",
+ "content": [
+ {
+ "type": "listItem",
+ "content": [
+ {
+ "type": "paragraph",
+ "content": [
+ {
+ "type": "text",
+ "text": "Another list"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+}
diff --git a/spec/fixtures/lib/kramdown/atlassian_document_format/ordered_list.md b/spec/fixtures/lib/kramdown/atlassian_document_format/ordered_list.md
new file mode 100644
index 00000000000..2c1f45cd810
--- /dev/null
+++ b/spec/fixtures/lib/kramdown/atlassian_document_format/ordered_list.md
@@ -0,0 +1,25 @@
+1. Number list Item 1
+
+2. Number list item 2
+
+3. Number list item 3
+
+4. Number list item 4
+
+5. Number list item 5
+
+6. Number list item 6
+
+7. Number list item 7
+
+8. Number list item 8
+
+9. Number list item 9
+
+10. Number list item 10
+<!-- -->
+
+1. Another list
+
+<!-- -->
+
diff --git a/spec/fixtures/lib/kramdown/atlassian_document_format/panel.json b/spec/fixtures/lib/kramdown/atlassian_document_format/panel.json
new file mode 100644
index 00000000000..e3982d23a9e
--- /dev/null
+++ b/spec/fixtures/lib/kramdown/atlassian_document_format/panel.json
@@ -0,0 +1,117 @@
+{
+ "version": 1,
+ "type": "doc",
+ "content": [
+ {
+ "type": "panel",
+ "attrs": {
+ "panelType": "success"
+ },
+ "content": [
+ {
+ "type": "paragraph",
+ "content": [
+ {
+ "type": "text",
+ "text": "Success info panel"
+ }
+ ]
+ },
+ {
+ "type": "paragraph",
+ "content": [
+ {
+ "type": "text",
+ "text": "Second paragraph"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "panel",
+ "attrs": {
+ "panelType": "info"
+ },
+ "content": [
+ {
+ "type": "paragraph",
+ "content": [
+ {
+ "type": "text",
+ "text": "Info info panel"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "panel",
+ "attrs": {
+ "panelType": "note"
+ },
+ "content": [
+ {
+ "type": "paragraph",
+ "content": [
+ {
+ "type": "text",
+ "text": "Note info panel"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "panel",
+ "attrs": {
+ "panelType": "warning"
+ },
+ "content": [
+ {
+ "type": "paragraph",
+ "content": [
+ {
+ "type": "text",
+ "text": "Warning info panel"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "panel",
+ "attrs": {
+ "panelType": "error"
+ },
+ "content": [
+ {
+ "type": "paragraph",
+ "content": [
+ {
+ "type": "text",
+ "text": "Error info panel"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "panel",
+ "attrs": {
+ "panelType": "unknown"
+ },
+ "content": [
+ {
+ "type": "paragraph",
+ "content": [
+ {
+ "type": "text",
+ "text": "Unknown panel"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+}
diff --git a/spec/fixtures/lib/kramdown/atlassian_document_format/panel.md b/spec/fixtures/lib/kramdown/atlassian_document_format/panel.md
new file mode 100644
index 00000000000..fe3a10e4878
--- /dev/null
+++ b/spec/fixtures/lib/kramdown/atlassian_document_format/panel.md
@@ -0,0 +1,12 @@
+> \:white\_check\_mark: Success info panel
+>
+> Second paragraph
+
+> \:information\_source: Info info panel
+
+> \:notepad\_spiral: Note info panel
+
+> \:warning: Warning info panel
+
+> \:octagonal\_sign: Error info panel
+
diff --git a/spec/fixtures/lib/kramdown/atlassian_document_format/paragraph.json b/spec/fixtures/lib/kramdown/atlassian_document_format/paragraph.json
new file mode 100644
index 00000000000..e5b99dbd112
--- /dev/null
+++ b/spec/fixtures/lib/kramdown/atlassian_document_format/paragraph.json
@@ -0,0 +1,28 @@
+{
+ "version": 1,
+ "type": "doc",
+ "content": [
+ {
+ "type": "paragraph",
+ "content": [
+ {
+ "type": "text",
+ "text": "This is a sample paragraph"
+ },
+ {
+ "type": "text",
+ "text": " with lorem ipsum dolor sit amet..."
+ }
+ ]
+ },
+ {
+ "type": "paragraph",
+ "content": [
+ {
+ "type": "text",
+ "text": "This is a second paragraph"
+ }
+ ]
+ }
+ ]
+}
diff --git a/spec/fixtures/lib/kramdown/atlassian_document_format/paragraph.md b/spec/fixtures/lib/kramdown/atlassian_document_format/paragraph.md
new file mode 100644
index 00000000000..661110e0267
--- /dev/null
+++ b/spec/fixtures/lib/kramdown/atlassian_document_format/paragraph.md
@@ -0,0 +1,4 @@
+This is a sample paragraph with lorem ipsum dolor sit amet...
+
+This is a second paragraph
+
diff --git a/spec/fixtures/lib/kramdown/atlassian_document_format/rule.json b/spec/fixtures/lib/kramdown/atlassian_document_format/rule.json
new file mode 100644
index 00000000000..c2566a84713
--- /dev/null
+++ b/spec/fixtures/lib/kramdown/atlassian_document_format/rule.json
@@ -0,0 +1,9 @@
+{
+ "version": 1,
+ "type": "doc",
+ "content": [
+ {
+ "type": "rule"
+ }
+ ]
+}
diff --git a/spec/fixtures/lib/kramdown/atlassian_document_format/rule.md b/spec/fixtures/lib/kramdown/atlassian_document_format/rule.md
new file mode 100644
index 00000000000..8ccef4e8dfb
--- /dev/null
+++ b/spec/fixtures/lib/kramdown/atlassian_document_format/rule.md
@@ -0,0 +1,2 @@
+* * *
+
diff --git a/spec/fixtures/lib/kramdown/atlassian_document_format/strike_sup_sub_mark.json b/spec/fixtures/lib/kramdown/atlassian_document_format/strike_sup_sub_mark.json
new file mode 100644
index 00000000000..21d364d642f
--- /dev/null
+++ b/spec/fixtures/lib/kramdown/atlassian_document_format/strike_sup_sub_mark.json
@@ -0,0 +1,56 @@
+{
+ "version": 1,
+ "type": "doc",
+ "content": [
+ {
+ "type": "paragraph",
+ "content": [
+ {
+ "type": "text",
+ "text": "This is "
+ },
+ {
+ "type": "text",
+ "text": "stricken",
+ "marks": [
+ {
+ "type": "strike"
+ }
+ ]
+ },
+ {
+ "type": "text",
+ "text": " and "
+ },
+ {
+ "type": "text",
+ "text": "superscripted",
+ "marks": [
+ {
+ "type": "subsup",
+ "attrs": {
+ "type": "sup"
+ }
+ }
+ ]
+ },
+ {
+ "type": "text",
+ "text": " and "
+ },
+ {
+ "type": "text",
+ "text": "subscripted",
+ "marks": [
+ {
+ "type": "subsup",
+ "attrs": {
+ "type": "sub"
+ }
+ }
+ ]
+ }
+ ]
+ }
+ ]
+}
diff --git a/spec/fixtures/lib/kramdown/atlassian_document_format/strike_sup_sub_mark.md b/spec/fixtures/lib/kramdown/atlassian_document_format/strike_sup_sub_mark.md
new file mode 100644
index 00000000000..e4dda350907
--- /dev/null
+++ b/spec/fixtures/lib/kramdown/atlassian_document_format/strike_sup_sub_mark.md
@@ -0,0 +1,3 @@
+This is <del>stricken</del> and <sup>superscripted</sup> and
+<sub>subscripted</sub>
+
diff --git a/spec/fixtures/lib/kramdown/atlassian_document_format/strong_em_mark.json b/spec/fixtures/lib/kramdown/atlassian_document_format/strong_em_mark.json
new file mode 100644
index 00000000000..7ab1a7c1461
--- /dev/null
+++ b/spec/fixtures/lib/kramdown/atlassian_document_format/strong_em_mark.json
@@ -0,0 +1,53 @@
+{
+ "version": 1,
+ "type": "doc",
+ "content": [
+ {
+ "type": "paragraph",
+ "content": [
+ {
+ "type": "text",
+ "text": "Hello "
+ },
+ {
+ "type": "text",
+ "text": "strong",
+ "marks": [
+ {
+ "type": "strong"
+ }
+ ]
+ },
+ {
+ "type": "text",
+ "text": " and "
+ },
+ {
+ "type": "text",
+ "text": "emphasis",
+ "marks": [
+ {
+ "type": "em"
+ }
+ ]
+ },
+ {
+ "type": "text",
+ "text": " and "
+ },
+ {
+ "type": "text",
+ "text": "strongly emphasised",
+ "marks": [
+ {
+ "type": "em"
+ },
+ {
+ "type": "strong"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+}
diff --git a/spec/fixtures/lib/kramdown/atlassian_document_format/strong_em_mark.md b/spec/fixtures/lib/kramdown/atlassian_document_format/strong_em_mark.md
new file mode 100644
index 00000000000..d0dcbb231ae
--- /dev/null
+++ b/spec/fixtures/lib/kramdown/atlassian_document_format/strong_em_mark.md
@@ -0,0 +1,2 @@
+Hello **strong** and *emphasis* and ***strongly emphasised***
+
diff --git a/spec/fixtures/lib/kramdown/atlassian_document_format/table.json b/spec/fixtures/lib/kramdown/atlassian_document_format/table.json
new file mode 100644
index 00000000000..ad12c2875c0
--- /dev/null
+++ b/spec/fixtures/lib/kramdown/atlassian_document_format/table.json
@@ -0,0 +1,55 @@
+{
+ "version": 1,
+ "type": "doc",
+ "content": [
+ {
+ "type": "table",
+ "attrs": {
+ "isNumberColumnEnabled": false,
+ "layout": "default"
+ },
+ "content": [
+ {
+ "type": "tableRow",
+ "content": [
+ {
+ "type": "tableCell",
+ "attrs": {},
+ "content": [
+ {
+ "type": "paragraph",
+ "content": [
+ {
+ "type": "text",
+ "text": "Row one, cell one",
+ "marks": [
+ {
+ "type": "strong"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "tableCell",
+ "attrs": {},
+ "content": [
+ {
+ "type": "paragraph",
+ "content": [
+ {
+ "type": "text",
+ "text": "Row one, cell two"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+}
diff --git a/spec/fixtures/lib/kramdown/atlassian_document_format/table.md b/spec/fixtures/lib/kramdown/atlassian_document_format/table.md
new file mode 100644
index 00000000000..4e0c53338df
--- /dev/null
+++ b/spec/fixtures/lib/kramdown/atlassian_document_format/table.md
@@ -0,0 +1,18 @@
+<table>
+<tbody>
+<tr>
+<td>
+
+**Row one, cell one**
+
+</td>
+<td>
+
+Row one, cell two
+
+</td>
+</tr>
+</tbody>
+</table>
+
+
diff --git a/spec/fixtures/lib/kramdown/atlassian_document_format/underline_text_color_mark.json b/spec/fixtures/lib/kramdown/atlassian_document_format/underline_text_color_mark.json
new file mode 100644
index 00000000000..2690233d4f6
--- /dev/null
+++ b/spec/fixtures/lib/kramdown/atlassian_document_format/underline_text_color_mark.json
@@ -0,0 +1,40 @@
+{
+ "version": 1,
+ "type": "doc",
+ "content": [
+ {
+ "type": "paragraph",
+ "content": [
+ {
+ "type": "text",
+ "text": "This is "
+ },
+ {
+ "type": "text",
+ "text": "underlined",
+ "marks": [
+ {
+ "type": "underline"
+ }
+ ]
+ },
+ {
+ "type": "text",
+ "text": " and "
+ },
+ {
+ "type": "text",
+ "text": "red",
+ "marks": [
+ {
+ "type": "textColor",
+ "attrs": {
+ "color": "#ff6347"
+ }
+ }
+ ]
+ }
+ ]
+ }
+ ]
+}
diff --git a/spec/fixtures/lib/kramdown/atlassian_document_format/underline_text_color_mark.md b/spec/fixtures/lib/kramdown/atlassian_document_format/underline_text_color_mark.md
new file mode 100644
index 00000000000..75c9de3b451
--- /dev/null
+++ b/spec/fixtures/lib/kramdown/atlassian_document_format/underline_text_color_mark.md
@@ -0,0 +1,2 @@
+This is <u>underlined</u> and <span color="#ff6347">red</span>
+