@@ -14,10 +14,10 @@ function quote() {
1414 )
1515}
1616
17- describe ( 'quote-selection' , function ( ) {
18- describe ( 'with quotable selection' , function ( ) {
17+ describe ( 'quote-selection' , function ( ) {
18+ describe ( 'with quotable selection' , function ( ) {
1919 let subscription
20- beforeEach ( function ( ) {
20+ beforeEach ( function ( ) {
2121 document . body . innerHTML = `
2222 <p id="not-quotable">Not quotable text</p>
2323 <div data-quote>
@@ -33,13 +33,13 @@ describe('quote-selection', function() {
3333 subscription = quoteSelection . subscribe ( document . querySelector ( '[data-nested-quote]' ) )
3434 } )
3535
36- afterEach ( function ( ) {
36+ afterEach ( function ( ) {
3737 quoteSelection . uninstall ( document . querySelector ( '[data-quote]' ) )
3838 subscription . unsubscribe ( )
3939 document . body . innerHTML = ''
4040 } )
4141
42- it ( 'textarea is updated' , function ( ) {
42+ it ( 'textarea is updated' , function ( ) {
4343 const el = document . querySelector ( '#quotable' )
4444 const selection = window . getSelection ( )
4545 window . getSelection = ( ) => createSelection ( selection , el )
@@ -49,11 +49,11 @@ describe('quote-selection', function() {
4949 let eventCount = 0
5050 let changeCount = 0
5151
52- container . addEventListener ( 'quote-selection' , function ( ) {
52+ container . addEventListener ( 'quote-selection' , function ( ) {
5353 eventCount ++
5454 } )
5555
56- textarea . addEventListener ( 'change' , function ( ) {
56+ textarea . addEventListener ( 'change' , function ( ) {
5757 changeCount ++
5858 } )
5959
@@ -63,15 +63,15 @@ describe('quote-selection', function() {
6363 assert . equal ( changeCount , 1 )
6464 } )
6565
66- it ( 'nested textarea is updated when event is captured' , function ( ) {
66+ it ( 'nested textarea is updated when event is captured' , function ( ) {
6767 const el = document . querySelector ( '#nested-quotable' )
6868 const selection = window . getSelection ( )
6969 window . getSelection = ( ) => createSelection ( selection , el )
7070 const container = document . querySelector ( '[data-nested-quote]' )
7171 const textarea = document . querySelector ( '#nested-textarea' )
7272 const outerTextarea = document . querySelector ( '#not-hidden-textarea' )
7373
74- container . addEventListener ( 'quote-selection' , function ( ) {
74+ container . addEventListener ( 'quote-selection' , function ( ) {
7575 textarea . hidden = false
7676 } )
7777
@@ -80,7 +80,7 @@ describe('quote-selection', function() {
8080 assert . equal ( textarea . value , 'Has text\n\n> Nested text.\n\n' )
8181 } )
8282
83- it ( 'textarea is not updated when selecting text outside of quote region' , function ( ) {
83+ it ( 'textarea is not updated when selecting text outside of quote region' , function ( ) {
8484 const el = document . querySelector ( '#not-quotable' )
8585 const selection = window . getSelection ( )
8686 window . getSelection = ( ) => createSelection ( selection , el )
@@ -91,9 +91,9 @@ describe('quote-selection', function() {
9191 } )
9292 } )
9393
94- describe ( 'with markdown enabled' , function ( ) {
94+ describe ( 'with markdown enabled' , function ( ) {
9595 let subscription
96- beforeEach ( function ( ) {
96+ beforeEach ( function ( ) {
9797 document . body . innerHTML = `
9898 <div data-quote>
9999 <div>
@@ -114,12 +114,12 @@ describe('quote-selection', function() {
114114 } )
115115 } )
116116
117- afterEach ( function ( ) {
117+ afterEach ( function ( ) {
118118 subscription . unsubscribe ( )
119119 document . body . innerHTML = ''
120120 } )
121121
122- it ( 'preserves formatting' , function ( ) {
122+ it ( 'preserves formatting' , function ( ) {
123123 const range = document . createRange ( )
124124 range . selectNodeContents ( document . querySelector ( '.comment-body' ) . parentNode )
125125 assert . ok ( quoteSelection . quote ( 'whatever' , range ) )
@@ -141,8 +141,8 @@ describe('quote-selection', function() {
141141 )
142142 } )
143143
144- it ( 'allows quote-selection-markdown event to prepare content' , function ( ) {
145- document . querySelector ( '[data-quote]' ) . addEventListener ( 'quote-selection-markdown' , function ( event ) {
144+ it ( 'allows quote-selection-markdown event to prepare content' , function ( ) {
145+ document . querySelector ( '[data-quote]' ) . addEventListener ( 'quote-selection-markdown' , function ( event ) {
146146 const { fragment} = event . detail
147147 fragment . querySelector ( 'a[href]' ) . replaceWith ( '@links' )
148148 fragment . querySelector ( 'img[alt]' ) . replaceWith ( ':emoji:' )
0 commit comments