File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -95,7 +95,7 @@ function parseTable(html: string): HTMLElement | null {
9595 return el . querySelector ( 'table' )
9696}
9797
98- function hasTable ( transfer : DataTransfer ) : HTMLElement | null | void {
98+ function hasTable ( transfer : DataTransfer ) : HTMLElement | void {
9999 if ( Array . from ( transfer . types ) . indexOf ( 'text/html' ) === - 1 ) return
100100
101101 const html = transfer . getData ( 'text/html' )
@@ -104,8 +104,8 @@ function hasTable(transfer: DataTransfer): HTMLElement | null | void {
104104 const table = parseTable ( html )
105105 if ( ! table ) return
106106
107- // Edge copies the surrounding table from our issue comment text.
108- if ( table . closest ( '.js-comment ' ) ) return
107+ // Prevent pasting layout table
108+ if ( table . closest ( '[data-layout-table] ' ) ) return
109109
110- return / \b ( j s | b l o b | d i f f ) - . / . test ( table . className ) ? null : table
110+ return table
111111}
You can’t perform that action at this time.
0 commit comments