@@ -16,31 +16,31 @@ describe('Convert blocks', () => {
1616 it ( 'should return the bold class' , ( ) => {
1717 const bold = filterCssClasses ( { ...defaultAnnotations , bold : true } )
1818
19- expect ( bold ) . toEqual ( 'gs- bold' )
19+ expect ( bold ) . toEqual ( 'data-notion-annotation=" bold" ' )
2020 } )
2121
2222 it ( 'should return the italic class' , ( ) => {
2323 const bold = filterCssClasses ( { ...defaultAnnotations , italic : true } )
2424
25- expect ( bold ) . toEqual ( 'gs- italic' )
25+ expect ( bold ) . toEqual ( 'data-notion-annotation=" italic" ' )
2626 } )
2727
2828 it ( 'should return the strikethrough class' , ( ) => {
2929 const bold = filterCssClasses ( { ...defaultAnnotations , strikethrough : true } )
3030
31- expect ( bold ) . toEqual ( 'gs- strikethrough' )
31+ expect ( bold ) . toEqual ( 'data-notion-annotation=" strikethrough" ' )
3232 } )
3333
3434 it ( 'should return the underline class' , ( ) => {
3535 const bold = filterCssClasses ( { ...defaultAnnotations , underline : true } )
3636
37- expect ( bold ) . toEqual ( 'gs- underline' )
37+ expect ( bold ) . toEqual ( 'data-notion-annotation=" underline" ' )
3838 } )
3939
4040 it ( 'should return the code class' , ( ) => {
4141 const bold = filterCssClasses ( { ...defaultAnnotations , code : true } )
4242
43- expect ( bold ) . toEqual ( 'gs- code' )
43+ expect ( bold ) . toEqual ( 'data-notion-annotation=" code" ' )
4444 } )
4545
4646 it ( 'should not return any class if color is default' , ( ) => {
@@ -52,13 +52,13 @@ describe('Convert blocks', () => {
5252 it ( 'should the color class' , ( ) => {
5353 const bold = filterCssClasses ( { ...defaultAnnotations , color : 'brown' } )
5454
55- expect ( bold ) . toEqual ( 'gs- brown' )
55+ expect ( bold ) . toEqual ( 'data-notion-color=" brown" ' )
5656 } )
5757
5858 it ( 'should return bold and color class' , ( ) => {
5959 const bold = filterCssClasses ( { ...defaultAnnotations , bold : true , color : 'orange' } )
6060
61- expect ( bold ) . toEqual ( 'gs- bold gs- orange' )
61+ expect ( bold ) . toEqual ( 'data-notion-annotation=" bold" data-notion-color=" orange" ' )
6262 } )
6363 } )
6464
@@ -76,39 +76,39 @@ describe('Convert blocks', () => {
7676
7777 const fn = convertBlockToHTML ( emptyParagraph , defaultPluginConfigRes )
7878
79- expect ( fn ) . toBe ( '<p><span class=gs-undefined ></span></p>' )
79+ expect ( fn ) . toBe ( '<p><span></span></p>' )
8080 } )
8181
8282 it ( 'should return a paragraph with text' , ( ) => {
8383 const paragraph = [ MockParagraph ]
8484
8585 const fn = convertBlockToHTML ( paragraph , defaultPluginConfigRes )
8686
87- expect ( fn ) . toBe ( '<p><span class=gs-undefined >Lorem Ipsum Lorem Ipsum</span></p>' )
87+ expect ( fn ) . toBe ( '<p><span>Lorem Ipsum Lorem Ipsum</span></p>' )
8888 } )
8989
9090 it ( 'should return a heading level 2 when Notion sends a heading level 1' , ( ) => {
9191 const headingOne = [ MockHeadingOne ]
9292
9393 const fn = convertBlockToHTML ( headingOne , defaultPluginConfigRes )
9494
95- expect ( fn ) . toBe ( '<h2><span class=gs-undefined >Heading one</span></h2>' )
95+ expect ( fn ) . toBe ( '<h2><span>Heading one</span></h2>' )
9696 } )
9797
9898 it ( 'should return a heading level 3 when Notion sends a heading level 2' , ( ) => {
9999 const headingTwo = [ MockHeadingTwo ]
100100
101101 const fn = convertBlockToHTML ( headingTwo , defaultPluginConfigRes )
102102
103- expect ( fn ) . toBe ( '<h3><span class=gs-undefined >Heading two</span></h3>' )
103+ expect ( fn ) . toBe ( '<h3><span>Heading two</span></h3>' )
104104 } )
105105
106106 it ( 'should return a heading level 3 when Notion sends a heading level 2' , ( ) => {
107107 const headingThree = [ MockHeadingThree ]
108108
109109 const fn = convertBlockToHTML ( headingThree , defaultPluginConfigRes )
110110
111- expect ( fn ) . toBe ( '<h4><span class=gs-undefined >Heading three</span></h4>' )
111+ expect ( fn ) . toBe ( '<h4><span>Heading three</span></h4>' )
112112 } )
113113
114114 it ( 'should return an unchecked todo item' , ( ) => {
@@ -117,7 +117,7 @@ describe('Convert blocks', () => {
117117 const fn = convertBlockToHTML ( todoItemUnchecked , defaultPluginConfigRes )
118118
119119 expect ( fn ) . toBe (
120- '<div class="gs- todo"><label for="657e68c6-1b09-478f-9912-c647e17077b8"><input type="checkbox" id="657e68c6-1b09-478f-9912-c647e17077b8" /> <span class=gs-undefined >Lorem Ipsum Lorem Ipsum</span></label></div>'
120+ '<div data-notion=" todo"><label for="657e68c6-1b09-478f-9912-c647e17077b8"><input type="checkbox" id="657e68c6-1b09-478f-9912-c647e17077b8" /> <span>Lorem Ipsum Lorem Ipsum</span></label></div>'
121121 )
122122 } )
123123
@@ -127,7 +127,7 @@ describe('Convert blocks', () => {
127127 const fn = convertBlockToHTML ( todoItemChecked , defaultPluginConfigRes )
128128
129129 expect ( fn ) . toBe (
130- '<div class="gs- todo"><label for="657e68c6-1b09-478f-9912-c647e17077b8"><input type="checkbox" id="657e68c6-1b09-478f-9912-c647e17077b8" checked /> <span class=gs-undefined >Lorem Ipsum Lorem Ipsum</span></label></div>'
130+ '<div data-notion=" todo"><label for="657e68c6-1b09-478f-9912-c647e17077b8"><input type="checkbox" id="657e68c6-1b09-478f-9912-c647e17077b8" checked /> <span>Lorem Ipsum Lorem Ipsum</span></label></div>'
131131 )
132132 } )
133133
@@ -137,7 +137,7 @@ describe('Convert blocks', () => {
137137 const fn = convertBlockToHTML ( toggle , defaultPluginConfigRes )
138138
139139 expect ( fn ) . toBe (
140- '<details class="gs- toggle"><summary><span class=gs-undefined >Lorem Ipsum Lorem Ipsum</span></summary>It\'s a toggle!</details>'
140+ '<details data-notion=" toggle"><summary><span>Lorem Ipsum Lorem Ipsum</span></summary>It\'s a toggle!</details>'
141141 )
142142 } )
143143
@@ -146,7 +146,7 @@ describe('Convert blocks', () => {
146146
147147 const fn = convertBlockToHTML ( childPage , defaultPluginConfigRes )
148148
149- expect ( fn ) . toBe ( '<p class="gs- child-page">This is a child page</p>' )
149+ expect ( fn ) . toBe ( '<p data-notion=" child-page">This is a child page</p>' )
150150 } )
151151
152152 it ( 'should return empty if block is not supported' , ( ) => {
0 commit comments