Skip to content

Commit c8ca1ff

Browse files
committed
Rename data-layout-table to data-paste-markdown-skip
1 parent d85d7aa commit c8ca1ff

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

examples/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
</tbody>
3030
</table>
3131

32-
<table border="1" cellpadding="5" data-layout-table>
32+
<table border="1" cellpadding="5" data-paste-markdown-skip>
3333
<thead>
3434
<tr>
3535
<th>name</th>

src/paste-markdown-table.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ function hasTable(transfer: DataTransfer): HTMLElement | void {
105105
if (!table) return
106106

107107
// Prevent pasting layout table
108-
if (table.closest('[data-layout-table]')) return
108+
if (table.closest('[data-paste-markdown-skip]')) return
109109

110110
return table
111111
}

test/test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ describe('paste-markdown', function() {
4141
it('rejects layout tables', function() {
4242
const data = {
4343
'text/html': `
44-
<table data-layout-table>
44+
<table data-paste-markdown-skip>
4545
<thead><tr><th>name</th><th>origin</th></tr></thead>
4646
<tbody>
4747
<tr><td>hubot</td><td>github</td></tr>

0 commit comments

Comments
 (0)