Skip to content

Commit 3a952e6

Browse files
author
Rajat Singla
committed
attrs added for blockquote and ol as wwell
1 parent fc6573c commit 3a952e6

File tree

7 files changed

+17
-9
lines changed

7 files changed

+17
-9
lines changed

tests/data/html/blockquote.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<blockquote><p>This is a blockquote</p></blockquote>
1+
<blockquote id="b-NzgT2MAhuSTnpFyo-E3"><p>This is a blockquote</p></blockquote>

tests/data/html/ordered_list.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<h1>Scroll</h1><ol start="1"><li><p>One</p></li><li><p>Two</p></li><li><p>Three</p></li></ol><ol start="2"><li><p>One</p></li><li><p>Two</p></li><li><p>Three</p></li></ol>
1+
<h1>Scroll</h1><ol start="1" id="b-NzgT2MAhuSTnpFyo-E3"><li><p>One</p></li><li><p>Two</p></li><li><p>Three</p></li></ol><ol start="2" id="b-NzgT2MAhuSTnpFyo-E3"><li><p id="b-NzgT2MAhuSTnpFyo-E3">One</p></li><li><p>Two</p></li><li><p>Three</p></li></ol>

tests/data/json/blockquote.json

+3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
"content": [
44
{
55
"type": "blockquote",
6+
"attrs": {
7+
"id": "b-NzgT2MAhuSTnpFyo-E3"
8+
},
69
"content": [
710
{
811
"type": "paragraph",

tests/data/json/ordered_list.json

+7-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
{
1414
"type": "ordered_list",
1515
"attrs": {
16-
"order": 1
16+
"order": 1,
17+
"id": "b-NzgT2MAhuSTnpFyo-E3"
1718
},
1819
"content": [
1920
{
@@ -63,14 +64,18 @@
6364
{
6465
"type": "ordered_list",
6566
"attrs": {
66-
"start": 2
67+
"start": 2,
68+
"id": "b-NzgT2MAhuSTnpFyo-E3"
6769
},
6870
"content": [
6971
{
7072
"type": "list_item",
7173
"content": [
7274
{
7375
"type": "paragraph",
76+
"attrs": {
77+
"id": "b-NzgT2MAhuSTnpFyo-E3"
78+
},
7479
"content": [
7580
{
7681
"type": "text",

tiptapy/templates/blockquote.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<blockquote>
1+
<blockquote{{ extract_tag_attrs(node) }}>
22
{%- for item in node.content -%}
33
{%- with template=item.type + '.html', node=item -%}
44
{%- include template -%}

tiptapy/templates/orderedList.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{%- if node.attrs.start -%}
2-
<ol start="{{ node.attrs.start }}">
2+
<ol start="{{ node.attrs.start }}"{{ extract_tag_attrs(node) }}>
33
{%- else -%}
4-
<ol start="{{ node.attrs.order|default(1) }}">
4+
<ol start="{{ node.attrs.order|default(1) }}"{{ extract_tag_attrs(node) }}>
55
{%- endif -%}
66
{%- for item in node.content -%}
77
{%- with template=item.type + '.html', node=item -%}

tiptapy/templates/ordered_list.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{%- if node.attrs.start -%}
2-
<ol start="{{ node.attrs.start }}">
2+
<ol start="{{ node.attrs.start }}"{{ extract_tag_attrs(node) }}>
33
{%- else -%}
4-
<ol start="{{ node.attrs.order|default(1) }}">
4+
<ol start="{{ node.attrs.order|default(1) }}"{{ extract_tag_attrs(node) }}>
55
{%- endif -%}
66
{%- for item in node.content -%}
77
{%- with template=item.type + '.html', node=item -%}

0 commit comments

Comments
 (0)